> if the kernel doesnt get scheduling right then we want to
> know about it and fix it.

In a thread that ended inconclusively on 4 June 1999, I
pointed out a problem with pipes sometimes being kept on the
same CPU instead of split between CPUs. A simple example of
this is:

$ cd /tmp
$ dd if=/dev/urandom of=random bs=1M count=10
10+0 records in
10+0 records out
$ time sh -c <random >/dev/null "gzip -1 | gzip -1"
9.40user 0.38system 0:09.33elapsed 104%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (2913major+216minor)pagefaults 0swaps
$ time sh -c <random >/dev/null "gzip -1 | rsh `uname -n` gzip -1"
4.34user 0.45system 0:05.47elapsed 87%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (433major+184minor)pagefaults 0swaps

Note the elapsed times: 9.33 seconds for a simple pipe and
5.47 seconds after hoodwinking the kernel into parallelizing
the pipe.

This is on a dual 450 MHz Pentium III with 2.2.5-22smp. Do
pipes parallelize more reliably in more recent kernels?

Alan
-- 
Dr Alan Watson
Instituto de Astronom�a UNAM
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/dmentre/smp-howto/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]

Reply via email to