Nginx IO blocks - only me?

Hi

Have been monitoring the performance of a typical WP test site on a Linode 2C/4GB node. The performance is strange - although the resources are almost completely free - CPU, memory, disk IO stats changing only a bit, the performance in time to first byte when loading the site 2-3 instances in parallel.

  1. Nginx works well, requests are not passed to PHP
  2. Seems like the stuff that makes it slow is the images? maybe static files in general
  3. Given that resources are almost free, I guess there is some block in the system - perhaps IO block
  4. Debian 8.6, updated

Am I the only one seeing it? I think the default Nginx setup and configuration might not be optimal or maybe the OS page cache not working well?

As a comparison, my old shared hosting account on Hostgator doesn’t have this problem at all. They are using Apache + Nginx as a reverse Proxy

Hello @treelicker, what wordpress stack do you use currently with easyengine ?

Debian Jessie + the default EE installation

I was talking about the ee site create options : – wp – wp --php7 – wpredis –wpfc –w3tc

oh, right, w3tc + php7 I can create a new one for test

You should give a try with --wpredis + php7. If you want to optimize your server settings, you can find my current configuration files on : https://git.virtubox.net/virtubox/debian-config

But why is this related? I’m accessing a specific image file multiple times and it results in much higher first time bytes - it shouldn’t be like that

No it shouldn’t with Nginx, if Apache have issues with static files, it’s not the case with Nginx. Does your image delivered directly by Nginx, or by a php script ?

as far as I can tell, Nginx itself - no PHP is fired during the process Can you link to one site that works on your configuration, so I could see if it happens there too?

Anyway, I’ll try your config - maybe I crapped something in the conf files

anystack.xyz, jesuisadmin.fr, virtubox.net

thx, I’ll check

Good prices too!!

It’s no help.

Something gets problematic when ssl is on - it’s like the server is loaded for some reason (though resources are almost free) - loading multiple images (on different tabs) result in very high first byte time…

Any clue?

Can you perform this quick benchmark :

bash <(wget -O - https://git.virtubox.net/virtubox/vps-benchmark/raw/master/sysbench.sh)

Running the test with following options: Number of threads: 1

Doing CPU performance benchmark

Threads started! Done.

Maximum prime number checked in CPU test: 20000

Test execution summary: total time: 32.9481s total number of events: 10000 total time taken by event execution: 32.9458 per-request statistics: min: 3.22ms avg: 3.29ms max: 9.30ms approx. 95 percentile: 3.42ms

Threads fairness: events (avg/stddev): 10000.0000/0.00 execution time (avg/stddev): 32.9458/0.00

sysbench 0.4.12: multi-threaded system evaluation benchmark

128 files, 40960Kb each, 5120Mb total Creating files for the test… sysbench 0.4.12: multi-threaded system evaluation benchmark

Running the test with following options: Number of threads: 1 Initializing random number generator from timer.

Extra file open flags: 0 128 files, 40Mb each 5Gb total file size Block size 16Kb Number of random requests for random IO: 0 Read/Write ratio for combined random IO test: 1.50 Periodic FSYNC enabled, calling fsync() each 100 requests. Calling fsync() at the end of test, Enabled. Using synchronous I/O mode Doing random r/w test Threads started! Time limit exceeded, exiting… Done.

Operations performed: 651699 Read, 434466 Write, 1390208 Other = 2476373 Total Read 9.9441Gb Written 6.6294Gb Total transferred 16.574Gb (56.571Mb/sec) 3620.54 Requests/sec executed

Test execution summary: total time: 300.0008s total number of events: 1086165 total time taken by event execution: 76.0706 per-request statistics: min: 0.00ms avg: 0.07ms max: 39.99ms approx. 95 percentile: 0.14ms

Threads fairness: events (avg/stddev): 1086165.0000/0.00 execution time (avg/stddev): 76.0706/0.00

sysbench 0.4.12: multi-threaded system evaluation benchmark

Tried several test sites, now. It happens only with with HTTPS on, using your ssl conf part… Something isn’t working right - maybe it’s something in the OS or maybe the Nginx configuration

How can I test this?