Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!ix.netcom.com!news From: Richard Scranton <scrantr@ix.netcom.com> Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: 2.2 GAMMA 2/5 results in SWAP FULL? Date: Thu, 13 Feb 1997 15:57:57 -0500 Organization: LDA Systems, Columbus Lines: 35 Message-ID: <33038055.22A2@ix.netcom.com> References: <m267zzxceb.fsf@golfgod.raleigh.ibm.com> <5dvgb2$10b2@rtpnews.raleigh.ibm.com> Reply-To: scrantr@ix.netcom.com NNTP-Posting-Host: col-oh23-11.ix.netcom.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-NETCOM-Date: Thu Feb 13 1:13:54 PM PST 1997 X-Mailer: Mozilla 3.01 (Win95; I) To: tjevans@raleigh.ibm.com Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:35658 Since no one else has given you a detailed answer, let me. FreeBSD's paging algorithm puts "text" pages on the swap partition as well as "data" pages. The difference here is that should part of a program's code get paged out, it can be recovered by paging it back in from the swap area rather than searching for the binary file in the file system. That makes paging much faster. The other quirk of memory management you are noticing is that the BSD allocator never really gives memory back to the kernel when it is free'd by a program. The allocator puts the free'd block on a list of allocations to be reused the next time the program calls malloc(). The memory is not returned until the program exits. If this is disturbing to you, you can re-link your X server and any other large long-running programs to use a more conservative malloc() package (I did). Those two features together make BSD more swap-hungry than other schemes, but also make its performance under stress better. Thomas Evans wrote: > > In article <m267zzxceb.fsf@golfgod.raleigh.ibm.com>, > tjevans@hotmail.com (Thomas Evans) writes: > ok, I did a little rearranging of partitions (didn't even destroy > anything :-) ), I now have 100M of swap space. I'm not sure I buy > the theorys. Just got McKusick's and Co. book on 4.4 BSD, guess I'll > be reading the chapter on memory management. > > -- > Tom Evans tjevans@raleigh.ibm.com > Normal disclaimer applies... -- ======================================================================== Richard Scranton - LDA Systems, Columbus scrantr@ix.netcom.com