You are not logged in.
Pages: 1
[root@fackamato-laptop ~]# dd if=/dev/zero of=/dev/null bs=1M count=100000
100000+0 records in
100000+0 records out
104857600000 bytes (105 GB) copied, 10.5889 s, 9.9 GB/s
[root@fackamato-laptop ~]# dd if=/dev/zero of=/dev/null bs=1M count=100000
100000+0 records in
100000+0 records out
104857600000 bytes (105 GB) copied, 25.8666 s, 4.1 GB/s
[root@fackamato-laptop ~]# dd if=/dev/zero of=/dev/null bs=1M count=100000
100000+0 records in
100000+0 records out
104857600000 bytes (105 GB) copied, 16.213 s, 6.5 GB/s
[root@fackamato-laptop ~]#
I know, I mean it reads zeroes into /dev/null in 1MB chunks, but how does it work? What generates the zeroes? Fluctuation is probably because of cpufreq. Is it only cpu-bound or is it memory speed bound too? Just curious...
Offline
/dev/zero is an endless stream of 0's
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
My guess that it's pretty much entirely IO bound.
Offline
My guess that it's pretty much entirely IO bound.
Yeah sure, but where? cpu<>mem? Or entirely in software? Or cache? Or just pure instr/sec * hz..
Offline
Cool, this gave me my first occasion to try and understand something in the kernel sources.
From what I've seen, the driver that manages /dev/zero simply puts all zeroes in the char* output buffer it's passed (actually using an asm routine for it, so it's probably as efficient as can be). Piping to /dev/null pretty much does nothing at all.
I can't really follow the call stack to those functions but it's pretty certain it totally bypasses the I/O subsystem.
As for experimental data, dding from zero to null on my machine maxes out my cpu usage and the throughput only depends on cpu availability.
Last edited by Arkane (2009-02-18 21:14:27)
What does not kill you will hurt a lot.
Offline
Pages: 1