Nginx IO blocks - only me?


#1

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


#2

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


#3

Debian Jessie + the default EE installation


#4

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


#5

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


#6

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


#7

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


#8

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 ?


#9

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


#10

anystack.xyz, jesuisadmin.fr, virtubox.net


#11

thx, I’ll check

Good prices too!!


#12

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?


#13

Can you perform this quick benchmark :

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

#14

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


#15

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?


#16