Welcome! Log In Create A New Profile

Advanced

Re: Bad perfomance with nginx and php-fpm

Jérôme Loyet
November 18, 2011 02:34AM
2011/11/17 Dieter Knopf <dieterknopf@googlemail.com>:
> 2011/11/17 Jérôme Loyet <jerome@loyet.net>:
>> can you test by setting pm = static and pm.max_children to something a
>> little bit hight than 10 (12 or 15).
>> Just to ensure the problem does not come from the dynamic PM.
>
> Sure. I just tested it with 20 children:
> Time taken for tests:   24.580 seconds
> Complete requests:      1000
> Failed requests:        859
>   (Connect: 0, Receive: 0, Length: 859, Exceptions: 0)
>
> The same result :-(
>
> This sould be far better with 20 php daemons, it must be another
> problem, like a timeout or something like that?

what page are you requesting ?

Start by requesting a very simple PHP page (<?php echo "toto; ?>).
It's a good start to figure out what's going on.

Here is what I have with a very short and simple page (20 static
children on FPM PHP 5.3 trunk and nginx 1.1.4)

fat@dev:~/web$ ab -c 10 -n 1000 http://xxxxxxxxxx/pwd.php
Server Software: nginx/1.1.4
Server Hostname: xxxxxx
Server Port: 80

Document Path: /pwd.php
Document Length: 22 bytes

Concurrency Level: 10
Time taken for tests: 0.649 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 175000 bytes
HTML transferred: 22000 bytes
Requests per second: 1539.96 [#/sec] (mean)
Time per request: 6.494 [ms] (mean)
Time per request: 0.649 [ms] (mean, across all concurrent requests)
Transfer rate: 263.18 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.4 0 5
Processing: 0 6 2.6 6 37
Waiting: 0 6 2.6 6 37
Total: 1 6 2.9 6 42

Percentage of the requests served within a certain time (ms)
50% 6
66% 6
75% 7
80% 7
90% 7
95% 7
98% 12
99% 19
100% 42 (longest request)


Then increase the size the PHP page returns (ex: 64k --> <?php echo
str_pad("", 1024*64, "x"); ?>)

fat@dev:~/web$ ab -c 10 -n 1000 http://xxxxxxx/size.php
Server Software: nginx/1.1.4
Server Hostname: xxxxxxx
Server Port: 80

Document Path: /size.php
Document Length: 65536 bytes

Concurrency Level: 10
Time taken for tests: 1.242 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 65689000 bytes
HTML transferred: 65536000 bytes
Requests per second: 805.17 [#/sec] (mean)
Time per request: 12.420 [ms] (mean)
Time per request: 1.242 [ms] (mean, across all concurrent requests)
Transfer rate: 51651.05 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.4 0 5
Processing: 1 12 2.9 12 34
Waiting: 1 12 2.9 12 32
Total: 1 12 3.0 12 37

Percentage of the requests served within a certain time (ms)
50% 12
66% 13
75% 14
80% 14
90% 16
95% 17
98% 18
99% 20
100% 37 (longest request)

Then increase the complexity (size, CPU, memory, fork, database requests, ....)

>
> Thanks
>
> Dieter
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Bad perfomance with nginx and php-fpm

Dieter Knopf November 17, 2011 12:30PM

Re: Bad perfomance with nginx and php-fpm

Joe November 17, 2011 12:48PM

Re: Bad perfomance with nginx and php-fpm

Dieter Knopf November 17, 2011 05:00PM

Re: Bad perfomance with nginx and php-fpm

Jérôme Loyet November 17, 2011 12:56PM

Re: Bad perfomance with nginx and php-fpm

Dieter Knopf November 17, 2011 05:04PM

Re: Bad perfomance with nginx and php-fpm

Edho Arief November 17, 2011 10:14PM

Re: Bad perfomance with nginx and php-fpm

Jérôme Loyet November 18, 2011 02:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 241
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready