<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Dear Maxim,</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">
Thanks for your response,</div><div class="gmail_default" style="font-family:tahoma,sans-serif">I don't think it will help much since all of my files are larger enough than 2MB</div><div class="gmail_default" style="font-family:tahoma,sans-serif">
<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Regarding AIO problem in linux, do you think using AIO + sendfile together on FreeBSD will be better in performance in my case?</div><div class="gmail_default" style="font-family:tahoma,sans-serif">
<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Respect</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">
<div style="text-align:center"><span style="font-family:tahoma,sans-serif"><br></span></div><div style="text-align:center"><span style="font-family:tahoma,sans-serif">======================</span>======================</div>
<div><div><div><div><div><div><div><div><font face="tahoma, sans-serif"></font><font face="tahoma, sans-serif"></font></div></div></div></div></div></div></div></div></div></div>
<br><br><div class="gmail_quote">On Mon, Jun 10, 2013 at 3:25 PM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello!<br>
<div><div class="h5"><br>
On Sun, Jun 09, 2013 at 07:24:49PM +0430, Host DL wrote:<br>
<br>
> Hello Maxim,<br>
><br>
> Thanks for your response, and sorry that I am new to mailing list and my<br>
> 1st message may was not very clear to you<br>
><br>
> I've already read all posts in this conversation and all tuning options has<br>
> been tested<br>
><br>
> I'm using 8x 2TB SATA ENT in RAID10 level + 64G RAM on my box<br>
> CentOS 5.9 x64_84 / 2.6.18-348.6.1.el5<br>
><br>
> nginx.conf:<br>
><br>
> worker_priority -10;<br>
> worker_processes 64;<br>
> worker_rlimit_nofile 20000;<br>
><br>
> events {<br>
>     worker_connections  2048;<br>
>     use epoll;<br>
>     worker_aio_requests 128;<br>
> }<br>
><br>
> http {<br>
>     sendfile     off;<br>
>     tcp_nopush     on;<br>
>     tcp_nodelay on;<br>
>     aio on;<br>
>     directio    2m;<br>
>     #directio_alignment 4k;<br>
>     output_buffers 1 1m;<br>
><br>
>     keepalive_timeout  15;<br>
><br>
>     ......<br>
> }<br>
><br>
> During the peak time connections will reach up to 14-15K in total and more<br>
> than 1Gbit/s outgoing throughput<br>
> Please note that the server was stable with about 12K connections in the<br>
> peak time and about 1-1.1Gbit/s throughput but after adding another VH with<br>
> about 2-3K connections it seems that server is unable to handle the request<br>
> properly at the peak time<br>
> Its expected the throughput to exceed the previous ~1.1Gbit/s rate but it<br>
> doesn't, Even it doesn't reach to 1Gbit/s while the connections are now<br>
> getting more and bigger<br>
><br>
> During every peak time the LA will each to the number of nginx workers ( 64<br>
> for my current config ) and will stay at the same rate to the end of peak<br>
> time, all processes are in D state and the interesting thing, memory is not<br>
> being used fully and it may push about 30-40G with about 20-30% I/O wait<br>
<br>
</div></div>Main problem with AIO on Linux is that it requires directio to<br>
actually work asynchronously.  I would assume you've just reached<br>
a critical number of synchronous requests to disks as due to<br>
"directio 2m" in your config (and that's why you see all workers<br>
in D state).  Try tuning directio to a lower value to see if it<br>
helps.<br>
<br>
Note well: memory is not used for filesystem cache with directio,<br>
so there is no surprise it's not being used fully.<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Maxim Dounin<br>
<a href="http://nginx.org/en/donation.html" target="_blank">http://nginx.org/en/donation.html</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div>