Re: disk vs rdisk, was: How to obtain the FAT serial number form a volume
Re: disk vs rdisk, was: How to obtain the FAT serial number form a volume
- Subject: Re: disk vs rdisk, was: How to obtain the FAT serial number form a volume
- From: Chris Suter <email@hidden>
- Date: Thu, 01 Mar 2012 12:43:15 +1100
Hi Chris,
On Thu, Mar 1, 2012 at 7:00 AM, Chris Murphy <email@hidden> wrote:
> I've been curious about the difference between disk and rdisk for some time, when it comes to performance. While dd is not my metric for overall performance, I notice that when using dd to create and image from a disk or volume, or write an image onto a disk or volume, there is a massive difference in performance. Maybe twice the data rate using rdisk compared to disk, across all forms of media, SSD, HDD, and even USB sticks.
>
> However, df reports mounted volumes using disk, not rdisk, yet they don't seem to exhibit the same performance "penalty" when using Finder, or some other application, to read/write files.
>
> I do not require an exhaustive explanation, it's more a curiosity than needing to apply something in practice.
rdisk is a character device and is uncached. disk is a block device
and is cached.
I would guess that the performance issues you are seeing are down to
block sizes. When writing to the cached block device, if you write in
sizes that are less than the block size used by the cache, you'll find
that it has to read the entire block in, write the portion of the
block that has changed and then write the whole block back. Try
increasing the block size that dd uses and see what happens. It
defaults to 512 bytes which will be too low.
Kind regards,
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden