title: C/C++ Linux: fastest write of a fixed chunk of memory to file (1 Hz)
body: <p>On a Linux system, I have one 7MB chunk of memory of fixed size (no growth) whose contents I refresh in a real-time application.</p>
  
  <p>I need to write this chunk of memory to disk (same file) once per second.</p>
  
  <p>Taking into consideration modern (late 2011) CPUs and HDDs, what is the most efficient way to implement this functionality?  I don't care if the write actually takes some time, but as this is a real-time app, I need to return to the running app ASAP.</p>
  
  <p>What methodologies should I be trying?</p>
  
  <p>My baseline is a standard baseline fopen(), binary fwrite(), fclose() cycle.</p>
  
  <p>I have read that mmap() might be useful.  Maybe asynchronous I/O?  Are there other methodologies that I should be benchmarking?  Off the top of your head, which methodology do you think would be fastest?</p>