aio info

Igor Sysoev igor at sysoev.ru
Fri May 6 14:50:17 MSD 2011


On Fri, May 06, 2011 at 09:37:12AM +0000, Richard Kearsley wrote:
> Is aio used while reading files from proxy_cache?

Yes, it works. For FreeBSD I recommend this settings:

    sendfile     on;
    aio          sendfile;
    tcp_nopush   on;
    read_ahead   512k;

> I test aio on a file every 1s (it should be in ram buffers, so no disk io needed)
> Usually it takes 1ms (or lower), but sometimes it spikes to over a second if disks are really busy
> The max_aio_queue doesn't go above 3-4 during test
> Any ideas the cause of spikes?

May be locks on VFS level. You can try this:

    open_file_cache   max=5000  inactive=20s;
    open_file_cache_valid       30s;
    open_file_cache_min_uses    3;


-- 
Igor Sysoev



More information about the nginx mailing list