From owner-freebsd-security Tue Aug 10 16: 6:31 1999 Delivered-To: freebsd-security@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id 6C087154EE for ; Tue, 10 Aug 1999 16:06:19 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id QAA71254; Tue, 10 Aug 1999 16:05:39 -0700 (PDT) (envelope-from dillon) Date: Tue, 10 Aug 1999 16:05:39 -0700 (PDT) From: Matthew Dillon Message-Id: <199908102305.QAA71254@apollo.backplane.com> To: "Matthew D. Fuller" Cc: "Childers, Richard" , "'H. Eckert '" , "'freebsd-security@FreeBSD.ORG '" Subject: Re: 4 Swap partitions limit (was Re: RE: Little question (offtopic)) References: <199908102243.PAA70944@apollo.backplane.com> <19990810175550.A2750@futuresouth.com> Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org :> You can compile up a kernel that allows more then four, but even :> having four will almost certainly going to be overkill. : :How so? Your example below is a case in point, though I don't know the uptime on your box. What is the use of having lots of swap partitions which never get used? You are just wasting a significant amount of kernel memory to hold the management structures, especially if the swap parittions are not balanced. Yours are not. Even if you set NSWAP to exactly 5 the rlist (under STABLE) that the kernel allocates to manage swap allocation in your configuration is going to be massively fragmented. Under CURRENT the bitmap radix tree will also eat significantly more memory then it really needs to. But STABLE is going to be the worst off. With the rlist that fragmented, if you ever use more then around 130MB x 5 = 500MB of swap space (out of the 2G you have allocated), swapin operations will begin to degrade due to the scanning overhead on the rlist. I recommend reducing the swap on da0s1b to 512MB and removing the swap partitions on da2s1b and da3s1b which are too small to be usefull and cause unnecessary fragmentation, and leaving NSWAP at its default 4. This will cut kernel memory overhead in half and still leave you with 1.5GB of swap. -Matt Matthew Dillon :I have 5 on my personal workstation, and will probably have more whenever :I add disk. I generally stick a swap partition on every physical disk :(things like news spool drives are excepted for obvious reasons). : :Vis: :[17:45:29] mortis:~ :(ttyp8):{6}% pstat -s :Device 1024-blocks Used Avail Capacity Type :/dev/da0s1b 655232 0 655232 0% Interleaved :/dev/da1s1b 524160 0 524160 0% Interleaved :/dev/da2s1b 130944 0 130944 0% Interleaved :/dev/da3s1b 262016 0 262016 0% Interleaved :/dev/da4s1b 524160 0 524160 0% Interleaved :Total 2096512 0 2096512 0% : :(I just rebooted, normally anywhere from 50-200 megs is used under normal :conditions). : :-- :Matthew Fuller (MF4839) | fullermd@over-yonder.net :Unix Systems Administrator | fullermd@futuresouth.com :Specializing in FreeBSD | http://www.over-yonder.net/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message