Re: Process size..

From: Dancer <dancer@dont-contact.us>
Date: Fri, 12 Nov 1999 12:26:30 +1100

Scott Hess wrote:
>
> Marc-Adrian Napoli <marcadrian@cia.com.au> wrote:
> > How can I stop linux from them swapping out? I've heard that disk
> swapping
> > is a big no no on a box running squid... so I assumed that if you
> assigned
> > all the memory to squid, it wouldn't attempt to swap out on itself.
>
> No! Swapping is based on frequency of access to the memory. You'll have
> the same number of requests with a small memory footprint or a large one -
> but with the small footprint, you'll probably hit all of your memory much
> more frequently than with a large footprint. Say you only use cache_mem of
> 4M, you might churn through the entire 4M every second. cache_mem of 500M
> might take a couple minutes, so there's a higher chance of some of that
> 500M getting swapped out (because the OS thinks it can do better things
> with that memory).
>
> OTOH, it _is_ more efficient to serve pages out of cache_mem. So if you
> have tons of memory, it probably does pay to raise it from the defaults.
> I'd just be leery of raising it too far.
>
> On the gripping hand, you might be able to tell your OS to not swap Squid,
> either explicitely, or by some trick (such as telling it to never use more
> than (total-squid) bytes of memory for filesystem buffers, or something of
> the sort).
>
> Later,
> scott

You could modify it to call mlockall()...but if it ever _does_ exceed
your physical ram, it's (insert rude adjective here) lethal.

D
Received on Thu Nov 11 1999 - 18:41:37 MST

This archive was generated by hypermail pre-2.1.9 : Wed Apr 09 2008 - 11:57:32 MDT