Fun with my harddisk

Oct 1, 2003

Playing around on my laptop:

<m@udat:26>$ dd if=/dev/zero of=/dev/null bs=1k count=$((1024 * 1024))
1048576+0 records in
1048576+0 records out
1073741824 bytes transferred in 5.949 secs (180488627 bytes/sec)
<m@udat:27>$ dd if=/dev/zero of=~/zeroes bs=1k count=$((1024 * 1024))
1048576+0 records in
1048576+0 records out
1073741824 bytes transferred in 203.332 secs (5280723 bytes/sec)
<m@udat:28>$ time -p bzip2 -9 -c < ~/zeroes > ~/zeroes.bz2
real   276.06
user   259.25
sys      3.95
<m@udat:29>$ time -p gzip -9 -c < ~/zeroes > ~/zeroes.gz
real   127.93
user   112.17
sys     10.03
<m@udat:30>$ ls -l ~/zero*
-rw-r--r--  1 m  m  1073741824 Oct  1 16:13 /home/m/zeroes
-rw-r--r--  1 m  m         785 Oct  1 16:32 /home/m/zeroes.bz2
-rw-r--r--  1 m  m     1043656 Oct  1 16:34 /home/m/zeroes.gz
<m@udat:31>$ _

How fun. More than 170MB/s to /dev/null, about 5MB/s to a file on disk. I had disk writecache disabled.


Last edited: May 1, 2016


Categories: