-----Original Message-----
From: Alex Rousskov
Sent: Wednesday, February 06, 2013 11:01 PM
To: Scott Baker
Cc: squid-users_at_squid-cache.org
Subject: Re: [squid-users] cache_dir on /dev/shm?
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.
Better is to use cache_mem because this is the master cache used by all
squid instances when using SMP.
I have tested
1) With 5.000 users using 5GB tmpfs for each process ( 4 CPUs) 5GB by
CPU...
2) Dramatically increase cache_mem instead using cache_dir
30% faster for the second way....
Received on Thu Feb 14 2013 - 00:16:44 MST
This archive was generated by hypermail 2.2.0 : Thu Feb 14 2013 - 12:00:04 MST