C
C
ciedooy2017-09-18 10:43:46
PHP
ciedooy, 2017-09-18 10:43:46

Nginx + php-fpm giving 500 requests/second?

Hello. I took two VDS with the following parameters:
RAM: 2 GB
DISK: 40 GB SSD
CORE: 2
Provider Vscale.
Both are in the same subnet. One for the web server, the second for blocking web server requests.
The load was made by the siege utility, the command is the following siege -c 1000 -b -t 30s domain.name/phpinfo.php
Nginx has 4 workers. PHP has 20 pools, but it didn’t really matter to me, at least 5, at least 100 pools + Opcache is enabled.
When accessing a php file with phpinfo() output, an average of 500 requests / second.
When accessing an html file, an average of 7000 requests / second.
What is wrong with others with the same testing for php at 5k requests / second, with even smaller machine characteristics? The smaller one is t2.micro Amazon EC2.
PS >> Tried to configure both nginx and php in different ways.
PS >> PHP 7.1
PS >> Changed phpinfo() output to just "Hello World" and got 7513.13 trans/sec

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
PrAw, 2017-09-18
@ciedooy

They may be to blame:
1. Testing methodology - was it tested with a completely empty index.php or something more complicated?
2. It would be interesting to see the results of TOP / IOTOP, it is quite possible that the speed of the hard disk or processor overload was tested in case of overselling
, the server characteristics seem to be enough, but in reality the problem may have been in the connection to mysql

D
DrunkMaster, 2017-09-18
@DrunkMaster

Yes, something is not enough, I just have php 5.6 without fpm and gave the settings 1300 per second. Profiling of the script was done, how long does it generally work on its own?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question