I'm maintaining a single-threaded C++ app that has to write a large binary file from time to time. I'd like to minimize the time spent in { stream(fname); stream.write(largebuf}; }, so hand over the data to the OS (Linux) as fast as possible when writing/closing the stream. I'm not really concerned about when the data is actually written physically to the disk.
This could wery well be an OS tuning question (any pointers are welcome) - I'd just like to know if there's anything I can do within the C++ code to improve turnaround time from the block shown above.
thanks, T.