Re:Why buffered writes are sometimes stalled
by beagle3 on Monday December 15, 2014 @04:23AM
(#8751218)
My experience has been that mmap is not magical for writing in most workloads, but it is mostly magical for reading - I have yet to encounter a real life workload in which mmaping and using memory was NOT easier and at least as fast as reading. On 32-bit systems, however, it's easy to run out of usable address space - 64-bit makes it useful again.
[ Parent
| on HN ]
Re:Why buffered writes are sometimes stalled
by _delirium on Monday December 15, 2014 @09:19AM
(#8752036)
One workload where I find it worse: if my access pattern is sequential reads from the start of a file (no seeking or random access), or could reasonably be rewritten as such. In that case, using mmap() breaks some expected Unixy flexibility, because it demands real files, while there's no reason in this access pattern that your program should die if it finds a named pipe instead. Of course you could test for pipe and provide an alternate read path, but then you might as well just use that for real files too, instead of maintaining two paths.