What is this benchmarking?

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
What is this Linux command benchmarking?

CPU instruction time? L1 cache? L2 cache? Or even RAM?

dd if=/dev/zero of=/dev/null bs=9999999 count=9999999
9999999+0 records in
9999999+0 records out
99999980000001 bytes (100 TB) copied, 532.012 seconds, 188 GB/s

I understand this is a completely pointless test, but this is about theory, not practice. :)
 

byosys

Senior member
Jun 23, 2004
209
0
76
I don't know linux at all, but if the 188GB/s number is correct (and I see no reason it wouldn't be), it must be something on the CPU die. Even the fastest RAM/buses are well below 188GB/s unless this happens to be a exceptionally large server/mainframe (read: costs in the tens of millions of dollars if not more) and even then I'm not sure it's possible. If I had to guess (not knowing any of the linux commnads), I would guess L1 cache fill rate (using data stored on the CPU die).
 

FallenHero

Diamond Member
Jan 2, 2006
5,659
0
0
Originally posted by: silverpig
It tests to see how fast your computer can throw zeros into nothing. :p

does windows have anything that does this? Sounds like a cool, but useless test.
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
This was just done on the rig in my sig (an Athlon 64 3500+@~2211MHz with 2 GB RAM on SUSE 10-64bit) so no large mainframe or anything.

Originally posted by: FallenHero
Originally posted by: silverpig
It tests to see how fast your computer can throw zeros into nothing. :p

does windows have anything that does this? Sounds like a cool, but useless test.

There's a Windows port of dd but I'm not sure if there is something equivalent. Try cygwin or MinGW though.

After copying so many zeroes, does the CPU ever "optimize" itself or "smarten up"? Is branch prediction relevant here?
 

icarus4586

Senior member
Jun 10, 2004
219
0
0
/dev/zero is a stream that always outputs zeroes.
/dev/null is kind of like an output stream, but it does absolutely nothing with the data sent to it.

This test certainly shouldn't have much of anything to do with branch prediction. Only thing it really tests is memory bandwidth. Most likely L1 cache, but not definitely that. It could be L2 or main memory, it depends on the computer, and on the conditions. It's not a specific test.