are the images served through PHP? if so make them static and it will increase thoughrougput by tons.<br><br>Additionally you could possibly reduce worker_processes to 4-6 to reduce context switching.<br><br><div class="gmail_quote">
On Tue, Sep 20, 2011 at 12:29 AM, dullnicker <span dir="ltr"><<a href="mailto:nginx-forum@nginx.us">nginx-forum@nginx.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Dear all,<br>
<br>
I run nginx as stand-alone webserver (not as Apache proxy) on an image<br>
gallery website. The server has to handle up to 1,200 concurrent<br>
connections on Port 80, the average number throughout the day is around<br>
500-600. During peak times, the server suffers a bit under its load and<br>
I wonder whether there is anything that I can do to decrease the load by<br>
tuning the nginx config. I should add that Apache went nuts handling the<br>
site and therefore nginx is already a great relief to have. The site has<br>
just around 3,000 unique visitors but up to 250,000 pageviews per day.<br>
<br>
Here are the relevant server specs:<br>
--------------------------------------------<br>
4 cores at 2.1 GHz<br>
1 GB RAM (average free RAM is around 800 MB even during peak times)<br>
<br>
Here is my current nginx.conf:<br>
-------------------------------------<br>
<br>
user              nginx nginx;<br>
worker_processes  8; # default: 2<br>
<br>
<br>
error_log       logs/error.log;<br>
<br>
pid               logs/nginx.pid;<br>
<br>
events {<br>
    worker_connections  2048; # default: 1024<br>
}<br>
<br>
http {<br>
    include       mime.types;<br>
    default_type  application/octet-stream;<br>
    client_max_body_size 64M;<br>
    sendfile        on;<br>
    tcp_nopush      on;<br>
<br>
    keepalive_timeout  20; #default: 3<br>
<br>
    gzip  on;<br>
    gzip_comp_level 2;<br>
    gzip_proxied any;<br>
    gzip_types      text/plain text/css application/x-javascript<br>
text/xml application/xml application/xml+rss text/javascript;<br>
<br>
    server_tokens off;<br>
<br>
    include /etc/nginx/conf.d/*;<br>
}<br>
<br>
Here are the fastcgi settings (The gallery is heavily PHP-driven):<br>
------------------------------------------------------------------------------<br>
<br>
   include fastcgi_params;<br>
    fastcgi_intercept_errors on;<br>
    fastcgi_index index.php;<br>
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br>
    try_files $uri =404;<br>
    fastcgi_pass <a href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a>;<br>
<br>
I would appreciate your comments and suggestions a lot - Thank you very<br>
much in advance!<br>
<br>
Kind regards<br>
-A<br>
<br>
Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?2,215383,215383#msg-215383" target="_blank">http://forum.nginx.org/read.php?2,215383,215383#msg-215383</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br>