# Proxy cache make system load and I/O high

**URL:** <https://www.ruby-forum.com/t/proxy-cache-make-system-load-and-i-o-high/200806>\
**Category:** NGINX\
**Created:** [December 22, 2010, 2:10pm UTC](https://www.ruby-forum.com/t/proxy-cache-make-system-load-and-i-o-high/200806 "2010-12-22T14:10:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikuSESS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f17d59/32.png) [@nikuSESS](https://www.ruby-forum.com/u/nikuSESS)\
**Post date:** [December 22, 2010, 2:10pm UTC](https://www.ruby-forum.com/t/proxy-cache-make-system-load-and-i-o-high/200806/1 "2010-12-22T14:10:48Z")

</div>

Hi, all:

This really exhaust me.

I had an nginx server with “proxy cache” 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 “load average” is almost to “3”, and the I/O of  
the  
cache disk is “1000KB/s”, and with lots of connections “TIME\_OUT”. 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.  
But I had a same server with “proxy store” on, and the num of cache  
files is  
also 500K. But on this server, even with 1000 connections, the “load  
average” is never up to “0.3”, and the I/O for read is just up to  
“200KB/s”,  
and all connections are in a “ESTABLISHED” or “FIT\_WAIT” status.

My question is :

1. Why with so less connections, the I/O is still so high?
2. What other operation does “proxy cache” do opposite to “proxy  
store”?  
Aren’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 “load average”.

---

<div class="post-metadata">

**Author:** ![eagle\_sbc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/919ad9/32.png) [@eagle\_sbc](https://www.ruby-forum.com/u/eagle_sbc)\
**Post date:** [December 22, 2010, 2:22pm UTC](https://www.ruby-forum.com/t/proxy-cache-make-system-load-and-i-o-high/200806/2 "2010-12-22T14:22:43Z")

</div>

On Wed, Dec 22, 2010 at 9:09 PM, eagle sbc [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> But I had a same server with “proxy store” on, and the num of cache files  
> different on the “load average”.

I also made a test that using memory to make a tmpfs, and locate the  
cache  
all in memory. And the ‘load average’ performance is then down to ‘0.3’.  
But  
my server can only spare 1.5G memory for the tmpfs, and even with  
‘max\_size=1G’ configured, nginx doesn’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’s wired. Is  
that my  
new writes too frequent than the recycle?
