wasting VM: the Sun philosophy (was Re: grep replacement)

Geoff Collyer geoff at utstat.uucp
Sun Jun 19 11:03:24 AEST 1988


In article <1988Jun18.231122.3383 at utzoo.uucp> Henry Spencer writes:
>> ... few people run on a PDP-11 anymore. Memory and disk space
>> are cheap these days; the goal is no longer to reduce each program to
>> it's minimalist set of options and execution size...
>
>You'd be surprised how much of a difference in performance you can get,
>even on modern systems, by applying the minimalist philosophy vigorously.

The point of minimalist software design is to keep the software simple,
not to make it run on PDP-11s, though that is frequently a side effect.
I would go farther and say that minimalist software helps *especially*
on modern systems, such as Suns with their humungo 8kb pages.  On Suns,
for example, the smallest program possible occupies 4 pages (one text,
one data, one stack, one "u vector") or 32kb.  A 4Mb Sun is unusable as
much other than a fancy terminal; this is an obscenity.  Memory and disk
space aren't *that* cheap.  Try getting your boss to buy you 3/60s with
8Mb of memory as minimal Suns, and servers with 2Gb of disk and at least
16Mb of memory; in most places he won't say "Gee, memory and disk space
are cheap these days, sure.", he'll say "Why the hell isn't 4Mb adequate
for a machine on your desk?".

>> Trade size of executables for execution speed where appropriate.
>> Unused code is never paged in anyway.
>
>Spoken like a true disk salesman. :-) :-(

We call this the "Sun philosophy" here: just keep buying more memory and
disk and don't ask questions about why cat is 32kb and ls is 95kb,
before allocating 8kb stdio buffers.  Never mind that unused code *does*
eat scarce swap space.  When one of our users runs a giant Fortran
application that runs in 8Mb virtual, it doesn't help that "Unused code
is never paged in anyway."; that machine is dead as a door nail.

(It doesn't help that Sun's (3.x) scheduler, when VM runs out, grabs
some innocent process (e.g. inetd) by the scruff of the neck, shoots it
between the eyes, throws the corpse over a fence, and steals its VM
back.  It also doesn't help that Sun's scheduler rewards processes run
under a window system (see SFAVORD in /usr/include/sys/proc.h) by
glueing their pages into main memory and subtracting 20 from their
niceness, but that's another (hideous) story.)
-- 
Geoff Collyer	utzoo!utstat!geoff, utstat.toronto.{edu,cdn}!geoff



More information about the Comp.unix.wizards mailing list