It's copy-on-write.
The swap is a write-to-disk.
There's no such thing as sharing memory between one process on disk(/swap)
and another in memory.

You'll also want to look into tuning your paging algorithm.
This will hold swapping at bay longer.
The paging algorithm USED to be configurable with a bunch of kernal params
(params.(h|c)) stuff like PAGEHANDSFREE but I really don't know anymore.

HTH,

-Josh

-----Original Message-----
From: Ask Bjoern Hansen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 7:17 PM
To: Graham TerMarsch
Cc: Bill Marrs; [EMAIL PROTECTED]
Subject: Re: loss of shared memory in parent httpd


On Tue, 12 Mar 2002, Graham TerMarsch wrote:

[...]
> We saw something similar here, running on Linux servers.  Turned out to be
> that if the server swapped hard enough to swap an HTTPd out, then you
> basically lost all the shared memory that you had.  I can't explain all of
> the technical details and the kernel-ness of it all, but from watching our
> own servers here this is what we saw on some machines that experienced
> quite a high load.
>
> Our quick solution was first to reduce some the number of Mod_perls that
> we had running, using the proxy-front-end/modperl-back-end technique,

You should always do that. :-)

> and then supplemented that by adding another Gig of RAM to the
> machine.
>
> And yes, once you've "lost" the shared memory, there isn't a way to get it
> back as "shared" again.  And yes, I've also seen that when this happens
> that it could full well take the whole server right down the toilet with
> it (as then your ~800MB of shared memory becomes ~800MB of _physical_
> memory needed, and that could throw the box into swap city).

I forwarded this mail to one of the CitySearch sysadmins who had
told about seeing this.  He is seeing the same thing (using kernel
2.4.17), except that if he disables swap then the processes will get
back to reporting more shared memory.  So maybe it's really just
GTop or the kernel reporting swapped stuff in an odd way.

No, I can't explain the nitty gritty either. :-)

Someone should write up a summary of this thread and ask in a
technical linux place, or maybe ask Dean Gaudet.


 - ask

--
ask bjoern hansen, http://ask.netcetera.dk/         !try; do();



------------------------------------------------------------------------------
This message is intended only for the personal and confidential use of the designated 
recipient(s) named above.  If you are not the intended recipient of this message you 
are hereby notified that any review, dissemination, distribution or copying of this 
message is strictly prohibited.  This communication is for information purposes only 
and should not be regarded as an offer to sell or as a solicitation of an offer to buy 
any financial product, an official confirmation of any transaction, or as an official 
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or 
error-free.  Therefore, we do not represent that this information is complete or 
accurate and it should not be relied upon as such.  All information is subject to 
change without notice.


Reply via email to