3

What are the advantages/differences in using either of these in nginx? Are they to be used separately or can they be used together? I noticed nginx added file AIO in its latest stable release and I'm curious as to what this does for performance.

Thanks

Jared
  • 33
  • 1
  • 4

2 Answers2

3

AIO on Linux is horribly broken by design. Nginx supports it, but you probably don't want to use it since you can't use the disk cache at the same time. See this nginx mailing list thread for a bit more info, especially the reply, courtesy of nginx author Igor Sysoev. Basically, you will want to run a lot of nginx worker processes instead of using AIO on Linux. I run 10 worker processes per core on a system serving 45 Mbit/s of static files (mostly from cache).

rmalayter
  • 3,762
  • 20
  • 28
1

AIO is asynchronous input/output. It's for file accessing.
Epoll is a polling mechanism like kqueue and select. It's for event handling.

Basically they're two different things and can be used simultaneously to achieve different things.

Martin Fjordvald
  • 7,749
  • 1
  • 30
  • 35