3 ms·
How does mmap improve download speed?
by matheusmoreira 9y ago
How does mmap improve download speed?
- atomashpolskiy 9y agoNot the author, but I think that the point is to make disk I/O async with respect to requesting and receiving blocks. I.e. request for the next block does not wait for the write of the previous block to complete.
- loeg 9y agoAnd this makes sense when disk is slow and you have much more RAM than network traffic. If RAM is small, while net traffic and disk are both fast, mmap writes may result in poor file layout due to arbitrary OS flush order.