Subject: Re: BSD and swapping
To: Jason R Thorpe <thorpej@zembu.com>
From: Paul Robinson <paul@akitanet.co.uk>
List: netbsd-users
Date: 10/03/2000 09:55:34
On Mon, 02 Oct 2000, Jason R Thorpe wrote:
> On Mon, Oct 02, 2000 at 02:35:57PM -0700, Jeremy C. Reed wrote:
>  > I read (exim mailing list) that "... Linux tries to avoid using swap at
>  > all costs, *BSD will swap out processes that have been idle for "X"
>  > amount of time ...".
>
> That is flatly incorrect.  NetBSD won't swap out a process that has been
> idle for "X" amount of time.  It only selects processes for swapping when
> absolutely necessary.

I'll hold my hands up on this one - I was the person on the exim mailing list 
that stated this. OK, the reason I said this, was purely out of experience 
with OpenBSD and older Linux kernels. FreeBSD doesn't appear to do this 
(however I hammer my FBSD boxes, so they would never get the chance), and 
I've never actually used NetBSD (somebody cc'ed me in, and yes, I promise 
I'll try it soon, it's the only *BSD I haven't used yet, etc.) so was meant 
as a sweeping generalisation when comparing OpenBSD to Linux.

In the past what I've seen is service machines in a cluster running OpenBSD 
(back then I think it 2.4) fronted with load balancing hardware. The machines 
would typically be running say Zeus, or a custom ftpd as a daemon and that 
would be about all the traffic going through that machine. If you tried using 
any service that used inetd, you would often find it would take a good 45-60 
seconds for say telnetd to wake up. When we investigated, we found that if 
you didn't use an inetd service for about a week (common in this 
environment), inetd would just get swapped out to free up memory for Zeus or 
qpopper, or Exim, or whatever.

Sorry if I've caused any confusion, but this is what I saw, plain and simple. 
If somebody can suggest what drugs I might have been taking to cause me to 
hallucinate, please forward your comments to my doctor. :-)

Does that make what I was trying to get across to a load of mail admins any 
clearer? Incidentally, the original argument was as to whether using a 
different typr of mail spool (say maildir over mbox) would cause more 
swapping, or whether sendmail or exim swaps more. My point was that it's all 
to do with the policy of the underlying OS, not the applications that sit 
upon the OS. Therefore, the generalisation was kinf of appropriate for that 
list, completely ridiculous for this one (of which I am not a member).

--
 Paul Robinson  -----------------------------------------------------------
 ______________/ Technical Director @ Akitanet -- http://www.akita.co.uk/  |
| Sales:-  T: +44 1869 337088  F: +44 1869 337488  E: sales@akitanet.co.uk |
| Techs:-  T: +44 161 228 6388 F: +44 161 228 6387 E: root@akitanet.co.uk  |
|--------------------------------------------------------------------------|
| PO Box 604, Manchester, M60 3PR / Centerpoint, Deddington, Oxon, OX15 0SG|
|__________________________________________________________________________|