Author Topic: slow server performance  (Read 7360 times)

666threesixes666

  • Ninja Initiate
  • *
  • Posts: 14
    • View Profile
slow server performance
« on: October 12, 2014, 02:20:50 AM »
you guys might want to get nginx / pound / stunnel (ssl/tls termination) + varnish (or squid reverse proxy) going, or straight up nginx + fpm + fpm caching going.  your page renderings are crawling.

ab -n 20 -c 20 https://satanninja.com/about/the-comic

Requests per second:    8.92 [#/sec] (mean)
Transfer rate:          103.58 [Kbytes/sec] received




this is nginx + fpm with out caching involved:

ab -n 20 -c 20 http://127.0.0.1/drupal/index.php

Document Path:          /drupal/index.php

Requests per second:    89.48 [#/sec] (mean)



apache dso is slow, you might want to ditch it, & become c10k compliant.  this is my experimental wiki with varnish + nginx + fpm.  (sorry i don't have varnish configured for drupal yet.  i'm still a drupal newb, and the drupal module only supports up to 3.x, ive got 4.x going on here.)  (other nginx note, it doesn't support .htaccess and drupal uses that all over the place.)

ab -n 20 -c 20 http://127.0.0.1:8080/wiki/index.php

Requests per second:    5275.65 [#/sec] (mean)

above polite test, below rude test (5000 concurrent hits at once)

ab -n 5000 -c 5000 http://127.0.0.1:8080/wiki/index.php

Requests per second:    8699.03 [#/sec] (mean)

Rijst

  • Ninja Master
  • ****
  • Posts: 570
    • View Profile
Re: slow server performance
« Reply #1 on: October 12, 2014, 03:23:46 AM »
I had a job interview recently and was described as slightly geeky (but in a good way). Since I have no idea what you're saying here I'm probably one of the lesser geeks in the world..

The question is, do they have access to all of this?
Quote from: "The Boy" (Bad-Ass Ninjas)
I read on the internet that ninjas are hungry, you want some food?

Adam Dravian

  • The Writer
  • Administrator
  • *****
  • Posts: 875
    • View Profile
Re: slow server performance
« Reply #2 on: October 12, 2014, 09:19:06 AM »
I'm right there with you, Rijst.

I'll bring this to Ghoul's attention. The website never seems to load that slowly to me, but we've had a couple friends of ours say it's really slow for them, so it's definitely something to look into.

Michigander1911

  • Rad Ninja
  • ***
  • Posts: 211
    • View Profile
Re: slow server performance
« Reply #3 on: October 12, 2014, 12:48:11 PM »
I've never had a problem even on  my slow connection at work. 
Sonny Crockett: Man, it's so hot you could fry an egg on my face.  Det. Ricardo Tubbs: Hope I never get that hungry.

Ghoul

  • Weblord
  • Administrator
  • *****
  • Posts: 24
    • View Profile
    • Satan Ninja 198X
Re: slow server performance
« Reply #4 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:

Code: [Select]
[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 ~]$