Subject: Re: weird time(1) behaviour
To: Eric Haszlakiewicz <erh@nimenees.com>
From: Paul Ripke <stix@stix.id.au>
List: current-users
Date: 10/02/2007 14:37:57
On Mon, Oct 01, 2007 at 07:04:27PM +0200, Thomas Klausner wrote:
> On Mon, Oct 01, 2007 at 07:04:50AM -0600, Eric Haszlakiewicz wrote:
> > Thomas, what shell are you using? None of the ones I tried produces
> > output like you have.
>
> I tried it with bash. I can reproduce it with "ls -laR /var >
> /dev/null", like you suggested.
I noticed this on netbsd-4, while testing out a quad CPU box:
ksh$ pwd
/l/netbsd/netbsd-4/release
ksh$ /usr/bin/time sh -c 'for i in $(find . -name *gz); do gzip -t $i & done; wait'
7.40s real 25.02s user 2.75s system
ksh$ /usr/bin/time sh -c 'for i in $(find . -name *gz); do gzip -t $i & done; wait'
7.33s real 26.25s user 1.92s system
ksh$ /usr/bin/time sh -c 'for i in $(find . -name *gz); do gzip -t $i & done; wait'
7.46s real 25.36s user 1.79s system
ksh$ /usr/bin/time ksh -c 'for i in $(find . -name *gz); do gzip -t $i & done; wait'
7.24s real 54.92s user 5.74s system
ksh$ /usr/bin/time ksh -c 'for i in $(find . -name *gz); do gzip -t $i & done; wait'
7.12s real 91.19s user 11.68s system
ksh$ /usr/bin/time ksh -c 'for i in $(find . -name *gz); do gzip -t $i & done; wait'
7.31s real 44.51s user 7.61s system
ksh$ /usr/bin/time bash -c 'for i in $(find . -name *gz); do gzip -t $i & done; wait'
7.95s real 53.45s user 14.49s system
ksh$ /usr/bin/time bash -c 'for i in $(find . -name *gz); do gzip -t $i & done; wait'
7.23s real 46.67s user 6.55s system
ksh$ /usr/bin/time bash -c 'for i in $(find . -name *gz); do gzip -t $i & done; wait'
7.53s real 77.91s user 18.84s system
So, something strange is happening, and sh seems fairly immune,
while ksh and bash both get erratic.
--
Paul Ripke