Nyamul Hassan wrote:
Hi all,
This thread just raised another question on my mind. How would adding
another instance (in the same box) with "null cache_dir" improve my
performance? I'm a bit confused. Could you please explain a bit more?
I don't think it would improve performance per-se. It would meet your
criteria of "i would like the cache_dir to be common between the 2 squid".
Two squid running on the same box:
Squid-A has a large on-disk cache_dir
Squid-B has no disk cache, and sources all requests from Squid-A.
The overall effect is that only one copy of each cached object is held
on disk at that machine (in Squid-A's cache).
Since Squid-B passes on most requests to Squid-A, the actual response
is less than 2x, more like: up to 1.5x capacity of only squid-A.
It's up to you if the loss of ~25% response capacity is worth the
duplicate object removal.
There is no net gain in response timing, since the Squid-B -> Squid-A
request + Squid-A disk read, is usually slower than a disk read.
Off to performance:
for best performance, you cache small objects into COSS directories
and tune AUFS/DiskD to the OS type you are running on. Ensuring only one
disk spindle is used per cache_dir with as fast disks as you can buy.
Size doesn't matter, speed does.
Then pump up the machine memory as far as it can go and allocate as
many bytes to cache_mem as possible without causing any memory swapping
(particularly prevent swapping when under highest load).
Amos
Regards
HASSAN
----- Original Message ----- From: "Leonardo Rodrigues Magalhães"
<leolistas@xxxxxxxxxxxxxx>
To: <squid-users@xxxxxxxxxxxxxxx>
Cc: <shekharsahab14@xxxxxxxxx>
Sent: Thursday, February 26, 2009 08:11
Subject: Re: Two Squid with common cache
Amos Jeffries escreveu:
Shekhar Gupta wrote:
I was looking whether it would be possible or not . On a single server
if i install squid at two diff location however i would like the
cache_dir to be common between the 2 squid ???? is this possible to it
will have problem .
Not possible with any current squid. The cache_dir is only a part of
the cached data. Much is volatile and held in memory of the running
process.
anyway, with probably some minor config tweaking, you could have
your second squid instance running with null cache_dir and parent it to
the first squid instance.
it wouldnt be exactly '2 squid running on the same cache_dir', but
would give you the hit gains and disk space saving you're looking for.
--
Please be using
Current Stable Squid 2.7.STABLE6 or 3.0.STABLE13
Current Beta Squid 3.1.0.6