I need a way to store large data chunks(~1-2MB) at a high rate (~200-300Mbit/s).
After some research I found several options:
aio_write- Direct_IO
- Carbon File Manager’s
PBWriteForkAsync() - default
fwrite(), wrapped in a block and dispatched via GCD - NSData’s
appendDatain an NSOperation - …
This wiki page describes the state of aio_write under Linux. What I didn’t find was a similar page about the state of aio_write for Mac OS X.
NSOperation or Blocks+GCD seems to be a technique to achieve non-blocking IO. It is used in several open source IO libraries (e.g. https://github.com/mikeash/MAAsyncIO)
Has someone with a similar problem found a suitable solution?
Currently I tend towards PBWriteForkAsync as it takes some ‘tuning’parameters. It also should be 64-bit safe.
I don’t know MacOS very well, but I’d also try
openandwritesyscalls fromunistd.hwith the non-blocking optionO_NONBLOCK. reference