<div dir="ltr"><div><div><div><div>We've got similar setup to you, 1db server, 3 www servers (App clustering), 5 content servers(nginx-1.2.1) for static content i.e (jpg,flv,mp4) but we don't have a separate conversion server, conversion and streaming is served by these 5 content servers and we've 32Gb Ram with Raid10 Sas drives and 1Gbps port for each of the content server and also got one large content storage server with slow HDD i.e software Raid.<br>
<br></div><div>Please keep in mind that all the servers are using linux(centos-6).<br></div><div><br></div>1. So should i disable aio for centos 6 ?<br></div>2. What about sendfile, should i keep it off for all content servers?<br>
</div>3. Can i enable aio for storage server ?<br><br></div>Best Regards.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 5, 2013 at 11:53 AM, Cristian Rusu <span dir="ltr"><<a href="mailto:crirus@gmail.com" target="_blank">crirus@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello<br><br>It looks like you'r eon my spot right now.<br>I learned directio is useless for large files as it set nginx to skip caching for anything larger than 512 Kb.<br>
If you have enough RAM (128MB maybe) you get to cache videos and avoid reading from HDD each time.<br>
Some other people here said aio is not ideally either at least on Centos, they said about FreeBSD but I have to google a bit on that.<br><br>I made it work using more servers, alrge one with slow HDDs for storage and fast server with SSD for caching.<br>
<br>So I have a setup of 1 www, 1 mysql, 2 storage, 2 edge servers and 2 converter servers each dealing with their specific tasks.<br>It works fine for 10Gbit and about 2500 users per second.<br><br clear="all"><div>---------------------------------------------------------------<br>
Cristian Rusu<br>Web Developement & Electronic Publishing<br><br>======<br>Crilance.com<br><a href="http://Crilance.blogspot.com" target="_blank">Crilance.blogspot.com</a><br></div>
<br><br><div class="gmail_quote"><div><div class="h5">On Mon, Feb 4, 2013 at 7:38 PM, shahzaib shahzaib <span dir="ltr"><<a href="mailto:shahzaib.cb@gmail.com" target="_blank">shahzaib.cb@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<div dir="ltr"><div><div>Hello,<br><br></div> I followed this post <a href="http://stackoverflow.com/questions/11250798/best-file-system-for-serving-1gb-files-using-nginx-under-moderate-write-read-p" target="_blank">http://stackoverflow.com/questions/11250798/best-file-system-for-serving-1gb-files-using-nginx-under-moderate-write-read-p</a> to optimize nginx for large static files i.e (flv,mp4) and enabled aio on nginx config which you can see below, and after enabling aio, directio, and output_buffers, i could notice(iostat -x -d 3) that cpu util% got higher from 10.00 to 35.00 and svctime got reduced to 1.00 from 4.00. So i came to the conclusion that after enabling these directives , the i/o util% starts getting higher and svctime start getting reduced. <br>
<br>1.Can someone guide me if aio directive helps improving nginx flv stream, if yes than why it is utilizing too much hard-disk? <br></div>2. Reducing the svctime(iostat -x -d 3) for i/o is a good thing or not ?<br><div>
<div><div><div><br><br>http {<br> include mime.types;<br> default_type application/octet-stream;<br> client_body_buffer_size 128K;<br> sendfile_max_chunk 128k;<br> access_log off;<br> sendfile off;<br>
client_header_timeout 3m;<br> client_body_timeout 3m;<br><br>server {<br> listen 80;<br> server_name <a href="http://domain.com" target="_blank">domain.com</a>;<br> client_max_body_size 800m;<br>
limit_rate 100k;<br>
<br><br> location / {<br> root /var/www/html/content;<br> index index.html index.htm index.php;<br> <br>}<br>location ~ \.(flv|jpeg|jpg)$ {<br> flv;<br> root /var/www/html/content;<br>
aio on;<br> directio 512;<br> output_buffers 1 8m;<br> expires 15d;<br> valid_referers none blocked <a href="http://domain.com" target="_blank">domain.com</a>;<br>
if ($invalid_referer) {<br> return 403;<br> }<br> }<br><br><br></div><div>Best Regards.<br></div></div></div></div></div>
<br></div></div>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">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></blockquote></div><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></blockquote></div><br></div>