From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: Peter Schay Message-ID: <3AF8B9C3.32C0825D@pobox.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <20010508182037.F137F19A18@mail.cse.psu.edu> Subject: Re: [9fans] Performance Date: Wed, 9 May 2001 08:29:44 +0000 Topicbox-Message-UUID: 9c0d1b82-eac9-11e9-9e20-41e7f4b1d025 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.