nginx-0.7.52

Igor Sysoev is at rambler-co.ru
Wed Apr 22 10:20:00 MSD 2009


On Wed, Apr 22, 2009 at 11:12:39AM +0800, Weibin Yao wrote:

> > Could you add
> 
> > open_file_cache          max=1000  inactive=20s;
> > open_file_cache_valid    30s;
> > open_file_cache_min_uses 2;
> > open_file_cache_errors   on;
> 
> > and run just
> 
> > ab.exe -k -n 10000 -c 1
> 
> > to see if CreateFile() adds noticeable overhead ?
> 
> I have tested it with above configration, and there is nothing in the error.log. 
> 
> C:\Program Files\Apache Software Foundation\Apache2.2\bin>ab.exe -k -n 10000 -
> 1 http://127.0.0.1/

> Requests per second:    5714.29 [#/sec] (mean)

Without open_file_cache:

ab.exe -k -n 10000 -c 1 http://127.0.0.1/
Requests per second:    2424.24 [#/sec] (mean)
CPU load: about 68%

It seems that CreateFile() is really heavy syscall: using open_file_cache
increases twice the number of requests. In this case nginx saves 4 syscalls:

*) CreateFile() while index files testing,
*) and CreateFile()/GetFileAttributesEx/CloseHandle().


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list