[squid-users] How can I get Squid to use more memory?

From: Ralph Lawrence <ralphlaw_at_gmail.com>
Date: Sun, 30 Oct 2011 11:35:39 -0400

Hi,

How do I get Squid to use all my server memory as a cache and keep as
many objects as possible in there?

Squid is a great piece of software. I've been studying it's
configuration for the last few days now and I'm really impressed with
what I've seen.

We have a fairly complex reverse proxy configuration building. I am
now building the first ( of eventually many ) load-balanced Squid
servers. Each Squid reverse proxy has 2GB of ram and *only* runs
Squid. Absolutely nothing else will be on the server. The actually
site being cached is under 1GB in size on disk. So conceptly Squid
should be able to cache the entire site in memory and we should only
see TCP_MEM_HIT in logs right?

But right now, even under load the user is reporting Squid is using
13MB of memory and we're seeing a lot of TCP_HIT as opposed to
TCP_MEM_HIT. How can we change this?

My config looks like...

# Feel free to use as much as needed
cache_mem 1200 MB

# Keep all the memory used
memory_pools on

# Don't let a few files hog memory. We don't have many large files
anyway, but just in case
maximum_object_size_in_memory 2048 KB

# Replacement policy
cache_replacement_policy heap LFUDA

Thanks,
Ralph
Received on Sun Oct 30 2011 - 15:35:47 MDT

This archive was generated by hypermail 2.2.0 : Sun Oct 30 2011 - 12:00:03 MDT