DDR4 CAS latency is 15 clocks, which is about 9ns for highest clock frequency. Add to that cache latencies and memory controller latencies and you easily can get about 25-50 ns of latency and more. And to overcome that you have to use stream-friendly algorithms just as with SSD and spinning disks.
The technology of persistent memory is no different than NAND or whateger SSD tech de jour is used. This means that wear will be same as with other SSD drives and may be even worse due to different abmient temperature conditions.
Persistent memory is also more expensive.
The conflicting transactions must be ordered as if they were processed serially, the actual processing order can be different and their committment to disk also can be different than "commit transaction1 and then commit transaction 2". Having these two transactions commit at once or none at all is also permitted by serializable isolation order. Which is heavily used in any semidecent transactional storage engine.
If you go all-in to persistent memory, you lose cheaper multi-tier storage opportunity. You can use heavily read-optimized storage structures on the spinning disks, for example, by rearranging writes to these disks using SSDs and just plain old RAM. If I remember correctly, currently spinning disks are 5 times cheaper than SSD and you can either increase bandwidth or storage volume by using them.
On my 3rd gen Xeon E5 NUMA machine (two nodes) accessing adjacent memory bank is roughly around 90ns under no load. Accessing non-adjacent memory was around 120ns.
> 300ns is a latency of PCIe, not DRAM.
I'd figure that this number improved across different PCIe generations or? Have you got any tool to recommend that can measure this kind of thing? I found https://github.com/andre-richter/pcie-lat but haven't tried it yet.
Transactions must be durable, but that doesn't mean they can't be committed to RAM initially. There are large-scale database systems you have probably heard of that commit to RAM and get their durability from committing to multiple replicas in distinct failure domains.
Databases seem like the obvious answer. Persistent memory / Optane is much faster than NAND Flash... but less dense than NAND Flash. Its also slower than DRAM, but more dense, so it sits in between.
Whether or not that's useful remains to be seen.
The problem with 1 is that you still need to periodically flush to disk (at least once persistent storage is full) which means it’s only an improvement in burst activity and not peak throughput.
The problem with both is complexity of implementation to deliver functionality that can only be used on a (currently) relatively uncommon subset of servers. Probably not something that Postgres would rush to implement, but potentially something that MSSQL or Oracle might consider as a premium feature.
Disclaimer: I haven’t looked into the details of optane and how you interface with that storage in software.
The hard part is developing software to use it. I don't think you can really port existing OSes and software to use a single-level store environment. It's a different language than the one we speak. Seems this has been a general problem for persistent memory, to really use it 100% you need new software designed for it.
The one thing that's relatively new-ish that I'd like to play with is persistent memory. But I'm curious about it for embedded applications where power is not assured. For servers? I don't understand the use case, because datacenters are where we have the most consistent power. Perhaps it'd be more interesting if I ran workloads on large datasets...