Re: Speed-optimized file copy
Re: Speed-optimized file copy
- Subject: Re: Speed-optimized file copy
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Thu, 21 Jul 2011 11:16:06 +0100
On 21 Jul 2011, at 10:56, Quinn The Eskimo! wrote:
> Setting no-cache will disable read ahead. When you think about this, it's pretty obvious why: if there's no caching going on, there's no where to read ahead to. So if no cache is set, one would want to implement read ahead in user space, which brings us back to the producer/consumer approach I outlined in my first email.
Some more point occurred to me:
o FSCopyObjectSync/Async is not a bad try at an optimal file copy engine; it's definitely worth try it out before writing any of your own code.
o The reason why no cache copying is important is that it reduces memory pressure on the system as a whole. If you run gigabytes of data through the UBC, you can end up flushing useful data out of the UBC, which can slow down performance of the system as a whole. This effect used to be /really/ ugly on Mac OS X, but has improved in recent releases. However, by using no cache, and managing the number and size of producer/consumer buffers yourself, you get better control over how much memory gets dedicated to the copy.
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
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