Nginx isn't as fast as i expect
somebody nobody
makdar at gmail.com
Thu Aug 16 14:16:12 MSD 2007
i have tested nginx and apache with the "ab" tool. This is my results:
Apache:
Requests per second: 6058.62 [#/sec]
Nginx:
Requests per second: 1170.02 [#/sec]
this is my nginx.conf:
@@@@@
user nobody nogroup;
worker_processes 10;
error_log logs/error.log;
pid logs/nginx.pid;
events {
worker_connections 512;
use eventport; #sol 10+
}
http {
include conf/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] $request '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log logs/access.log main;
sendfile off;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
#gzip on;
root /home/mywebsite;
index index.php;
client_max_body_size 128k;
client_body_buffer_size 128k;
server {
listen 80;
server_name www.mywebsite.com;
#access_log off;
#
# PHP
#
location / {
client_max_body_size 128k;
client_body_buffer_size 128k;
root /home/mywebsite;
index index.php index.html;
}
location ~ \.php$ {
include /nginx/conf/fcgi.conf;
fastcgi_pass unix:/tmp/fastcgi.socket;
fastcgi_index index.php;
}
error_page 404 /404.html;
location /404.html {
root /home/mywebsite;
charset on;
}
What can i do more to make it faster ??
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20070816/01264bdb/attachment.html>
More information about the nginx
mailing list