12
« on: October 12, 2014, 06:41:19 PM »
At some point it will make sense to evolve the server toward using Varnish, PHP-FPM, nginx or Apache with the event MPM, dedicated VPS instead of shared, more memory, etc. The biggest gain will be from using Varnish to handle any massive traffic spikes from Reddit or the like. Since Varnish doesn't support HTTPS and the site is only HTTPS, that means using something like pound, HAProxy, nginx (for SSL termination, some people run an "nginx sandwich" with Varnish in the middle), or whatever else is out there.
However, since the site is still in its infancy and isn't receiving enough traffic to crush the VPS, I'm comfortable leaving it in its current configuration. Right now the server uses PHP via the FCGID (FastCGI) module, not as an Apache DSO module, and does have a variety of tweaks in place to help with performance. As does Drupal.
If you up the number of connections to make in your ApacheBench command, you'll see the server is well equipped to handle many requests per second. I haven't done extensive testing, and ApacheBench itself has issues since it only requests the HTML page and doesn't request any resources referenced in the HTML page, but even so:
[ghoul@server ~]$ ab -n 500 -c 20 'https://satanninja.com/about/the-comic'
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking satanninja.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Finished 500 requests
Server Software: Apache
Server Hostname: satanninja.com
Server Port: 443
SSL/TLS Protocol: TLSv1/SSLv3,AES256-SHA,2048,256
Document Path: /about/the-comic
Document Length: 11342 bytes
Concurrency Level: 20
Time taken for tests: 5.721 seconds
Complete requests: 500
Failed requests: 0
Write errors: 0
Total transferred: 5945500 bytes
HTML transferred: 5671000 bytes
Requests per second: 87.39 [#/sec] (mean)
Time per request: 228.851 [ms] (mean)
Time per request: 11.443 [ms] (mean, across all concurrent requests)
Transfer rate: 1014.84 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 101 156 266.5 116 3120
Processing: 31 60 100.3 47 1056
Waiting: 30 58 100.4 45 1055
Total: 142 217 284.5 165 3188
Percentage of the requests served within a certain time (ms)
50% 165
66% 171
75% 176
80% 179
90% 195
95% 385
98% 1171
99% 1188
100% 3188 (longest request)
[ghoul@server ~]$