Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.mel.connect.com.au!news.mira.net.au!news.vbc.net!samba.rahul.net!rahul.net!a2i!news.PBI.net!decwrl!hookup!news.mathworks.com!newsgate.duke.edu!agate!sunsite.doc.ic.ac.uk!lyra.csx.cam.ac.uk!news From: Damian Reeves <damian@zeus.co.uk> Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Linux vs. FreeBSD ... (FreeBSD extremely mem/swap hungry) Date: Fri, 24 May 1996 04:00:55 +0100 Organization: Zeus Technology Ltd. Lines: 55 Message-ID: <31A52667.794BDF32@zeus.co.uk> References: <3188C1E2.45AE@onramp.net> <4mnsc5$6qo@sundial.sundial.net> <4mr1pk$cdi@dyson.iquest.net> <4n0dhd$cff@agate.berkeley.edu> <3194622D.41C67EA6@Ami-chan.res.cmu.edu> NNTP-Posting-Host: jobbie.chu.cam.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.02 (X11; I; FreeBSD 2.1.0-RELEASE i386) Yun-Ching (Allen) Lee wrote: > > Performance: Since I only have a 486DX 33 with 20 MB of RAM, I want > > to squeeze every last bit of performance out of it. When I was using > Linux with 35 MB of swap, I have never let the swap usage go above 20 > MB when running X. Because, around that number, the disk swapping > becomes horrendously slow. When using FreeBSD, I can hardly feel the > lag caused by swapping, but the processes take more real and swap > memory. Your damm right they do! I think the FreeBSD developer's are subsidised by ram and harddrive manufactures. We took a 32mb machine here which was running Linux and converted it to running FreeBSD 2.1 for porting purposes. On the Linux box, after booting up, running X11R6, opening a few xterms, xbiff etc., a 'top' would show that about 10mb of memory was in use, and around 18Mb was used for buffer cache, an no swap space in use. On replacing with BSD, and copying over the .xsession files etc., by the time the Xserver and xterms have started, 50MB of swap is in use!!! I had to increase the swap space upto 250Mb just so we could actually compile our server code. At the moment, the machine is sitting there with 1 user logged in, emacs, netscape and a couple of shells. top reports that 59% of the swap space is in use! top also reports that only 860k is available for buffer cache, in fact I've never seen it go over 1200k. This is extremely different to under linux, where it used to stay around 12Mb-15Mb under use. Now, one has to ask WHY? The Linux box could have all these apps in and more with less than a couple of Mb in swap if any. Another related issue is that FreeBSD seems a lot more swap-happy than Linux. If I leave the emacs alone for a couple of minutes, when I return to it I have to wait a good few seconds of hard-drive thrashing before it will response to my keystrokes. This paging also seems to lock the entire machine at lot more than under linux (EIDE drive subsystem). However, on saying that, the server does actually compile marginally faster than under Linux, although this might be due to the slightly older version of GCC (2.6.3 as opposed to 2.7.2 - related note: does anyone have a gcc/g++ 2.7.2 working properly yet or do FreeBSD people not care?) In summary then, its fast, but resource hungry in the extreme. I guess the default malloc() behaviour is different than in Linux, where a malloc() doesn't actually reserve the memory until you actually dirty the pages. I'd say there is probably a memory leak in the system libc as well. One more thing, using tmpfs really eats VM, and I'm not sure if it actually returns it to the system on deleting files in there. Damian -- Damian Reeves, <damian@zeus.co.uk> Zeus Technology Ltd. Download the world's fastest webserver today! http://www.zeus.co.uk