<br><br><div class="gmail_quote">On Wed, Dec 22, 2010 at 9:09 PM, eagle sbc <span dir="ltr">&lt;<a href="mailto:sbc19861004@gmail.com">sbc19861004@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi, all:<br><div><br></div><div>This really exhaust me.</div><div><br></div><div>I had an nginx server with &quot;proxy cache&quot; on, the num of cache files is almost 500K, and the files size are all near 50K.  But now with just not up to 200 connections, the &quot;load average&quot; is almost to &quot;3&quot;, and the I/O of the cache disk  is &quot;1000KB/s&quot;, and with lots of connections &quot;TIME_OUT&quot;.  I add the $upstream_cache_status variable to the log, and in the result, 70% are not using proxy cache, 20% are missing and only 10% are hit. </div>

<div>But I had a same server with &quot;proxy store&quot; on, and the num of cache files is also 500K. But on this server, even with 1000 connections, the &quot;load average&quot; is never up to &quot;0.3&quot;, and the I/O for read is just up to &quot;200KB/s&quot;, and all connections are in a &quot;ESTABLISHED&quot; or &quot;FIT_WAIT&quot; status.</div>

<div><br></div><div>My question is :</div><div><ol><li>Why with so less connections, the I/O is still so high? </li><li>What other operation does &quot;proxy cache&quot; do opposite to &quot;proxy store&quot;? Aren&#39;t they all look up the file, and: if found, read file from disk; if not, proxy to the upstream server? While in fact they are so different on the &quot;load average&quot;.   </li>

</ol></div><div> </div><div><br>
</div>
</blockquote></div><br>I also made a test that using memory to make a tmpfs, and locate the cache all in memory. And the &#39;load average&#39; performance is then down to &#39;0.3&#39;. But my server can only spare 1.5G memory for the tmpfs, and even with &#39;max_size=1G&#39; configured, nginx doesn&#39;t recycle the files, but soon the filesystem is filling up(may be this is not correct, I seen some memory space freed, but if I configured the max_size=100G for the disk filesystem. when the cache using up to 1G, their also some disk space freed. So I think maybe may other configuration caused that recycle). That&#39;s wired. Is that my new writes too frequent than the recycle?<br>
<br>