<br><br><div class="gmail_quote">2009/4/22 Igor Sysoev <span dir="ltr">&lt;<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>&gt;</span><br><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="h5">On Tue, Apr 21, 2009 at 04:43:05PM +0200, Roger Pack wrote:<br>
<br>
&gt; &gt; Nginx server in front could take care of. I&#39;d rather see something like<br>
&gt; &gt; Libevent (i.e. an asynchronous HTTP server engine) with embedded Python.<br>
&gt; &gt; The core of Nginx is probably similar to Libevent with its HTTP layer.<br>
&gt; &gt; Would be interesting to find out how Nginx core compares to Libevent<br>
&gt; &gt; with HTTP layer in terms of performance.<br>
&gt;<br>
&gt; Being somewhat of a newbie, just throwing this out.<br>
&gt; It would indeed be interesting to see if nginx with a libev core would<br>
&gt; be faster than the current (ex:<br>
&gt; <a href="http://www.zenebo.com/word/asynchronous-programming/lighttz-a-simple-and-fast-web-server/" target="_blank">http://www.zenebo.com/word/asynchronous-programming/lighttz-a-simple-and-fast-web-server/</a>)<br>
&gt;<br>
&gt; Though probably wouldn&#39;t be tons faster.<br>
&gt; Thoughts?<br>
<br>
</div></div>I do not think that using libev in nginx will change anything.<br>
<br>
Probably, the following settings may slightly improve or worsen:<br>
<br>
1) turing sendfile off: it may be not effective on small files.<br>
   Also not that lighttz does not read file at all each request.<br>
<br>
2) using open file cache, it saves 3 syscalls per request (open, fstat, close):<br>
<br>
open_file_cache          max=1000  inactive=20s;<br>
open_file_cache_valid    30s;<br>
open_file_cache_min_uses 2;<br>
open_file_cache_errors   on;<br>
<br>
3) using buffered log:<br>
<br>
access_log  /path/to/access.log  buffer=32k;<br>
<br>
or turing it off at all:<br>
<br>
access_log  off;<br>
<br>
4) using 1 worker.<br>
<font color="#888888"></font></blockquote><div><br> 1 worker for each core?<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><font color="#888888"><br>

--<br>
Igor Sysoev<br>
<a href="http://sysoev.ru/en/" target="_blank">http://sysoev.ru/en/</a><br>
<br>
</font></blockquote></div><br>