Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.mel.connect.com.au!munnari.OZ.AU!spool.mu.edu!usenet.eel.ufl.edu!bofh.dot!arclight.uoregon.edu!gatech!news.mathworks.com!news.kei.com!nntp.coast.net!oleane!francenet.fr!itesec!sidhe.frmug.fr.net!keltia.frmug.fr.net!not-for-mail From: roberto@keltia.freenix.fr (Ollivier Robert) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Linux vs. FreeBSD ... (FreeBSD extremely mem/swap hungry) Date: 27 May 1996 13:19:07 GMT Organization: Usenet Canal Historique Lines: 55 Message-ID: <4oca4b$1gm@keltia.freenix.fr> References: <3188C1E2.45AE@onramp.net> <4o3ftc$4rc@zot.io.org> <31A5A8F6.15FB7483@zeus.co.uk> <31A5D0A8.59E2B600@zeus.co.uk> NNTP-Posting-Host: keltia.freenix.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit [courtesy cc of this posting sent to cited author via email] In article <31A5D0A8.59E2B600@zeus.co.uk>, Damian Reeves <damian@zeus.co.uk> wrote: > Under BSD, memory is allocated on a binary buddy system causing all > blocks to be allocated of sizes that are a power of 2. This wastes a > lot of memory (ask for 2mb+1byte and the kernel will reserve 4mb of Please note that it is only true of 2.1 and 2.1-STABLE. 2.2-CURRENT have a better malloc subsystem that allow memory to nbe returned to the OS and that is marginally faster than GNU malloc although it allocate memory in a better wat. > programs. GCC 2.7.2 does an awful lot more optimisations than 2.6.3, > and timings noted were for release builds involving maximum > optimisations. Note that most of the 2.7.* bugs are in the optimizer :-) > Ah, so this is the kind of in-depth analysis and discussion I can > expect from FreeBSD developers is it. Please don't that all developers are all like him. Just have a look at the mail archive and while you'll see some Linux bashing, most of us don't care. For the mailing-list people (where most of the work is done), Linux bashing is low. Some people even have both systems and thus compare. > and more, indeed I'm sure I'm completely mad. Have you actually > watched the RSS of the Xfree 3.1.2 Server increase as you repeatedly > load and quit Netscape? The BSD malloc (from Caltech is I remember well) doesn't give the memory back, that's true. That why we replaced the 2.1 malloc with a new one made by Poul-Henning Kamp. We foudn a few bugs in the process where some programs expected malloc()-ed memory to be all bzero-ed. > understand that this means that every application which is linked with > libc (read a lot) has to allocate this as part of their data segment. > For example, in crypt() alone, there's a nice line of: > > long32 ufc_sb0[8192], ufc_sb1[8192], ufc_sb2[8192], ufc_sb3[8192]; Uh ? You'll have this penalty only if you link with the DES libcrypt. The MD4 libcrypt uses less memory. The VM subsystem in Linux and FreeBSD are very different although I think Linux recently got an unified VM/buffer cache like we do since post 2.0. It is true that FreeBSD needs more swap than Linux ; it is an artifact from the VM system. I also think that our VM system is more advanced but I haven't compared line by line. Regards, -- Ollivier ROBERT -=- FreeBSD: The daemon is FREE! -=- roberto@freebsd.org -=-=-=-=-=-=-=-=-=-=- FreeBSD 2.x FAQ maintainer -=-=-=-=-=-=-=-=-=-=-=-=-