Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

According to the rasbery pi documentation, You can load your OS to a flash card with either /dev/disk or /dev/rdisk.

rdisk stands for raw disk.

/dev/disk is a block level device, why would rdisk be 20 times faster?

Using Mac OSX

Note: In OS X each disk may have two path references in /dev: /dev/disk# is a buffered device, which means any data being sent undergoes extra processing. /dev/rdisk# is a raw path, which is much faster, and perfectly OK when using the dd program. On a Class 4 SD card the difference was around 20 times faster using the rdisk path.

share|improve this question
1  
As a side note, I ran a test and rdisk actually took much longer. –  spuder Aug 13 '13 at 22:26
1  
As another side note, I felt I had to test too then, and found that an rdisk copy (via dd) was almost exactly 4 times faster than using the disk counterpart. –  Travis Griggs Jan 7 at 17:57
    
@TravisGriggs I'm curious which OS, Mac or linux? –  spuder Jan 7 at 18:06
    
Mac OSX 10.9.1 (MacBook Pro 15-inch, Early 2011) –  Travis Griggs Jan 7 at 19:13
add comment

1 Answer

up vote 14 down vote accepted

From man hdiutil:

/dev/rdisk nodes are character-special devices, but are "raw" in the BSD sense and force block-aligned I/O. They are closer to the physical disk than the buffer cache. /dev/disk nodes, on the other hand, are buffered block-special devices and are used primarily by the kernel's filesystem code.

In layman's terms /dev/rdisk goes almost directly to disk and /dev/disk goes via a longer more expensive route

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.