Re: [squid-users] cache_dir on /dev/shm?

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Wed, 06 Feb 2013 15:01:32 -0700

On 02/06/2013 02:48 PM, Scott Baker wrote:
> I want to store all my cache dir on a ram disk. I have this in my config:
>
> cache_dir ufs /dev/shm/squid 1024 16 256
>
> Is there any reason NOT to do this?

Yes, memory cache is generally faster than any cache_dir cache.

> All the stuff in my cache is time
> sensitive (expires after 15 minutes) so I'm not worried about losing
> data, just worried about best practices.

If you do not need the cache to survive Squid crashes, use memory cache.

> cache_mem 1024 MB
>
> in my config. With ONLY this entry, everything results in a TCP_MISS.
> I'm guessing the cache_mem isn't used the same way as a cache_dir?

You need to figure out why Squid does not want to use your memory cache.
This will help even if you later decide to use a cache_dir in addition
to the memory cache (for some valid reason).

I do not know of a simple way to answer that question (I always look at
cache.log with high debug levels), but I hope others on this list do. If
that way does not exist, we should add code to Squid to support such
answers.

Good luck,

Alex.
Received on Wed Feb 06 2013 - 22:01:46 MST

This archive was generated by hypermail 2.2.0 : Thu Feb 14 2013 - 12:00:04 MST