4 ms·
> I'm not sure that using mmap(2) is enough. You're still writing pages, so you're writing more than you have to, so writes will not go as fast on NVM as they c
by mtanski 9y ago
> I'm not sure that using mmap(2) is enough. You're still writing pages, so you're writing more than you have to, so writes will not go as fast on NVM as they could.
If you're using the new fangled memory there's a few components in play.
First in Linux there's DAX. DAX lets you mmap in the devices pages directly without going through the page cache. And the processor can handle this like a memory mmaped device (without interactions from the OS) including subpage read/writes.
Second, Intel chose to reuse previously existing operations that you would normally use for flushing cache lines (to main memory). Previously there were going to use additional pcommit operation. https://software.intel.com/en-us/blogs/2016/09/12/deprecate-pcommit-instruction https://software.intel.com/en-us/blogs/2016/09/12/deprecate-...
- cryptonector 9y agoI got that. My point is that merely using this is insufficient to make your DB go fast on NVM. As the presentation says, you need to consider changing the on-disk^W^W^Wpersistent storage format to be one that writes less (not so much because of write cycle limits, but because writes are slower, and to reduce the number of additional writes needed in, say, a COW format.