AIO cause memory leak

Igor Sysoev igor at
Wed Dec 30 18:17:31 MSK 2009

On Wed, Dec 30, 2009 at 04:09:59PM +0800, Tony wrote:

> I got the memory leak error on my linux server when I added 'aio on;' in 
> my nginx.conf,
> The os is fedora 11(x86-64) and gentoo(x86-64),The kernel is 2.6.29+.
> I've already set 'directio 2m; sendfile on; ' into nginx.conf.
> The server is only serving static flv contents, These is 50-100MBytes 
> each flv file.
> When 'aio on' is setting, the server's 4G memory and 2G swap were 
> consumed by nginx, work_processes just 4.
> When I disable aio, each nginx processes used 30M memory only.
> When aio is used, I know it should disable sendfile and use directio, 
> Why it use so many memory?

It's a known bug. I will fix it in January.

Igor Sysoev

More information about the nginx mailing list