9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Peter Schay <pschay@pobox.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Performance
Date: Wed,  9 May 2001 08:29:44 +0000	[thread overview]
Message-ID: <3AF8B9C3.32C0825D@pobox.com> (raw)
In-Reply-To: <20010508182037.F137F19A18@mail.cse.psu.edu>

Hi,

There are many things besides kernel compilation that
are also really fast compared to other systems: booting,
compiling the window system, running the window system,
....

Anyway, as fast as kernel compilation is, I do have some
questions about the performance.  I tried a few ways of
profiling the kernel during kernel compilation.  At first
I found that a lot of the kernel time was spent in halt()
so I changed HLT to NOP in l.s.  Now almost a third of the
time is apparently spent in runproc().

Is this a fixable problem?  Or is it actually the desired
behavior?  (All I can imagine is that maybe the scheduler
sacrifices the good of the few for the good of the many and
me + my measly kernel compilation processes are not the
common case?  Or perhaps scheduling typically consumes this
kind of overhead?)  I know zilch about schedulers so
I'd greatly appreciate any insight, or pointers to
literature.  I think I recall reading a brief posting a year
or two ago by one of the experts who said something to the
effect that the scheduler has lots of room for improvement.
Why? How? Could anybody elaborate?

Thanks.
-Pete

PS In case anybody is curious, here are some data from
my experiments today:

There was not much difference between a compilation with 1
process and a compilation with 32.  Here is the output of
time and kprof (fyi I'm running an AMD K6-300 with 128MB
of SIMMs.  I did a mk; mk clean before each of these:)

26.36u 21.46s 67.63r 	 mk CONF=pcdisk
total: 66804	in kernel text: 39312	outside kernel text: 27492
KTZERO 80100000
ms	  %	sym
11160	 28.3	halt
6108	 15.5	i8259isr
3852	  9.7	memmove
3276	  8.3	memset
1596	  4.0	lock
1200	  3.0	envgen

26.46u 24.36s 66.20r 	 mk NPROC=32 CONF=pcdisk
total: 65184	in kernel text: 37644	outside kernel text: 27540
KTZERO 80100000
ms	  %	sym
7008	 18.6	halt
6312	 16.7	i8259isr
4404	 11.6	memmove
3804	 10.1	memset
1680	  4.4	lock
1308	  3.4	envgen

# Next 2 compilations were done with the
# kernel in which I substituted NOP for HLT in halt() in l.s:

25.84u 21.89s 67.30r 	 mk CONF=pcdisk
total: 66276	in kernel text: 39264	outside kernel text: 27012
KTZERO 80100000
ms	  %	sym
11484	 29.2	runproc
6240	 15.8	i8259isr
3816	  9.7	memmove
3564	  9.0	memset
1368	  3.4	lock
1104	  2.8	envgen

653809t + 489696d + 87400b = 1230905	9pcdisk
26.15u 24.60s 66.90r 	 mk NPROC=32 CONF=pcdisk
total: 65880	in kernel text: 38460	outside kernel text: 27420
KTZERO 80100000
ms	  %	sym
7188	 18.6	runproc
6972	 18.1	i8259isr
4668	 12.1	memmove
4236	 11.0	memset
1848	  4.8	lock
1440	  3.7	envgen




jmk@plan9.bell-labs.com wrote:
> 
> Almost any speed comparisons will show Plan 9 as coming in 2nd,
> except for the time it takes to compile the kernel.


  reply	other threads:[~2001-05-09  8:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-08 18:20 jmk
2001-05-09  8:29 ` Peter Schay [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-05-11 13:52 jmk
2001-05-10 17:21 jmk
2001-05-11  8:33 ` Douglas A. Gwyn
2001-05-09 14:47 Richard Miller
2001-05-10 15:14 ` Douglas A. Gwyn
2001-05-09 13:03 presotto
2001-05-09 12:57 jmk
2001-05-09  8:58 forsyth
2001-05-09  6:03 nemo
2001-05-08 21:33 Russ Cox
2001-05-09  2:09 ` Ronald G Minnich
2001-05-10 15:15 ` Douglas A. Gwyn
2001-05-08 21:25 jmk
2001-05-08 17:54 nemo
2001-05-08 18:46 ` Scott Schwartz
2001-05-08 17:42 Fariborz 'Skip' Tavakkolian
2001-05-08 18:07 ` aam396
2001-05-08 22:38 ` Boyd Roberts
2001-05-08 17:40 presotto
2001-05-08 18:45 ` Scott Schwartz
2001-05-09  5:35 ` Franklin Robert Araujo Fran€a
2001-05-10  8:43   ` Juhani Forsman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3AF8B9C3.32C0825D@pobox.com \
    --to=pschay@pobox.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).