On Jan 28, 2008 10:59 AM, eliott &lt;<a href="mailto:eliott@cactuswax.net">eliott@cactuswax.net</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On 1/28/08, <a href="mailto:rkmr.em@gmail.com">rkmr.em@gmail.com</a> &lt;<a href="mailto:rkmr.em@gmail.com">rkmr.em@gmail.com</a>&gt; wrote:<br>&gt; this is my config for a web server that does only static files mostly gifs,<br>
&gt; pngs and jpgs.. is there any improvement i can do in this like is there some<br>&gt; sort of caching that can be enabled? or any other improvements that can be<br>&gt; done to this..<br>&gt;<br>&gt; ------------------------------------------------------------------<br>
&gt; #user &nbsp;mark;<br>&gt; worker_processes &nbsp;1;<br>&gt; error_log &nbsp;logs/error_staticfarm.log;<br>&gt;<br>&gt; pid &nbsp; &nbsp; &nbsp; &nbsp;logs/nginx_staticfarm.pid;<br>&gt; events {<br>&gt; &nbsp; &nbsp; worker_connections &nbsp;1024;<br>&gt; &nbsp;}<br>&gt;<br>
&gt; http {<br>&gt; &nbsp; &nbsp; include &nbsp; &nbsp; &nbsp; mime.types;<br>&gt; &nbsp; &nbsp; default_type &nbsp;application/octet-stream;<br>&gt;<br>&gt; &nbsp; &nbsp; #access_log &nbsp;logs/access_staticfarm.log;<br>&gt;<br>&gt; &nbsp; &nbsp; sendfile &nbsp; &nbsp; &nbsp; &nbsp;on;<br>&gt; &nbsp; &nbsp; #tcp_nopush &nbsp; &nbsp; on;<br>
&gt;<br>&gt; &nbsp; &nbsp; keepalive_timeout &nbsp;0;<br>&gt; &nbsp; &nbsp; &nbsp;#keepalive_timeout &nbsp;10;<br>&gt;<br>&gt; &nbsp; &nbsp; gzip &nbsp;on;<br>&gt; &nbsp; &nbsp; server {<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; listen &nbsp; &nbsp; &nbsp; 6080;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; server_name &nbsp;localhost;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; #access_log &nbsp;logs/host.access.log &nbsp;main;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; location /nginx_status {<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;stub_status on;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; access_log &nbsp; off;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; location /static{<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; root &nbsp; /home/mark/staticfarm/;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; access_log &nbsp; off;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&gt; &nbsp; &nbsp; }<br>&gt; }<br>&gt;<br><br><br></div></div>If you have more than one cpu, you could up the worker_processes to<br>match the number of cpus you have. Depends on the traffic load you are</blockquote>
<div><br>is this number of cpus or number of cores? if I have two quad cores, <br>worker_process = 8<br><br>is this right?<br> </div></div>