# Which OS best for file serving? Does file AIO increase performance significantly?

**URL:** <https://www.ruby-forum.com/t/which-os-best-for-file-serving-does-file-aio-increase-performance-significantly/210979>\
**Category:** NGINX\
**Created:** [August 22, 2011, 4:58pm UTC](https://www.ruby-forum.com/t/which-os-best-for-file-serving-does-file-aio-increase-performance-significantly/210979 "2011-08-22T16:58:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [August 22, 2011, 4:58pm UTC](https://www.ruby-forum.com/t/which-os-best-for-file-serving-does-file-aio-increase-performance-significantly/210979/1 "2011-08-22T16:58:47Z")

</div>

Hi,

I’m interested in setting up Nginx server for image serving, mostly  
small images such as icons or thumbnails.

Usually I use Linux, but I understand that file AIO doesn’t work on  
Linux. A few questions:

1. How much performance increase does file AIO realistically provide for  
file serving - 10%? 50%? 100%?

2. If the performance increase is significant, which OS do you recommend  
for file AIO - FreeBSD, NetBSD, Open BSD, OpenSolaris?

3. Is it a steep learning curve moving from Linux to one of the  
aforementioned OS?

Thanks.

Posted at Nginx Forum:

> **[Which OS best for file serving? Does file AIO increase performance...](https://forum.nginx.org/read.php?2,214148,214148#msg-214148)**
>
> Hi, I'm interested in setting up Nginx server for image serving, mostly small images such as icons or thumbnails. Usually I use Linux, but I understand that file AIO doesn't work on Linux. A few questions: 1) How much performance increase does file...

---

<div class="post-metadata">

**Author:** ![andy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@andy](https://www.ruby-forum.com/u/andy)\
**Post date:** [August 23, 2011, 9:05am UTC](https://www.ruby-forum.com/t/which-os-best-for-file-serving-does-file-aio-increase-performance-significantly/210979/2 "2011-08-23T09:05:55Z")

</div>

在 2011-08-22一的 10:58 -0400，Andy写道：

> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

Why do you think that File AIO not work on GNU/Linux?

In nginx website(ABOUT page),it says: "File AIO (FreeBSD 4.3+, Linux  
2.6.22+); "

–  
Best regards,  
Sharl.Jimh.Tsin (From China **Obviously Taiwan INCLUDED** )

Using Gmail? Please read this important notice:  
[Gmail — Free Software Foundation — Working together for free software](http://www.fsf.org/campaigns/jstrap/gmail?10073).

---

<div class="post-metadata">

**Author:** ![andy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@andy](https://www.ruby-forum.com/u/andy)\
**Post date:** [August 23, 2011, 9:51am UTC](https://www.ruby-forum.com/t/which-os-best-for-file-serving-does-file-aio-increase-performance-significantly/210979/3 "2011-08-23T09:51:03Z")

</div>

In my experience (very similar usage to you) aio on freebsd made slim to  
no difference over standard setup on Linux so I stuck with Linux which  
is what I know best

---

<div class="post-metadata">

**Author:** ![andy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@andy](https://www.ruby-forum.com/u/andy)\
**Post date:** [August 23, 2011, 9:12am UTC](https://www.ruby-forum.com/t/which-os-best-for-file-serving-does-file-aio-increase-performance-significantly/210979/4 "2011-08-23T09:12:06Z")

</div>

On Tue, Aug 23, 2011 at 03:05:01PM +0800, Sharl.Jimh.Tsin wrote:

> > file serving - 10%? 50%? 100%?
> > 
> > * * *
> > 
> > nginx mailing list  
> > [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)
> 
> Why do you think that File AIO not work on GNU/Linux?
> 
> In nginx website(ABOUT page),it says: "File AIO (FreeBSD 4.3+, Linux  
> 2.6.22+); "

nginx supports Linux AIO. However, Linux AIO works only together with  
O\_DIRECT, that means that all I/O must be aligned to sector boundary  
(usually 512 bytes) and are not cached by the kernel.

–  
Igor S.
