Welcome! Log In Create A New Profile

Advanced

NginX + PHP 5.3.3 + FPM + APC is uber slow under debian, what could be the problem?

Posted by capcapara 
I've just installed the following:

nginx 0.7.65-2~bpo50+1
php5-fpm 5.3.3-0.dotdeb.0
php5-apc 5.3.3-0.dotdeb.0
php5-* 5.3.3-0.dotdeb.0

Enabled PHP support, it works, just ab gives helluva problematic results.

Command executed: ab -n 10000 -c 1 http://localhost/index.php

NGINX (41 secs)
[code]
Document Path: /index.php
Document Length: 82631 bytes

Concurrency Level: 1
Time taken for tests: 41.149 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 827890000 bytes
HTML transferred: 826310000 bytes
Requests per second: 243.02 [#/sec] (mean)
Time per request: 4.115 [ms] (mean)
Time per request: 4.115 [ms] (mean, across all concurrent requests)
Transfer rate: 19647.98 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.3 0 4
Processing: 0 4 4.9 4 268
Waiting: 0 2 5.0 0 268
Total: 0 4 4.9 4 268

Percentage of the requests served within a certain time (ms)
50% 4
66% 4
75% 4
80% 4
90% 4
95% 4
98% 8
99% 8
100% 268 (longest request)
[/code]

APACHE2 (1.3 sec)

[code]
Concurrency Level: 1
Time taken for tests: 1.329 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Non-2xx responses: 10000
Total transferred: 5630000 bytes
HTML transferred: 3210000 bytes
Requests per second: 7526.36 [#/sec] (mean)
Time per request: 0.133 [ms] (mean)
Time per request: 0.133 [ms] (mean, across all concurrent requests)
Transfer rate: 4138.03 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.2 0 4
Processing: 0 0 0.6 0 4
Waiting: 0 0 0.1 0 4
Total: 0 0 0.6 0 4

Percentage of the requests served within a certain time (ms)
50% 0
66% 0
75% 0
80% 0
90% 0
95% 0
98% 4
99% 4
100% 4 (longest request)
[/code]

nginx default virtualhost file modified:
[code]
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
[/code]

php5-fpm.conf changes:
[code]
listen.owner = www-data
listen.group = www-data

pm.max_children = 500
pm.start_servers = 20
pm.min_spare_servers = 5
pm.max_spare_servers = 150
pm.max_requests = 500

[/code]

The index.php simply calls phpinfo();. I'm bashing my head into the wall. What makes nginx+fastcgi fpm go so slow?

Thanks!
Damn apache2 was misconfigured. The same location gave 404 errors :P. Now I rerun the tests and nginx roxx big time.

Sorry :)
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 172
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