Добрый день! Возникла странность при тестировании производительности
nginx+fast cgi. Есть скрипт:
$cat /usr/local/www/nginx/string.php
<?php
print "1234567890123456";
?>
И nginx,
1).
...
location ~ \.php$ {
root /usr/local/www/nginx;
fastcgi_pass 127.0.0.1:8888;
fastcgi_param SCRIPT_FILENAME $request_filename
$fastcgi_script_name;
}
...
ab -c 500 -n 2000 'http://77.xx.xx.xx/string.php'
...
Requests per second: 929.23 [#/sec] (mean)
Time per request: 538.081 [ms] (mean)
...
2).
...
location ~ \.php$ {
fastcgi_pass 127.0.0.1:8888;
fastcgi_param SCRIPT_FILENAME /usr/local/www/nginx
$fastcgi_script_name;
}
...
ab -c 500 -n 2000 'http://77.xx.xx.xx/string.php'
...
Requests per second: 2996.59 [#/sec] (mean)
Time per request: 166.857 [ms] (mean)
...