# benchmark **Repository Path**: drmer/benchmark ## Basic Information - **Project Name**: benchmark - **Description**: Laravel benchmark on Varnish\Apache\Nginx and Swoole - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-07-08 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Benchmark for Laravel + Swoole ## Test environment ## Test result using webbench ### Apache ```sh webbench -c 100 -t 10 http://benchmark.local/ Webbench - Simple Web Benchmark 1.5 Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software. Benchmarking: GET http://benchmark.local/ 100 clients, running 10 sec. Speed=8322 pages/min, 373338 bytes/sec. Requests: 1387 susceed, 0 failed. ``` ### Apache + Varnish ```sh webbench -c 100 -t 10 http://benchmark.local:6081/ Webbench - Simple Web Benchmark 1.5 Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software. Benchmarking: GET http://benchmark.local:6081/ 100 clients, running 10 sec. Speed=97722 pages/min, 4447828 bytes/sec. Requests: 16287 susceed, 0 failed. ``` ### Swoole without cache ```sh webbench -c 100 -t 10 http://benchmark.local:3737/ Webbench - Simple Web Benchmark 1.5 Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software. Benchmarking: GET http://benchmark.local:3737/ 100 clients, running 10 sec. Speed=29376 pages/min, 1268553 bytes/sec. Requests: 4896 susceed, 0 failed. ``` ### Swoole with cache (file) ```sh webbench -c 100 -t 10 http://benchmark.local:3737/ Webbench - Simple Web Benchmark 1.5 Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software. Benchmarking: GET http://benchmark.local:3737/ 100 clients, running 10 sec. Speed=98124 pages/min, 4237321 bytes/sec. Requests: 16354 susceed, 0 failed. ``` ### Swoole with cache (redis) ```sh webbench -c 100 -t 10 http://benchmark.local:3737/ Webbench - Simple Web Benchmark 1.5 Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software. Benchmarking: GET http://benchmark.local:3737/ 100 clients, running 10 sec. Speed=95856 pages/min, 4139381 bytes/sec. Requests: 15976 susceed, 0 failed. ``` ### Swoole + Nginx ```sh webbench -c 100 -t 10 http://benchmark.local:8080/ Webbench - Simple Web Benchmark 1.5 Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software. Benchmarking: GET http://benchmark.local:8080/ 100 clients, running 10 sec. Speed=54846 pages/min, 2373917 bytes/sec. Requests: 9141 susceed, 0 failed. ``` ## Test result using wrk ### Apache ```sh wrk -t4 -c100 -d10 http://benchmark.local/ Running 10s test @ http://benchmark.local/ 4 threads and 100 connections Thread Stats Avg Stdev Max +/- Stdev Latency 229.39ms 200.30ms 1.58s 75.83% Req/Sec 58.72 28.44 118.00 58.47% 1419 requests in 10.05s, 3.53MB read Socket errors: connect 0, read 0, write 0, timeout 64 Requests/sec: 141.13 Transfer/sec: 359.85KB ``` ### Apache + Varnish ```sh wrk -t4 -c100 -d10 http://benchmark.local:6081/ Running 10s test @ http://benchmark.local:6081/ 4 threads and 100 connections Thread Stats Avg Stdev Max +/- Stdev Latency 22.86ms 28.30ms 622.03ms 93.41% Req/Sec 1.34k 239.51 1.97k 76.00% 53460 requests in 10.01s, 139.44MB read Requests/sec: 5339.49 Transfer/sec: 13.93MB ``` ### Swoole without cache ```sh wrk -t4 -c100 -d10 http://benchmark.local:3737/ Running 10s test @ http://benchmark.local:3737/ 4 threads and 100 connections Thread Stats Avg Stdev Max +/- Stdev Latency 122.27ms 23.73ms 257.20ms 88.19% Req/Sec 204.12 44.13 252.00 75.19% 8173 requests in 10.07s, 20.23MB read Requests/sec: 811.43 Transfer/sec: 2.01MB ``` ### Swoole with cache (file) ```sh wrk -t4 -c100 -d10 http://benchmark.local:3737/ Running 10s test @ http://benchmark.local:3737/ 4 threads and 100 connections Thread Stats Avg Stdev Max +/- Stdev Latency 25.94ms 5.15ms 79.59ms 84.27% Req/Sec 0.97k 143.07 1.41k 68.50% 38636 requests in 10.03s, 95.65MB read Requests/sec: 3852.05 Transfer/sec: 9.54MB ``` ### Swoole with cache (redis) ```sh wrk -t4 -c100 -d10 http://benchmark.local:3737/ Running 10s test @ http://benchmark.local:3737/ 4 threads and 100 connections Thread Stats Avg Stdev Max +/- Stdev Latency 28.47ms 5.99ms 78.62ms 86.03% Req/Sec 0.88k 172.60 1.72k 88.00% 35169 requests in 10.04s, 87.07MB read Requests/sec: 3502.48 Transfer/sec: 8.67MB ``` ### Swoole + Nginx ```sh wrk -t4 -c100 -d10 http://benchmark.local:8080/ Running 10s test @ http://benchmark.local:8080/ 4 threads and 100 connections Thread Stats Avg Stdev Max +/- Stdev Latency 49.08ms 37.32ms 529.11ms 96.51% Req/Sec 556.08 151.16 1.29k 65.25% 22221 requests in 10.06s, 55.14MB read Requests/sec: 2209.63 Transfer/sec: 5.48MB ```