Benchmarking this Drupal server
I wanted to see what my mostly stock Drupal server was capable of. For this first test I am starting with a simple homepage load. I used the ab tool (Apache Bench). It couldn't be simpler! But it only downloads the HTML, not the rest of the assets. Here is one page load:
user@hostname:~/$ ab -n 1 -c 1 https://aaron.axvigs.com/This is ApacheBench, Version 2.3 <$Revision: 1923142 $>Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking aaron.axvigs.com (be patient).....done
Server Software: nginx/1.22.1Server Hostname: aaron.axvigs.comServer Port: 443SSL/TLS Protocol: TLSv1.3,TLS_AES_256_GCM_SHA384,256,256Server Temp Key: X25519 253 bitsTLS Server Name: aaron.axvigs.com
Document Path: /Document Length: 44878 bytes
Concurrency Level: 1Time taken for tests: 0.092 secondsComplete requests: 1Failed requests: 0Total transferred: 45304 bytesHTML transferred: 44878 bytesRequests per second: 10.87 [#/sec] (mean)Time per request: 92.023 [ms] (mean)Time per request: 92.023 [ms] (mean, across all concurrent requests)Transfer rate: 480.77 [Kbytes/sec] received
Connection Times (ms) min mean[+/-sd] median maxConnect: 3 3 0.0 3 3Processing: 89 89 0.0 89 89Waiting: 86 86 0.0 86 86Total: 92 92 0.0 92 92
45KB of data transfered. This doesn't really match what Firefox shows in F12 (18KB transfered, 62KB size), so I am confused. Anyways, now let's run it 5000 times.
user@hostname:~/$ ab -n 5000 -c 50 https://aaron.axvigs.com/This is ApacheBench, Version 2.3 <$Revision: 1923142 $>Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking aaron.axvigs.com (be patient)Completed 500 requestsCompleted 1000 requests<snip>Completed 5000 requestsFinished 5000 requests
Server Software: nginx/1.22.1Server Hostname: aaron.axvigs.comServer Port: 443SSL/TLS Protocol: TLSv1.3,TLS_AES_256_GCM_SHA384,256,256Server Temp Key: X25519 253 bitsTLS Server Name: aaron.axvigs.com
Document Path: /Document Length: 44878 bytes
Concurrency Level: 50Time taken for tests: 189.289 secondsComplete requests: 5000Failed requests: 3 (Connect: 0, Receive: 0, Length: 3, Exceptions: 0)Non-2xx responses: 3Total transferred: 226385060 bytesHTML transferred: 224255867 bytesRequests per second: 26.41 [#/sec] (mean)Time per request: 1892.886 [ms] (mean)Time per request: 37.858 [ms] (mean, across all concurrent requests)Transfer rate: 1167.95 [Kbytes/sec] received
Connection Times (ms) min mean[+/-sd] median maxConnect: 2 270 1141.2 3 35655Processing: 85 1491 2484.0 1450 60003Waiting: 83 1488 2484.0 1448 60003Total: 88 1761 2747.3 1473 63081
Percentage of the requests served within a certain time (ms) 50% 1473 66% 1519 75% 1563 80% 1614 90% 2281 95% 3852 98% 7524 99% 15358100% 63081 (longest request)
Three VMs are involved in servicing the requests to my desktop PC.
- Application server
- nginx/fast-cgi/php-fpm
- Physical host was Dell Optiplex SFF with Intel i7-8700 (6 cores 3.2GHz).
- 2 CPUs, runs at 50% during the test. Possible single-threaded issue here.
- 1GiB RAM, 80% used. No change when testing starts.
- Database server
- Physical host was QOTOM Everything 1U server with Intel Atom C3758R (8 cores 2.4GHz).
- 3 CPUs, runs at 80-100% during the testing and 5-10% normally.
- 16GiB RAM. Disk activity doesn't change so presumably the relevant parts of the database are entirely in RAM.
- Network traffic jumps up to 25MB/s (200Mbps) according to Proxmox.
- Reverse proxy server
- nginx
- Physical host was Supermicro E300 with Intel Atom C3558 (4 cores @2.2GHz).
- 2 CPUs, runs at 15 percent during testing and 2% normally.
- 512MiB RAM, no change in usage for testing.
- 1.5MB/s of network bandwidth.
Yeah the physical hosts are nothing amazing. They aren't heavily loaded by other VMs at least. 5-10% average CPU usage.
It appears to be limited by the database server. This normally sits at 5-10% CPU usage, but runs at 100% during the test. 28 somethings per second seems alright.
Testing with some software that actually loads all the page resources is on my to-do list.
