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: Mark Day <email@hidden>
- Date: Thu, 01 Mar 2012 15:39:44 -0800
On Mar 1, 2012, at 3:11 PM, Chris Suter <email@hidden> wrote:
> On Thu, Mar 1, 2012 at 12:49 PM, Mark Day <email@hidden> wrote:
>
>> The caching being done by /dev/disk's read and write paths is very simple,
>> almost brain dead. It caches even if not strictly necessary (like if the
>> device could memory map and directly transfer into your app's buffer). It
>> does small (4KB) I/Os, which leads to a lot of per-I/O overhead. It does
>> not do any read ahead or write behind.
>
> Are you sure about that? It looks like there's a read-ahead of 1 block
> and it uses write behind.
Oops. You're right. If a read is contiguous with the previous read, it will read ahead one block, which I should have noticed with the fs_usage output I provided (the RdMeta[async] operations are due to read-ahead). Writes that end on a block boundary are written immediately, but asynchronously. Writes that don't end on a block boundary are deferred (left dirty in the buffer cache).
The real problem for performance is the small I/Os (even with read-ahead, since it's only reading ahead by 4KB at a time).
Thanks for pointing that out.
-Mark
_______________________________________________
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