> > 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. [...]
> 
> Could you retry this with 2.3.28?

I've tried my "gzip pipe" on 2.3.38 and 2.3.38 modified so
that PROC_CHANGE_PENALTY in include/asm/smp.h is 0, and as
you can see from these results, it still fails to
parallelize effectively:

$ dd if=/dev/urandom of=random bs=1024k count=10

2.2.5:
$ time sh -c "gzip -1 <random | gzip -1 >/dev/null"
11.17user 0.24system 0:09.64elapsed 118%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (355major+208minor)pagefaults 0swaps

2.3.38:
$ time sh -c "gzip -1 <random | gzip -1 >/dev/null"
10.86user 0.27system 0:09.47elapsed 117%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (355major+208minor)pagefaults 0swaps

2.3.38 with PROC_CHANGE_PENALTY=0
$ time sh -c "gzip -1 <random | gzip -1 >/dev/null"
11.00user 0.25system 0:09.51elapsed 118%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (355major+208minor)pagefaults 0swaps

The potential for parallelism can be seen by using rsh to
trick the kernel into running the processes on separate
processors (note the elapsed time -- 5.3 seconds compared to
around 9.5 seconds):

2.2.5:
$ time sh -c "gzip -1 <random | rsh `hostname` 'gzip -1 >/dev/null'"
4.81user 0.23system 0:05.33elapsed 94%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (433major+178minor)pagefaults 0swaps

This is on a dual 450 MHz PII. The non-rsh pipes were run in
single-user mode.

There is some better news, but I will send that in a
separate message.

Regards,

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