• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Prioritize my own app's disk access
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prioritize my own app's disk access


  • Subject: Re: Prioritize my own app's disk access
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 05 Jul 2016 15:15:45 -0700

> On Jul 5, 2016, at 2:40 PM, Jonathan Taylor <email@hidden> wrote:
>
> As far as the quality of service goes, I can't see the APIs for that (looking in the 10.9 SDK, at least). Am I looking in the wrong place?

IIRC, QoS was added in 10.10.

> I confess that currently I am using pure cocoa -writeToFile:atomically calls. I am fully aware that this is very unlikely to be the best way to do high performance IO, but it's great in terms of convenience.

It probably just opens the file and issues one big write call, which is pretty efficient.

The ways to get more efficient would be to stream the data, if that’s possible — instead of computing everything and then writing it, write the data incrementally while the computation is going on. That interleaves CPU and I/O tasks. It also lowers memory usage, which will help avoid paging.

If the data is too big to fit in RAM but has to be generated up-front, the best approach might be to create the file first, memory-map it as writeable, and then use the mapped address space as the buffer you write the data into.

—Jens
_______________________________________________

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


References: 
 >Prioritize my own app's disk access (From: Jonathan Taylor <email@hidden>)
 >Re: Prioritize my own app's disk access (From: Quincey Morris <email@hidden>)
 >Re: Prioritize my own app's disk access (From: Jonathan Taylor <email@hidden>)

  • Prev by Date: Re: Prioritize my own app's disk access
  • Next by Date: Re: Property synthesis trouble - 32 vs 64 bit builds
  • Previous by thread: Re: Prioritize my own app's disk access
  • Next by thread: Re: Prioritize my own app's disk access
  • Index(es):
    • Date
    • Thread