4 ms·
> Sequential spinny disk access is faster than SSD random access. It is, but on both kind of drives you'll want to dispatch at least a couple of requests at on
by GrayShade 4y ago
> Sequential spinny disk access is faster than SSD random access.
It is, but on both kind of drives you'll want to dispatch at least a couple of requests at once to get better performance. In the memory-mapped case, that means using multiple threads.
In addition, you might also want to call madvise(MADV_RANDOM) on the mapping.
- mrkeen 4y agoI didn't think there'd be that much discussion on my point (seq hdd > rand sdd). > In the memory-mapped case, that means using multiple threads. My gut tells me I'd lose more to contention/false-sharing than I'd gain through multithreading - but I haven't done the experiment.