I've had two disconcerting experiences lately. Last month,
we upgraded a Sun from Solaris 2.6 to Solaris 2.7; it got
faster. Last week, I upgraded my dual 450 MHz PII machine
from RedHat 5.2 (2.0.36) to RedHat 6.0 (2.2.5-15smp); it got
slower.

I'm working on a two-stage image compression method. The
image is quantized in one process and fed into gzip or bzip2
using popen(). In sh terms, this is "process1 | process2".
This used to parallelize quite nicely, with one process
running on each processor, but now about the best I can get
is 120% CPU usage, often less. Overall, the pipe is slower.

You can see this for yourself, by piping two gzips or bzip2s
together:

$ dd if=/dev/urandom of=random bs=1M count=5
5+0 records in
5+0 records out

$ time sh -c "gzip -9 <random | gzip -9 >/dev/null"
5.57user 0.14system 0:04.72elapsed 120%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (355major+215minor)pagefaults 0swaps

$ time sh -c "bzip2 -1 <random | bzip2 -1 >/dev/null"
53.01user 0.11system 0:47.52elapsed 111%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (379major+585minor)pagefaults 0swaps

I don't think this is just latency (i.e., the second process
in the pipe waiting for data from the first), since "bzip2
-1" will consume and produce data in roughly 100k chunks and
so will have a latency of only about half a second. Dropping
into single-user mode and stopping the raid daemons do not
help.

Any great ideas about how to get this back to more like 200%
CPU usage?

Alan

(To add insult to injury, I'm still using the binaries for
gzip/gunzip from 5.2, as they are about 20% faster than the
ones shipped with 6.0. Go figure.)
-- 
Dr Alan Watson
Instituto de Astronom�a UNAM
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]

Reply via email to