Wait a second guys, the problem is with the script, look at those CPU
numbers:
> ./daniel.sh 39.78s user 71.72s system 368% cpu 30.260 total
> quad:/home/akpm> time ./daniel.sh
> ./daniel.sh 38.45s user 70.00s system 365% cpu 29.642 total
They should be 399%!! With my fancy script, the processes themselves are
getting serialized somehow.
Lets back up and try this again with this pair of scripts, much closer to
the original:
doitlots:
-------------------------------
#!/bin/sh
doit()
{
( cat $1 | wc -l )
}
count=0
while [ $count != 500 ]
do
doit doitlots > /dev/null
count=$(expr $count + 1)
done
echo done
-------------------------------
forklots:
-------------------------------
echo >foocount
./doitlots >>foocount &
./doitlots >>foocount &
./doitlots >>foocount &
./doitlots >>foocount &
./doitlots >>foocount &
./doitlots >>foocount &
./doitlots >>foocount &
./doitlots >>foocount &
./doitlots >>foocount &
count=0
while [ $count != 10 ]
do
count=$(wc foocount | cut -b -8)
done
-------------------------------
/me makes the sign of the beast at bash
-- Daniel - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Wed Aug 07 2002 - 22:00:22 EST