<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Here's the output of "iostat -d 60 2"<br>Device:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tps&nbsp;&nbsp; Blk_read/s&nbsp;&nbsp; Blk_wrtn/s&nbsp;&nbsp; Blk_read&nbsp;&nbsp; Blk_wrtn<br>sda&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 85.58&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4947.94&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2619.30&nbsp; 593632866&nbsp; 314252346<br><br>Device:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tps&nbsp;&nbsp; Blk_read/s&nbsp;&nbsp; Blk_wrtn/s&nbsp;&nbsp; Blk_read&nbsp;&nbsp; Blk_wrtn<br>sda&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 114.41&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8395.93&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 339.01&nbsp;&nbsp;&nbsp;&nbsp;
 503840&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20344<br><br>here's the output of vmstat<br>procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----<br>&nbsp;r&nbsp; b&nbsp;&nbsp; swpd&nbsp;&nbsp; free&nbsp;&nbsp; buff&nbsp; cache&nbsp;&nbsp; si&nbsp;&nbsp; so&nbsp;&nbsp;&nbsp; bi&nbsp;&nbsp;&nbsp; bo&nbsp;&nbsp; in&nbsp;&nbsp; cs us sy id wa<br>&nbsp;0&nbsp; 1&nbsp;&nbsp;&nbsp; 332&nbsp; 63136 628344 6085040&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp; 617&nbsp;&nbsp; 324&nbsp;&nbsp; 17&nbsp;&nbsp; 27&nbsp; 1&nbsp; 4 88&nbsp; 6<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Dennis Jacobfeuerborn &lt;dennisml@conversis.de&gt;<br><b><span style="font-weight: bold;">To:</span></b> nginx@nginx.org<br><b><span style="font-weight:
 bold;">Sent:</span></b> Thu, October 14, 2010 7:54:26 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: Image Hosting<br></font><br>
