Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Nov 1997 16:12:47 -0500 (EST)
From:      Chuck Robey <chuckr@Glue.umd.edu>
To:        Wolfram Schneider <wosch@cs.tu-berlin.de>
Cc:        "Jordan K. Hubbard" <jkh@time.cdrom.com>, smp@freebsd.org
Subject:   Re: Some SMP timing tests.
Message-ID:  <Pine.BSF.3.96.971102160833.1115E-100000@picnic.mat.net>
In-Reply-To: <p1ipvojjjo3.fsf@panke.panke.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2 Nov 1997, Wolfram Schneider wrote:

> "Jordan K. Hubbard" <jkh@time.cdrom.com> writes:
> > > If you have a Makefile with 5 targets (e.g. 4 *.c files, 1 manpage),
> > > make can only create 5 jobs at once. Not surprising ;-)
> > 
> > A good point, but this doesn't quite explain the behavior during
> > compiling things like libc, which has many targets which could be
> > parallelized.
> 
> The bottleneck is the SUBDIR target which is not parallelized.
> 
> Try the patch and run `make -j<n> -I share/mk all' in /usr/src.
> The patch split the SUBDIR variable into 4 variables SUBDIR1,
> ... SUBDIR4 and runs 4 subdir targets simultaneously.

OK, I tried it.  I started with no obj at all, did a make obj outside the
timing loop, just so that I knew it was completely clean.  This goes for
both runs.  The first one is before the patches were inserted, the second
one after.  Both on a Tyan Titan II, 2 each PPro 166's e/w 512K cache
each, 64 Megs main memory.  I have set the source on the first disk, the
obj on the second, and swap evenly distributed between the two.  Here's
the results:

before patching->

/usr/bin/time -l make -j 12 buildworld:
     5389.14 real      3229.98 user      2902.01 sys
      8200  maximum resident set size
       249  average shared memory size
       306  average unshared data size
        58  average unshared stack size
   7096181  page reclaims
      2930  page faults
         0  swaps
     34729  block input operations
    209264  block output operations
         0  messages sent
         0  messages received
         8  signals received
    903820  voluntary context switches
    430529  involuntary context switches

With patched Makefile and bsd.subdir.mk, same command:

     2780.55 real      1696.39 user      1571.73 sys
      6828  maximum resident set size
       270  average shared memory size
       350  average unshared data size
        60  average unshared stack size
   4079428  page reclaims
      2607  page faults
         0  swaps
     10619  block input operations
    130129  block output operations
         0  messages sent
         0  messages received
         0  signals received
    473969  voluntary context switches
    227592  involuntary context switches

Pretty major difference?  Seems to me ....

----------------------------+-----------------------------------------------
Chuck Robey                 | Interests include any kind of voice or data 
chuckr@glue.umd.edu         | communications topic, C programming, and Unix.
213 Lakeside Drive Apt T-1  |
Greenbelt, MD 20770         | I run Journey2 and picnic, both FreeBSD
(301) 220-2114              | version 3.0 current -- and great FUN!
----------------------------+-----------------------------------------------







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971102160833.1115E-100000>