Re: [squid-users] Linux Memory Management

From: Joe Cooper <joe@dont-contact.us>
Date: Sun, 03 Mar 2002 15:47:59 -0600

It can't help /but/ take advantage of those things. User level programs
have no control over the OS buffer cache or VM layer. (Ok, there are
ways to explicitly avoid the OS buffer cache and VM, but it would be
foolish for Squid to go out of its way to avoid them. My point is that
it doesn't require any special 'support' for the OS buffer cache, for
Linux or any other OS.)

You're probably seeing Squid go into swap memory--this is either a Squid
misconfiguration on your part, or too little memory in the box on which
Squid is running. That's just a guess...there are a number of things
that can cause Squid to go slow, but I'm guessing that as your memory
fills--with cache index data and cache_mem--you're climbing beyond the
'real' memory of your system and parts of Squid get swapped out. This
simply kills performance. The only solution is to make Squid use less
memory or give it more memory to use. The most common source of similar
problems I see on this list are folks configuring an extremely high
cache_mem (remember this is only part of the memory that Squid will
use--and should not be anywhere near the full memory capacity of the
box) or configuring too large cache_dirs for the memory in the machine.
  Every GB of cache_dir requires about 10MB of free memory (this is just
a rule of thumb, not precise...) for the in-core index. So for 30GB of
cache_dir space configured you'll need 300MB of free mem, on top of what
you need for the rest of the OS, the Squid process+cache_mem, plus a
bunch of room for the OS buffer cache.

ryana@flashmail.com wrote:

> I mean does squid take advantage of the way Linux manages memory (buffering,
> caching)? Because I notice that after running squid for a couple hours on a
> fresh restart of the server, the performance drops down pretty low from
> where it was at the beginning, as far as transfer speeds go. Why is that?
>
> Ryan
> ryana@flashmail.com
>
> ----- Original Message -----
> From: "Joe Cooper" <joe@swelltech.com>
> To: <ryana@flashmail.com>
> Cc: <squid-users@squid-cache.org>
> Sent: Sunday, March 03, 2002 3:03 AM
> Subject: Re: [squid-users] Linux Memory Management
>
>
>
>>What do you mean by "Linux Memory Management"?
>>
>>I'm sure the answer is no, if you are asking if Squid does something
>>"special" with memory when the underlying OS kernel is Linux. But the
>>answer is certainly yes, if you're asking if Squid runs on Linux.
>>
>>ryana@flashmail.com wrote:
>>
>>
>>>Does Squid (2.4STABLE$) support Linux Memory Management?
>>>
>>--
>>Joe Cooper <joe@swelltech.com>
>>http://www.swelltech.com
>>Web Caching Appliances and Support
>>
>>
>>
>>
>
>
>
>

-- 
Joe Cooper <joe@swelltech.com>
http://www.swelltech.com
Web Caching Appliances and Support
Received on Sun Mar 03 2002 - 14:48:57 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:06:40 MST