time dd if=/tmp/disk.iso of=/dev/null bs=256k
To know the value of block device parameter known as readahead.
blockdev --getra /dev/sdb
And set the a value 1024, 2048, 4096, 8192, and maybe 16384... it really depends on the number of hard disks, their speed, your RAID controller, etc. (see sample)
# Before test $ blockdev --getra /dev/sdb 256 $ time dd if=/tmp/disk.iso of=/dev/null bs=256k 2549+1 records in 2549+1 records out 668360704 bytes (668 MB) copied, 6,84256 seconds, 97,7 MB/s real 0m6.845s user 0m0.004s sys 0m0.865s # After test $ blockdev --setra 1024 /dev/sdb $ time dd if=/tmp/disk.iso of=/dev/null bs=256k 2435+1 records in 2435+1 records out 638390272 bytes (638 MB) copied, 0,364251 seconds, 1,8 GB/s real 0m0.370s user 0m0.001s sys 0m0.370s
Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?
You must be signed in to comment.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: