Re: Prioritize my own app's disk access
Re: Prioritize my own app's disk access
- Subject: Re: Prioritize my own app's disk access
- From: Alastair Houghton <email@hidden>
- Date: Wed, 06 Jul 2016 11:25:58 +0100
On 6 Jul 2016, at 11:06, Jonathan Taylor <email@hidden> wrote:
>
> Hopefully my detail above explains why I really do not want to drop frames and/or use a ring buffer. Effectively I have a buffer pool, but if I exhaust the buffer pool then (a) something is going badly wrong, and (b) I prefer to expand the buffer pool as a last-ditch attempt to cope with the backlog rather than terminating the experiment right then and there.
Better, I think, to design it with a worst case in mind to start with, particularly if you know how much RAM is in the machine you’re using. Expanding the buffer space either means you under-sized your buffer pool in the first place, or the I/O system is simply not fast enough (so you’ll have to stop anyway). I suppose if it’s really just a last ditch attempt to capture what you can, it’s OK in that context, but it’s still unclear whether it’ll be a significant benefit in practice.
>> Without knowing exactly how much video data you’re generating and what encoder you’re using (if any), it’s difficult to be any more specific, but hopefully this gives you some useful pointers.
>
> As I say, there is no encoding going on in this particular workflow. Absolute maximum data rates are of the order of 50MB/s, but [and this is a non-optimal point, but one that I would prefer to stick with] this is split out into a sequence of separate files, some of which are as small as ~100kB in size.
OK, well, FWIW, typical spinning disks tend to run at around 80MB/s if you write efficiently; I’d say that 50MB/s in separate 100KB files is actually pretty good going, but I think you’d be much better off writing a single data stream to a single file, and splitting it out into individual frames later if necessary. In the context of TIFF files, it might be worth pointing out that they can already hold multiple images, so you could store the entire sequence in a single TIFF if you wanted (depending on what software you are using to process it after that).
Also, if you’re saving lots of individual image files, I’d strongly recommend turning Spotlight’s indexer off for the folder you’re saving them into, otherwise you’re going to have extra traffic from that. Likewise, you might want to exclude the folder from Time Machine backups (if you’re using those) or—possibly better—turn Time Machine off completely.
RAIDs and SSDs can be much faster, so you might also want to consider using those for storage, particularly if you’re determined to stick with individual files.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden