Re: [squid-users] Cache_mem, squid performance

From: Adrian Chadd <adrian@dont-contact.us>
Date: Mon, 4 Dec 2006 23:08:23 +0800

On Mon, Dec 04, 2006, Nguyen, Khanh, INFOT wrote:
> Hi,
>
> I have a question about cache_mem, hope that someone has some insight
> about it.
>
> I run squid 2.6 on AS linux 4, update 3. My server has 8 GB memory, 20
> GB virtual memory, 50 GB hard disk for squid cache.

If the OS is paging, either because the system is running low on memory
or the OS is paging stuff out 'in case' it needs to allocate some memory
at a future time then this'll certainly happen.

Try some profiling and watch the output of 'vmstat 1' to see whether it
does page.

> Is it true that allocating large cache_mem would decrease the
> performance of the cache server? For example, I was told that with 3 GB,
> load is 400 r/s, with 2 GB, load is 1200 r/s, object size is 1-100KB.
> That is 3 times difference. It goes against common sense that memory
> would help performance, not hurt. Maybe cache_mem works differently and
> the more it has, the worst the squid performs. Or something in the load
> generator which makes it worst. In which condition, more memory will be
> worst? What would be the best number for cache_mem?

It shouldn't be performing any worse with more cache_mem. I've certainly
not seen any measurable performance difference between 512meg and 1 gigabyte
of cache_mem. I'm unable to test this assumption as I just don't have
servers with that much RAM available (and if anyone would like to donate
to the Squid project so I could have such a server available then
I'd be very grateful and also be able to post actual performance figures
on the Wiki..)

There's certainly an issue with CPU usage with larger objects held in memory
but only if you try caching large objects - say, above a megabyte.

Adrian

-- 
- Xenion - http://www.xenion.com.au/ - Hosting and Commercial Squid Support -
Received on Mon Dec 04 2006 - 08:07:23 MST

This archive was generated by hypermail pre-2.1.9 : Mon Jan 01 2007 - 12:00:01 MST