Ah, sorry I somehow didn't catch that last line with the actual HW setup.<br><br>If my math skills don't fail me (and they very well might) the traffic and <br>image size data mean that you serve about 300 images per second.<br>Can you post a few lines of vmstat output and perhaps the output of "iostat <br>-d 60 2"?<br><br>Also how are the hits distributed across the whole pool of images? Are <br>these hits truly random or are some images hit significantly more often <br>than others?<br><br>More ram would obviously take some pressure off the disks if they are <br>really the problem.<br><br>Regards,<br>&nbsp;  Dennis<br><br>On 10/14/2010 02:26 PM, <a ymailto="mailto:iptablez@yahoo.com" href="mailto:iptablez@yahoo.com">iptablez@yahoo.com</a> wrote:<br>&gt; Actually the image size is arround 100KB each. The server is running in 250Mbps traffic.<br>&gt; I already described the disk I'm using is scsi 15K RPM in raid 0<br>&gt;<br>&gt;<br>&gt; Sent from my
 BlackBerry®<br>&gt; powered by Sinyal Kuat INDOSAT<br>&gt;<br>&gt; -----Original Message-----<br>&gt; From: Dennis Jacobfeuerborn&lt;<a ymailto="mailto:dennisml@conversis.de" href="mailto:dennisml@conversis.de">dennisml@conversis.de</a>&gt;<br>&gt; Date: Thu, 14 Oct 2010 14:23:26<br>&gt; To:&lt;<a ymailto="mailto:nginx@nginx.org" href="mailto:nginx@nginx.org">nginx@nginx.org</a>&gt;<br>&gt; Reply-To: <a ymailto="mailto:nginx@nginx.org" href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>&gt; Subject: Re: Image Hosting<br>&gt;<br>&gt; But if those 5,000 req/s each hit a different 1mb image then you need to<br>&gt; read 5gb of data from you storage which if your storage is just a plain old<br>&gt; sata disk is going to be a huge problem.<br>&gt;<br>&gt; Unfortunately Indo Php is not providing nearly enough information to give<br>&gt; any sort of advice. If he is lucky then putting lots of ram in the machine<br>&gt; for pagecache can help here if the
 cache hit ratio is good but if it is not<br>&gt; then he probably has to distribute the I/O across more spindles and go for<br>&gt; a raid with lots of disks.<br>&gt;<br>&gt; Regards,<br>&gt;&nbsp; &nbsp;  Dennis<br>&gt;<br>&gt; On 10/14/2010 10:33 AM, SplitIce wrote:<br>&gt;&gt; Hmm well talking from experience nginx can serve upwards of 5,000 req/s for<br>&gt;&gt; static files if configured right. Ill leave this for Igor or someone more<br>&gt;&gt; expericed to reply to.<br>&gt;&gt;<br>&gt;&gt; On Thu, Oct 14, 2010 at 7:28 PM, Indo Php&lt;<a ymailto="mailto:iptablez@yahoo.com" href="mailto:iptablez@yahoo.com">iptablez@yahoo.com</a><br>&gt;&gt; &lt;mailto:<a ymailto="mailto:iptablez@yahoo.com" href="mailto:iptablez@yahoo.com">iptablez@yahoo.com</a>&gt;&gt;&nbsp; wrote:<br>&gt;&gt;<br>&gt;&gt;&nbsp; &nbsp; &nbsp; i tried to use AIO, but it seems my server is getting slower<br>&gt;&gt;<br>&gt;&gt;&nbsp; &nbsp; &nbsp;
 ---------------------------------------------------------------------------<br>&gt;&gt;&nbsp; &nbsp; &nbsp; *From:* SplitIce&lt;<a ymailto="mailto:mat999@gmail.com" href="mailto:mat999@gmail.com">mat999@gmail.com</a>&lt;mailto:<a ymailto="mailto:mat999@gmail.com" href="mailto:mat999@gmail.com">mat999@gmail.com</a>&gt;&gt;<br>&gt;&gt;&nbsp; &nbsp; &nbsp; *To:* <a ymailto="mailto:nginx@nginx.org" href="mailto:nginx@nginx.org">nginx@nginx.org</a>&lt;mailto:<a ymailto="mailto:nginx@nginx.org" href="mailto:nginx@nginx.org">nginx@nginx.org</a>&gt;<br>&gt;&gt;&nbsp; &nbsp; &nbsp; *Sent:* Thu, October 14, 2010 2:47:55 PM<br>&gt;&gt;&nbsp; &nbsp; &nbsp; *Subject:* Re: Image Hosting<br>&gt;&gt;<br>&gt;&gt;&nbsp; &nbsp; &nbsp; Try any of these:<br>&gt;&gt;&nbsp; &nbsp; &nbsp; 1) Compile nginx with AIO support<br>&gt;&gt;&nbsp; &nbsp; &nbsp; 2) Try directio option<br>&gt;&gt;&nbsp; &nbsp; &nbsp; 3) Try sendfile option<br>&gt;&gt;<br>&gt;&gt;&nbsp; &nbsp; &nbsp; On
 Thu, Oct 14, 2010 at 6:36 PM, Indo Php&lt;<a ymailto="mailto:iptablez@yahoo.com" href="mailto:iptablez@yahoo.com">iptablez@yahoo.com</a><br>&gt;&gt;&nbsp; &nbsp; &nbsp; &lt;mailto:<a ymailto="mailto:iptablez@yahoo.com" href="mailto:iptablez@yahoo.com">iptablez@yahoo.com</a>&gt;&gt;&nbsp; wrote:<br>&gt;&gt;<br>&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hi there,<br>&gt;&gt;<br>&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; we have an image hosting, and of course we're using Nginx!<br>&gt;&gt;<br>&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Now on we're having problem with disk i/o. With 200GB of images.<br>&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Is there any recommendation for this matter? Nginx configuration or<br>&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Hardware/other software configuration?<br>&gt;&gt;<br>&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; We already used Dual Quad Core 3Ghz, 8 GB RAM, 6x73GB 15k SCSI
 server<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _______________________________________________<br>&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nginx mailing list<br>&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a ymailto="mailto:nginx@nginx.org" href="mailto:nginx@nginx.org">nginx@nginx.org</a>&lt;mailto:<a ymailto="mailto:nginx@nginx.org" href="mailto:nginx@nginx.org">nginx@nginx.org</a>&gt;<br><span>&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a target="_blank" href="http://nginx.org/mailman/listinfo/nginx">http://nginx.org/mailman/listinfo/nginx</a></span><br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;&nbsp; &nbsp; &nbsp; _______________________________________________<br>&gt;&gt;&nbsp; &nbsp; &nbsp; nginx mailing list<br>&gt;&gt;&nbsp; &nbsp; &nbsp; <a ymailto="mailto:nginx@nginx.org" href="mailto:nginx@nginx.org">nginx@nginx.org</a>&lt;mailto:<a ymailto="mailto:nginx@nginx.org"
 href="mailto:nginx@nginx.org">nginx@nginx.org</a>&gt;<br>&gt;&gt;&nbsp; &nbsp; &nbsp; <a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; --<br><span>&gt;&gt; Warez Scene&lt;<a target="_blank" href="http://thewarezscene.org">http://thewarezscene.org</a>&gt;&nbsp; Free Rapidshare Downloads</span><br><span>&gt;&gt; &lt;<a target="_blank" href="http://www.nexusddl.com">http://www.nexusddl.com</a>&gt;</span><br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; _______________________________________________<br>&gt;&gt; nginx mailing list<br>&gt;&gt; <a ymailto="mailto:nginx@nginx.org" href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>&gt;&gt; <a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; nginx mailing
 list<br>&gt; <a ymailto="mailto:nginx@nginx.org" href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>&gt; <a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>&gt; _______________________________________________<br>&gt; nginx mailing list<br>&gt; <a ymailto="mailto:nginx@nginx.org" href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>&gt; <a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br><br><br>_______________________________________________<br>nginx mailing list<br><a ymailto="mailto:nginx@nginx.org" href="mailto:nginx@nginx.org">nginx@nginx.org</a><br><a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br></div></div>
</div><br>

      </body></html>