Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Oct 2006 10:14:02 -0700
From:      David King <dking@ketralnis.com>
To:        freebsd-hardware@freebsd.org
Subject:   Re: Quiet computer
Message-ID:  <301DDDB6-A47E-448F-A145-7B2087599598@ketralnis.com>
In-Reply-To: <200610140346.22554.soralx@cydem.org>
References:  <78ED28FACE63744386D68D8A9D1CF5D4209C94@MAIL.corp.lumeta.com> <200610140346.22554.soralx@cydem.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> BTW, David, test (if you have enough time for curiosity) /dev/ 
> urandom (or
> wherever the generator is) with different values of 'bs', from very
> small to large (1 byte, 512, 4k, 16k, 64k) to see how much it depends
> on block size.
>
>> bash-2.05b$ time dd if=/dev/urandom bs=1024 count=10240 of=/dev/null
>> 10240+0 records in
>> 10240+0 records out
>> 10485760 bytes transferred in 0.154649 secs (67803598 bytes/sec)


~% cat test_rand_block.sh
#!/usr/local/bin/bash

for BS in 1 512 $(expr 1024 \* 4) $(expr 1024 \* 16) $(expr 1024 \*  
64); do
         COUNT=$(expr $(expr 1024 \* 64) / $BS)
         BYTES=$(expr $COUNT \* $BS)

         echo bs=$BS count=$COUNT bytes=$BYTES

         dd if=/dev/random of=/dev/null bs=$BS count=$COUNT

         echo ------;
done
~% sh test_rand_block.sh
bs=1 count=65536 bytes=65536
65536+0 records in
65536+0 records out
65536 bytes transferred in 25.599306 secs (2560 bytes/sec)
------
bs=512 count=128 bytes=65536
128+0 records in
128+0 records out
65536 bytes transferred in 0.099902 secs (656003 bytes/sec)
------
bs=4096 count=16 bytes=65536
16+0 records in
16+0 records out
65536 bytes transferred in 0.100660 secs (651062 bytes/sec)
------
bs=16384 count=4 bytes=65536
4+0 records in
4+0 records out
65536 bytes transferred in 0.099324 secs (659820 bytes/sec)
------
bs=65536 count=1 bytes=65536
1+0 records in
1+0 records out
65536 bytes transferred in 0.099681 secs (657458 bytes/sec)
------




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?301DDDB6-A47E-448F-A145-7B2087599598>