DD /dev/zero to /dev/null fun!

Associate
Joined
2 Nov 2005
Posts
931
Location
Leicester
This command is cool.. it gets a bunch of zeros from /dev/zero and discards them to /dev/null...

dd if=/dev/zero of=/dev/null bs=900000
1647696600000 bytes (1.6 TB) copied, 125.442 s, 13.1 GB/s

I get 13GB/s!!
 
Soldato
Joined
10 Oct 2005
Posts
8,706
Location
Nottingham
hmmm ... what's that on as it's not that quick ... on my C2D 2180 based server I get the following:

belgarath:~ # dd if=/dev/zero of=/dev/null bs=900000
3300703+0 records in
3300702+0 records out
2970631800000 bytes (3.0 TB) copied, 133.523 s, 22.2 GB/s

and I suspect others can get a lot faster than that ...
 
Associate
Joined
21 May 2007
Posts
1,464
I love the idea of bogomips.

"all mips measures are bogus, therefor, we'll measure how many times the cpu can do crap all in a second, and it'll be uber bogus, but of a standard level of bogosity, useless in absolutes, vital in comparison"
Roughly speaking.
 
Associate
Joined
5 Jan 2003
Posts
752
Location
Norfolk
PPC MiniMac (Debian)
Code:
chrisb@basil:~$ dd if=/dev/zero of=/dev/null bs=900000
17425247+0 records in
17425246+0 records out
15682721400000 bytes (16 TB) copied, 556.307 seconds, 28.2 GB/s
 
Associate
OP
Joined
2 Nov 2005
Posts
931
Location
Leicester
Code:
john@john ~ $ dd if=/dev/zero of=/dev/null bs=900000
146806235+0 records in
146806234+0 records out
132125610600000 bytes (132 TB) copied, 6822.07 s, 19.4 GB/s

You left it going for ages haha...

I tried it on my websites server and I got:
Code:
root@nonobloodyno:~# dd if=/dev/zero of=/dev/null bs=900000
330224+0 records in
330223+0 records out
297200700000 bytes (297 GB) copied, 25.2935 s, 11.8 GB/s

root@nonobloodyno:~#

Swanster appears to be winning so far...
 
Last edited:
Associate
Joined
21 May 2007
Posts
1,464
Isn't it funny though, how all the little proggies that form the core of Linux, like cat and top and ps and dd and all those things, can provide so much endless entertainment.

I must think of new things to do with cat every other day (that's ConCATinate, as opposed to a member of the family Felus).
And the really odd bit is, that you'd not necessarily find them, or find out their abilities in normal modern day-to-day Linux use. These days you'll only know much about them if you've read a book or just happen to be an oldschool *nix dude, who actually used it for real work once.


example of dd........
Don't want to pay ££££ for Acronis trueimage?

(to backup a windows C:\ to a backups partition mounted in Linux.

dd if=/dev/hda1 | gzip > /mnt/backups/saveass.img.gz

to restore.......

gunzip /mnt/backups/saveass.img.gz | dd of=/dev/hda1

( you can do the same exact thing with cat as well)
 
Back
Top Bottom