[comp.unix.sysv386] Take out memory to speed up kernel build!?

ts@cup.portal.com (Tim W Smith) (10/01/90)

I'm developing an ethernet driver for a new ethernet card under
SCO Unix System V/386.

I've got 4 megs of RAM, and the command /etc/conf/cf.d/link_unix
takes about 7.5 minutes.

When my back was turned the other day, one of our QC people
stole my memory card, leaving me with only 2 meg.

Guess what?  My kernel build now takes only 5 minutes!

I thought some people might find this amusing.

					Tim Smith

steve@altos86.Altos.COM (Steve Scherf) (10/02/90)

In article <34417@cup.portal.com> ts@cup.portal.com (Tim W Smith) writes:
>I've got 4 megs of RAM, and the command /etc/conf/cf.d/link_unix
>takes about 7.5 minutes.
>When my back was turned the other day, one of our QC people
>stole my memory card, leaving me with only 2 meg.
>Guess what?  My kernel build now takes only 5 minutes!

Can you be more specific about the environment under which you tried this?
What was the configuration of the kernel you were running at the time, were
you single-user, are you running SCO 3.2.1 or 3.2.2, etc?

>I thought some people might find this amusing.
>					Tim Smith

I certainly do!

-- 
Steve Scherf
steve@Altos.COM    ...!{sun|sco|pyramid|amdahl|uunet}!altos!steve

These opinions are solely mine, but others may share them if they like.

seanf@sco.COM (Sean Fagan) (10/03/90)

In article <4133@altos86.Altos.COM> steve@Altos.COM (Steve Scherf) writes:
>In article <34417@cup.portal.com> ts@cup.portal.com (Tim W Smith) writes:
>>I've got 4 megs of RAM, and the command /etc/conf/cf.d/link_unix
>>takes about 7.5 minutes.
>>When my back was turned the other day, one of our QC people
>>stole my memory card, leaving me with only 2 meg.
>>Guess what?  My kernel build now takes only 5 minutes!
>
>Can you be more specific about the environment under which you tried this?

If Tim has a 386DX processor, and the memory card was a 16-bit card, then I
am not surprised.  What ends up happening, in a lot of cases, is that the
kernel snarfs up all of the 32-bit "fast" memory, and puts user code into
the 16-bit "slow" memory ("fast" and "slow" because of number of cycles
needed to get a full word).  It does this because, as far as it knows, there
is no difference; all it sees is one large chunk of memory.

With the 16-bit memory gone, then, of course, the kernel has to make do with
the lesser amount of memory.  Depending on the size of the kernel, the
number of various buffer, activity, etc., 2Mb can end up faster than 4Mb.

-- 
-----------------+
Sean Eric Fagan  | "Never knock on Death's door:  ring the bell and 
seanf@sco.COM    |   run away!  Death really hates that!"
uunet!sco!seanf  |     -- Dr. Mike Stratford (Matt Frewer, "Doctor, Doctor")
(408) 458-1422   | Any opinions expressed are my own, not my employers'.

msandifo@ucs.adelaide.edu.au (Martin Sandiford) (10/03/90)

From article <4133@altos86.Altos.COM>, by steve@altos86.Altos.COM (Steve Scherf):
> In article <34417@cup.portal.com> ts@cup.portal.com (Tim W Smith) writes:
>>I've got 4 megs of RAM, and the command /etc/conf/cf.d/link_unix
>>takes about 7.5 minutes.
>>When my back was turned the other day, one of our QC people
>>stole my memory card, leaving me with only 2 meg.
>>Guess what?  My kernel build now takes only 5 minutes!


That seems to say that your memory card is obnoxiously slow. :-(

Martin

bad@flatlin.ka.sub.org (Christoph Badura) (10/03/90)

steve@altos86.Altos.COM (Steve Scherf) writes:

>In article <34417@cup.portal.com> ts@cup.portal.com (Tim W Smith) noticed:
>>[that kernel build time dropped from 7.5 minutes to 5 when he took a
>>memory card out of his system.]

>Can you be more specific about the environment under which you tried this?

When I brought up Unix for the first time on my home System (16 MHz
SX) I used a spare 2MB extended memory card in the System. That gave
me 4 MB but the System was *very* slow. I then removed the extended
memory card, leaving me with only 2MB, and the box screamed (well,
sort of). With 2MB RAM the system was 3-5 times faster.

The explanation is simple. Xenix noticed the additional RAM and
used more of the mainboard memory for the buffer cache and put
virtually all processes on the RAM card. But the card was running on
an 8MHz IO-bus with atleast 1 Waitstate whereas the block buffers
where using the zero-waitstate RAM on the Mainboard at 16 MHz.

-- 
SVR4 is an adventure; if you win		 |	Christoph Badura 
 you find you're playing VMS. -- Richard O'Keefe |	bad@flatlin.ka.sub.org

jeffl@comix.UUCP (Jeff Liebermann) (10/03/90)

In article <34417@cup.portal.com>, ts@cup.portal.com (Tim W Smith) writes:
> I've got 4 megs of RAM, and the command /etc/conf/cf.d/link_unix
> takes about 7.5 minutes.
> When my back was turned the other day, one of our QC people
> stole my memory card, leaving me with only 2 meg.
> Guess what?  My kernel build now takes only 5 minutes!

If you could pull 2 Mb out on a single card, it must
be a 16 bit memory card plugged into the AT bus.  The bus probably
runs at 8Mhz while the CPU and the main memory runs at 20-25Mhz.
Since Unix runs it's kernel in high memory where the 16bit 8mhz
slow RAM previously resided, removing the slow ram forced the
kernel into faster (20-25Mhz) ram.

I've made lots of assumptions here, but I've seen this before when
RAM was expensive and Unix was simultaneously growing.   The related
part that irritates me is that it take 4Mb of RAM to install SCO
Unix, but only 2Mb to run it.

-- 
# Jeff Liebermann   Box 272   1540 Jackson Ave   Ben Lomond  CA  95005
# (408)336-2558 voice  (408)429-0483 digital pager      CIS:73557,2074 
# PC REPAIR & RF DESIGN  uunet!comix!jeffl  ucscc.ucsc.edu!comix!jeffl
# universe!milky_way!solar_system!earth!na!us!uunet!comix!jeffl

monroe@rlgvax.UUCP (Steve Monroe) (10/03/90)

In article <4133@altos86.Altos.COM> steve@Altos.COM (Steve Scherf) writes:
>In article <34417@cup.portal.com> ts@cup.portal.com (Tim W Smith) writes:
2>I've got 4 megs of RAM, and the command /etc/conf/cf.d/link_unix
2>takes about 7.5 minutes.
2>When my back was turned the other day, one of our QC people
2>stole my memory card, leaving me with only 2 meg.
2>Guess what?  My kernel build now takes only 5 minutes!
>Can you be more specific about the environment under which you tried this?

What kind of memory card?  I know on my system (a 4MB MAXAR) that if I add
add a 2MB Intel Aboveboard (16-bit card) my system runs much much slower.
It's really noticable if I then start X..


-- 
==============================================================================
Steve Monroe			(work) 703-648-3464        (home) 703-430-1318
304 East Amhurst Street		monroe@ropes.opcr.icl.com  (alt)  703-430-1388
Sterling, VA 22170

shwake@raysnec.UUCP (Ray Shwake) (10/04/90)

seanf@sco.COM (Sean Fagan) writes:

>If Tim has a 386DX processor, and the memory card was a 16-bit card, then I
>am not surprised.  What ends up happening, in a lot of cases, is that the
>kernel snarfs up all of the 32-bit "fast" memory, and puts user code into
>the 16-bit "slow" memory ("fast" and "slow" because of number of cycles
>needed to get a full word).  It does this because, as far as it knows, there
>is no difference; all it sees is one large chunk of memory.

>With the 16-bit memory gone, then, of course, the kernel has to make do with
>the lesser amount of memory.  Depending on the size of the kernel, the
>number of various buffer, activity, etc., 2Mb can end up faster than 4Mb.

	Upon reading the report I also mulled over this possibility,
but suspect something else is involved. Given that SCO UNIX (like ISC
UNIX) requires at least 4 MB to get any real work done, even assuming
one can *boot* with only 2 MB compiles will involve such substantial
swapping as to negate any savings from reliance on 32-bit only memory.

	Given the wretched memory upgrade options on my NEC 386/20,
I frequently ran my old ISC 2.0.2 with 2 MB 32-bit and 2 MB 16-bit.
System overhead went up measurably, but compiles still ran more quickly
since I was no longer spending so much time swapping. (My newer 2.2 will
not boot with only 2 MB, and I doubt SCO UNIX does either.)