[comp.unix.wizards] Sys V kernel bss is a HOG!!!

naim@nucsrl.UUCP (02/18/87)

In a reply to a claim, that the berkeley kernel is too large, Guy Harris
wrote:
>gorodish$ size /vmunix
>text	data	bss	dec	hex
>445120	77784	120348	643252	9d0b4
>...
>As for singling out the Berkeley kernel, I shall point out that I
>just did a "size" on "/unix" on a 3B2 around here, and it was about
>800KB.

I tried the following:
	      On a VAX 11/780 running 4.3bsd
% size /vmunix
text    data    bss     dec     hex
196936  91940   70164   359040  57a80
              On an AT&T 3b2/300 running System V rel2
$ size /unix
2044(.gate) + 152268(.text) + 28552(.data) + 410584(.bss) + 284(<EDT>)
	    + 4368(boot) = 598100

It seems that the text size of the bsd kernel compares very favourably
with the System V kernel, if one considers the additional functionality.

However, I am curious as to why the system V kernel has such a large
bss size compared to the bsd kernel (410KB vs. 70KB). The Vax is
configured for INET while the 3b2 is on a 3bnet. Can it be, because
3bnet is a hog for buffers or that system V uses a very large buffer
cache ? I don't know the answer and I invite you to speculate.

If it makes a difference, I know that the Vax in question has 4MB
of memory while rumor has it that the 3b2 has 2MB.

		      Naim
		      {ihnp4, chinet}!nucsrl!naim

djmolny@cuae2.UUCP (02/20/87)

>	      On a VAX 11/780 running 4.3bsd
>% size /vmunix
>text    data    bss     dec     hex
>196936  91940   70164   359040  57a80

>              On an AT&T 3b2/300 running System V rel2
>$ size /unix
>2044(.gate) + 152268(.text) + 28552(.data) + 410584(.bss) + 284(<EDT>)
>	    + 4368(boot) = 598100

Apples to apples, please.  What are the tunable parameters on both
machines?  Are the disk buffers part of the /vmunix file, or are they
tacked on at boot time?  (I suspect the latter, which means the "size"
command is not showing the run-time size of vmunix.  Berkeley gurus please
respond.)

> ... Can it be, because
>3bnet is a hog for buffers or that system V uses a very large buffer
>cache ? I don't know the answer and I invite you to speculate.

3BNET uses no more than 70K bytes for its buffer space,  completely
separate from the disk buffer cache.

>If it makes a difference, I know that the Vax in question has 4MB
>of memory while rumor has it that the 3b2 has 2MB.

You can check the amount of memory on the 3B2 by typing "prtconf".

-- 
						Regards,
						DJ Molny, N9609U
						ihnp4!cuae2!djmolny

klim@hvrunix.UUCP (02/20/87)

In article <3690002@nucsrl.UUCP> naim@nucsrl.UUCP (Naim Abdullah) writes:
>>[Guy Harris:] gorodish$ size /vmunix
>>text  	data	bss	dec	hex
>>445120	77784	120348	643252	9d0b4
>[VAX-11/780, 4.3BSD, INET, 4Mb memory:] % size /vmunix
>text    data    bss     dec     hex
>196936  91940   70164   359040  57a80
>[AT&T 3B2/300, SVR2, 3BNET, 2Mb memory(?):] $ size /unix
>2044(.gate) + 152268(.text) + 28552(.data) + 410584(.bss) + 284(<EDT>)
>	+ 4368(boot) = 598100

Here, on our 3B2/310 running 3BNET and SVR3.0,

$ size /unix
2044(.gate) + 188816(.text) + 25804(.data) + 4208(boot) = 220872

with no mention of bss whatsoever.  This is a pretty vanilla system, with no
changes to the default configuration.  I'm not exactly sure how much memory
we've got.  220K doesn't seem too bad to me, especially compared to the numbers
quoted above.
-- 
Kian-Tat Lim
Unix System Manager
Haverford College, Haverford, PA  19041-1392
K_LIM @ HVRFORD.BITNET; ihnp4!cbmvax!vu-vlsi!hvrunix!klim

shz@desoto.UUCP (02/20/87)

 #include <std/disclaimer>

> However, I am curious as to why the system V kernel has such a large
> bss size compared to the bsd kernel (410KB vs. 70KB).

I believe the SV kernel statically allocates its bufs (NBUF of them)
while the BSD kernel dynamically allocates them at boot (malloc, tmalloc,
or some such BSD kernel memory allocation routine).

Seth

ihnp4!desoto!shz

brent@terra.UUCP (02/20/87)

In article <3690002@nucsrl.UUCP>, naim@nucsrl.UUCP (Naim Abdullah) writes:
> However, I am curious as to why the system V kernel has such a large
> bss size compared to the bsd kernel (410KB vs. 70KB). The Vax is
> configured for INET while the 3b2 is on a 3bnet. Can it be, because
> 3bnet is a hog for buffers or that system V uses a very large buffer
> cache ? I don't know the answer and I invite you to speculate.

Try running nm on the /unix of your 3B2 sometime.  It's a while
since I did it but I can remember being surprised at how much
bss the 3Bnet buffers were hogging.

Alternatively, compare the size of kernels with and without
3Bnet configured.  Big difference!


Made in New Zealand -->  Brent Callaghan  @ Sun Microsystems
			 uucp: sun!bcallaghan
			 phone: (415) 691 6188

terryl@tekcrl.UUCP (02/21/87)

In article <3690002@nucsrl.UUCP> naim@nucsrl.UUCP (Naim Abdullah) writes:
>
>It seems that the text size of the bsd kernel compares very favourably
>with the System V kernel, if one considers the additional functionality.
>
>However, I am curious as to why the system V kernel has such a large
>bss size compared to the bsd kernel (410KB vs. 70KB). The Vax is
>configured for INET while the 3b2 is on a 3bnet. Can it be, because
>3bnet is a hog for buffers or that system V uses a very large buffer
>cache ? I don't know the answer and I invite you to speculate.
>
>If it makes a difference, I know that the Vax in question has 4MB
>of memory while rumor has it that the 3b2 has 2MB.

     Don't forget, BSD kernels allocate things like the buffer cache, in-
core inode, open file structures (and oodles and oodles of other goodies)
DYNAMICALLY at run time. So, at the very least, one should add at least
1/2 Meg to the BSD kernel sizes. I don't know anything about System V,
but I'll bet it does all of its allocation statically, (i.e. at link time).

pwy@pyuxe.UUCP (02/24/87)

In article <294@desoto.UUCP>, shz@desoto.UUCP writes:
> 
> 
> > However, I am curious as to why the system V kernel has such a large
> > bss size compared to the bsd kernel (410KB vs. 70KB).
> 
> I believe the SV kernel statically allocates its bufs (NBUF of them)
> while the BSD kernel dynamically allocates them at boot (malloc, tmalloc,
> or some such BSD kernel memory allocation routine).

On the 3B2 starting with Release 2.0 the parameter NBUF is calculated
at boot time by sizing physical memory (you do have the option of
overiding this and putting in your own number of buffers).

Note that System V Rel 2.0 on the VAX and 3B20 do not have this ability.

					Peyton Yanchurak
					Bellcore