*BSD News Article 69336


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!enews.sgi.com!news.mathworks.com!newsfeed.internetmci.com!cdc2.cdc.net!vixen.cso.uiuc.edu!usenet.ucs.indiana.edu!news
From: jfieber@indiana.edu (John Fieber)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Linux vs. FreeBSD ... (FreeBSD extremely mem/swap hungry)
Date: 24 May 1996 17:54:36 GMT
Organization: Indiana University, Bloomington
Lines: 93
Sender: jfieber@fallout.campusview.indiana.edu (John Fieber)
Message-ID: <4o4t4s$q0c@usenet.ucs.indiana.edu>
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> <31A52667.794BDF32@zeus.co.uk> <4o3ftc$4rc@zot.io.org> <31A5A8F6.15FB7483@zeus.co.uk> <31A5D0A8.59E2B600@zeus.co.uk>
NNTP-Posting-Host: fieber-john.campusview.indiana.edu
X-Newsreader: knews 0.9.3
In-Reply-To: <31A5D0A8.59E2B600@zeus.co.uk>
To: Damian Reeves <damian@zeus.co.uk>

In article <31A5D0A8.59E2B600@zeus.co.uk>,
	Damian Reeves <damian@zeus.co.uk> writes:
>This was a mail response sent to me directly, but I thought I'd post it
>here as well for further discussion.

I hope you asked permission.  It is a little rude to post private
mail without it...

>"Our program is so old, no one who wrote the internals is even alive
> anymore, we couldn't possibly alter them, let alone describe the 
> design decisions that contributed to this large chunk of code we 
> don't understand."

I've got no clue as to what you are referring to here, but it sure
isn't BSD.  Can you provide a listing of the people responsible for
the BSD internals that are dead so we can compare with those that are
alive?

>You obviously don't understand the workings of the BSD kernel memory
>manager, and how it compares with that under Linux.

For your comparisons, it would be helpful if you would make your
references to BSD a little more specific.  The FreeBSD VM system has
undergone quite a lot of changes and your suggestion near the end of
the message to read "Design and Implementation of BSD4.3" is rather
misguided on this particular front.

>system, or return failure if that memory cannot be allocated.  Under
>Linux, no such pre-reservation occurs, malloc's() cannot fail.  The

Which leaves you no assurance of whether or not you actually can use
the memory.  What happens later on when you are writing to your
sparse array and you slam into your ram+swap limit?  I understand the
convenience and potential efficiency of a sparse array over a more
complex datstructure, but it is certainly not without pitfalls.  I'm
not yet convinced that a malloc() that never fails is such a good
thing. 

>    Victor> Do you know the difference between 2.6.3 and 2.7.2?  Or
>    Victor> are you someone who can't wait to install the latest
>    Victor> kernel and libc?
>
>Indeed I do.  If have ever got past writing hello world in C++ you
>would understand that polymorphic templates and exception support was
>actually quite useful.

Yes, for C++ programmers, 2.6.3 is rather far behind in some key
areas.  Unfortunately 2.6.x versus 2.7.x is a feature/reliability
tradeoff.  For filling the role as the system compiler used to build
FreeBSD, the C++ features are not necessary, and for reliability,
2.6.3 has a better track record.

>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?

No I hadn't noticed and just to check, I just opened and close Netscape
about 15 times.  This is Netscape Atlas Beta3 and the May 1st FreeBSD
snapshot.   For the duration of the test VSS on the X server never
changed. The RSS did go up when netscape was running, but after
quitting netscape, it promptly returned to the pre-netscape level. 
Exactly.  Every time.  Anyway, if it did grow, what evidence do you
have that it is a FreeBSD problem, and not an XFree86 problem?
Could you provide more details on what BSD you are talking about? 
The internals of FreeBSD are not quite the ancient relics from the
past as you hinted earlier.

>Do you understand that when a user-level process malloc()s memory from
>the kernel, a subsequent free() does not return the VM back for use by
>other processes?

Again, please tells us what BSD you are talking about.  FreeBSD 2.1
does exhibit this behaviour, but an improved malloc was introduced
to the -current tree quite a long time ago and it does return memory
to the system.

>No, let me see who is a fool.  I suggest you go out and read the
>excellent "The Design and Implementation of the 4.3BSD UNIX Operating
>System", then go and read some kernel source, then read libc, then
>actually play with 'ps' to visualise your new found knowledge.

Yes, reading kernel source is good, but for looking at VM, the 4.3BSD
book is not going to be too helpful.  Sort of like telling someone to
get a Windows 3.0 book to understand the internals of Windows95; not
completely irrelvant, but hardly up to date.  Generally, you would do
much better reading the recently released 4.4 edition of the said
book.

-john

== jfieber@indiana.edu ===========================================
== http://fallout.campusview.indiana.edu/~jfieber ================