Okay I've crossed 4000 (consistently between 4100 and 4200) now but I had a couple of questions.<br><br>First of all, I'm using <a href="http://sysoev.ru/nginx/nginx-0.6.29.tar.gz">nginx-0.6.29.tar.gz</a> from <a href="http://sysoev.ru/nginx/download.html">http://sysoev.ru/nginx/download.html</a> .. I build it from source. I don't understand the Russian on that site but it seems to me<br>
that this is a developement version? Is this stable to use in production?<br><br>Secondly I noticed something strange with gzip_static on. If I have this in my conf and I have a file indexd12.htm as well as indexd12.htm.gz in the root then even though I have<br>
indexd12.htm.gz it still picks up indexd12.htm .. However when I delete indexd12.htm , then the server rightly sends back indexdh1.htm.gz .. According to <a href="http://wiki.codemongers.com/NginxHttpGzipStaticModule">http://wiki.codemongers.com/NginxHttpGzipStaticModule</a>,<br>
the server should be sending back indexd12.htm.gz even if there is an indexd12.htm in the directory. Any thoughts?<br><br>rkmr.em, this is my final config file (I also bumped up max allowed file descriptors in freebsd kernel):<br>
<br>worker_processes 5;<br>timer_resolution 100ms;<br><br><br>events {<br> worker_connections 1500;<br>}<br><br><br>http {<br> include mime.types;<br> default_type application/octet-stream;<br><br> sendfile on;<br>
tcp_nopush on;<br><br> keepalive_timeout 65;<br><br> gzip_static on;<br><br> gzip_http_version 1.1;<br> gzip_proxied expired no-cache no-store private auth;<br> gzip_disable "MSIE [1-6]\.";<br>
gzip_vary on;<br><br> open_file_cache max=10000 inactive=20s;<br> open_file_cache_valid 30s;<br> open_file_cache_min_uses 2;<br> open_file_cache_errors on;<br><br> server {<br> listen 8080;<br>
server_name localhost;<br><br> location / {<br> root /usr/local/www/data;<br> index indexd12.htm;<br> }<br> }<br><br>}<br><br><br><br><br><br><div class="gmail_quote">On Sat, Apr 5, 2008 at 5:47 PM, <a href="mailto:rkmr.em@gmail.com">rkmr.em@gmail.com</a> <<a href="mailto:rkmr.em@gmail.com">rkmr.em@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Aamer,<br>
Can you post final config that gave you 3900 reqs/second?<br>
thanks<br>
<div><div></div><div class="Wj3C7c"><br>
On Sat, Apr 5, 2008 at 1:21 PM, Amer Shah <<a href="mailto:amerrahman@gmail.com">amerrahman@gmail.com</a>> wrote:<br>
> Thanks for the feedback guys.<br>
><br>
> Apart from turning gzip_static, I did what you guys suggested and I'm up to<br>
> consistently 3900 Requests/Second in benchmarking.<br>
> Possibly with gzip_static, I can break the 4000 mark. Thanks guys !<br>
><br>
><br>
><br>
> On Sat, Apr 5, 2008 at 4:51 AM, Igor Sysoev <<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>> wrote:<br>
> ><br>
> ><br>
> ><br>
> > On Sat, Apr 05, 2008 at 03:55:47AM +0000, Amer wrote:<br>
> ><br>
> > > I wanted to run a particular configuration by you guys to get your<br>
> thoughts. I'm<br>
> > > moving from lighttpd to nginx.<br>
> > ><br>
> > > First a little bit of background. The site is a single server running<br>
> FreeBsd.<br>
> > > It's a Dual Processor Quad Core Xeon 5310 1.60GHz (Clovertown) with a 2<br>
> x 8MB<br>
> > > cache and 4 GB RAM. The site serves only static content. There is<br>
> absolutely<br>
> > > zero dynamic content. No databases involved. Each static file is about<br>
> 50 kb.<br>
> > ><br>
> > > I get about 3000-3500 requests/second with lightpd and with my initial<br>
> setup of<br>
> > > nginx I get about the same. While I'm happy with this I used a very<br>
> simple<br>
> > > config file and just wanted to see if the experienced folks over here<br>
> could<br>
> > > point out some things that might be able to boost that up even further.<br>
> It's<br>
> > > very simple and short (just about 20 lines) and I hope some of you could<br>
> give me<br>
> > > some advise to get more performance (if possible).<br>
> > ><br>
> > > ----------------------------------------------<br>
> > ><br>
> > > worker_processes 4;<br>
> > ><br>
> > > events {<br>
> > > worker_connections 1024;<br>
> > > }<br>
> > ><br>
> > > http {<br>
> > > include mime.types;<br>
> > > default_type application/octet-stream;<br>
> > ><br>
> > > sendfile on;<br>
> > > tcp_nopush on;<br>
> > ><br>
> > > keepalive_timeout 65;<br>
> > ><br>
> > > gzip on;<br>
> > > gzip_types text/plain text/html text/css<br>
> application/x-javascript<br>
> > > text/xml application/xml application/xml+rss<br>
> ext/javascript;<br>
> > ><br>
> > > server {<br>
> > > listen 80;<br>
> > > server_name localhost;<br>
> > ><br>
> > > location / {<br>
> > > root /usr/local/www/data;<br>
> > > index indexd12.html;<br>
> > > }<br>
> > ><br>
> > > error_page 404 /404.html;<br>
> > ><br>
> > > }<br>
> > > }<br>
> ><br>
> > As it was suggested, try to use gzip_static.<br>
> ><br>
> > Also, remove unused MIME types from gzip_types.<br>
> > There is no application/xml, application/xml+rss, and ext/javascript<br>
> > in default miem.types. The gzip modules tests Content-Type sequentially,<br>
> > so the shorter list is the better.<br>
> ><br>
> > You may need to increase worker_connections, 1024 mean that you are<br>
> > able to handle 4*1024 connections only. You also need to increase<br>
> > number of files, sockets, etc in kernel.<br>
> ><br>
> > If you do not need access_log, you may set it off.<br>
> > Or, you may use buffered log:<br>
> ><br>
> > http {<br>
> ><br>
> > access_log /path/to/log buffer=32k;<br>
> ><br>
> > Also you may marginally decrease number of syscalls using:<br>
> ><br>
> > timer_resolution 100ms;<br>
> ><br>
> > And finally use open file descriptor cache to decrease number of<br>
> > open()/stat()/close() syscalls:<br>
> ><br>
> > http {<br>
> ><br>
> > open_file_cache max=10000 inactive=20s;<br>
> > open_file_cache_valid 30s;<br>
> > open_file_cache_min_uses 2;<br>
> > open_file_cache_errors on;<br>
> ><br>
> ><br>
> > However, I do not think that all these settings will result in more<br>
> > requests/seconds in your environment.<br>
> ><br>
> ><br>
> > --<br>
> > Igor Sysoev<br>
> > <a href="http://sysoev.ru/en/" target="_blank">http://sysoev.ru/en/</a><br>
> ><br>
> ><br>
><br>
><br>
<br>
</div></div></blockquote></div><br>