Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Mar 2005 16:12:52 +0100
From:      "Colin J. Raven" <colin@kenmore.kozy-kabin.nl>
To:        Jerry McAllister <jerrymc@clunix.cl.msu.edu>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Illogical usage of swap
Message-ID:  <20050316154932.F2949@kenmore.kozy-kabin.nl>
In-Reply-To: <200503161447.j2GEl8A27507@clunix.cl.msu.edu>
References:  <200503161447.j2GEl8A27507@clunix.cl.msu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 16 at 09:47, Jerry McAllister commented:

>>
>> "Colin J. Raven" <colin@kenmore.kozy-kabin.nl> writes:
>>
>>> On Mar 16 at 07:29, Lowell Gilbert launched this into the bitstream:
>>
>>>> http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/misc.html#TOP-FREEMEM
>>>
>>> Hmm, yeah I should have included what I've actually read in the
>>> handbook and elsewhere. In fact I did read that exerpt you quoted the
>>> URL for  above sometime previously, when it was quoted in another
>>> thread on the list.
>>>
>>> Free memory (or the lack thereof) isn't the issue though.
>>>
>>> The issue is this:
>>> Swap: 8192M Total, 116K Used, 8192M Free
>>> and that's the piece of the puzzle that has us all utterly baffled.
>>
>> The same logic applies to some extent, though.
>>
>>> No way in creation this box should be swapping.
>>
>> I have noticed that FreeBSD 5.x is swapping out small amounts of
>> memory in situations (as near I can tell; it is quite hard to be sure
>> that the situation is really identical) where 4.x was not.  I haven't
>> really tried to track down exactly what's going on, but it's always
>> been less than the text segment of any task in the system, so I was
>> pretty sure I wasn't seeing a problem.
>
> Swap space is also used for paging.   If you are running through some
> big file or have processes that are live but not active, they can
> use up some page space.   That space just stays there until it is
> needed otherwise.   At least that is my understanding.

With 4GB of RAM to chew on, I must say this surprises me more than a 
bit. Recalling earlier in this thread, I said the box that this one 
replaced had dual Athlon MP's (forget what speed) and 1GB of RAM. It 
*never* swapped. It ran 4.10, then later upgraded to 5.3.

We couldn't do 5.3 on this box because some controllers on the mobo 
weren't (yet) supported, so we elected to install 4.11. Then we took 
some jobs away from this server and reassigned 'em elsewhere (only 
because of the delay in sourcing the replacement) . So - purely 
theoretically - this server *should* have been sitting around less than 
fully tasked. It is way more powerful (by significant orders of 
magnitude) CPU-wise, has four times as much - and faster - memory, a 
faster FSB, SATA instead of ATA drives, 4.11-and-not-the-bleeding-edge-choice-of-OS.

What I'm saying is that (almost) any of these factors taken individually 
should show a fairly relaxed, under-tasked errr..."happy" box. Take the 
cumulative effect of the rather healthy upgrade and this box should be 
sitting around picking its nose so to speak, and watching TV because it 
has so little to do...hell we took work *away* from it.

Except it swaps...sometimes as much as 2MB, mostly around 100 - 350K.

I bring this to the list only because of the utterly insane nature of 
the situation. It's as if you replaced your 333MHZ 256MB/memory Dell 
Dimension with a dual 3.0 Xeon/4GB HP Kayak (or equivalent) workstation, 
then in the middle of reading email you suddenly hear it writing to 
disk, check your taskmanager and discover to your absolute horror that 
the thing is swapping......

We have no custom apps running here, only stuff that comes right out of 
the ports tree. We're running email, DNS (BIND9)+PowerDNS, various A/V 
and antispam packages, screen, pine, mc, apache, perl, php, mysql, 
Courier IMAP, Postfix....absolutely nothing unusual that isn't run every 
day in hundreds of thousands of production environments. The custom 
stuff that *does* have the potential (but never did so on the old lower 
powered box) to use up memory has been moved off to another server or 
two.

So there we have it....the mystery continues :) Thanks for your 
ongoing interest and curiosity.

Regards,
-Colin
--
Colin J. Raven
Wed Mar 16 16:10:00 CET 2005





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050316154932.F2949>