Subject: More VM stuff...
To: None <tech-kern@NetBSD.ORG>
From: Neil A. Carson <neil@causality.com>
List: tech-kern
Date: 11/11/1997 16:00:19
Greetings,

Been playing some more with VM optimizations. Running systat vm 1, I run
a shell script containing 1057 lines, each line of which has the single
word 'test' on it. On the SA, this takes about 15 seconds to run, on an
i386 machine it took about 3.

During the execution, we see about 2,000 faults per second, 3000 general
traps, and 465 syscalls. I also see context switches leaping up from a
sedate 10 per second through to about 120.

A lot of the faults will be due to midified bit emulation, maybe
copy-on-write (though only 300 of those per second) etc. This still
seems like a huge number, though, given we're only able to run at 70
lines of this script per second. This leads us to a magic number of 42
faults per line of shell script executed. This seems to be rather a lot;
for some reason somewhere, faults are no doubt requiring cache cleans of
some sort, which probably isn't helping much either. From some previous
analysis, on running a copy of 'test' from the tcsh command line, only
about 10 cache cleans were done during the fork with a further 80 or so
coming in afterwards.

Do any of the Greater Brains out there have any thoughts as to where
exactly this lot is going? Another free OS beginning with L on the same
machine can do such things about 20 times faster, so I wonder where most
of the overhead is coming in...

Jason: You mentioned you had a patch that sped up some aspect of something
fault related, but I'll be darned if i can remember what it was...

	Cheers,

	Neil