[1] These slides claim up to 32 bytes, which would be a practically useful length: https://www.snia.org/sites/default/files/ESF/Key-Value-Stora... but the current revision of the standard only permits two 64-bit words as the key ("The maximum KV key size is 16 bytes"): https://nvmexpress.org/wp-content/uploads/NVM-Express-Key-Va...
Ask HN: Why are there no open source NVMe-native key value stores in 2023?
11–20 of 74 posts
Re: Ask HN: Why are there no open source NVMe-native key value stores in 2023?
#12Re: Ask HN: Why are there no open source NVMe-native key value stores in 2023?
#13Naive question: are there really expected gains to address natively an NVMe disk wrt using a regular key-value database on a filesystem ?
I believe that NVMe uses multiple I/O queues compared to serialized access with SATA and I think you’d be able to side unnecessary abstractions like file systems and block-based access with an NVMe-specific datastore. I’m also curious if different and more performant data structures can leveraged; if so, there may be downstream improvements for garbage collection, retrieval, and request parallelism.
Re: Ask HN: Why are there no open source NVMe-native key value stores in 2023?
#14There's actually an NVMe command set which allows you to use the FTL directly as a K/V store. (This is limited to 16-byte keys [1] however, so it is not that useful and probably not implemented anywhere, my guess is Samsung looked at this for some hyperscaler, whipped up a prototype in their customer-specific firmware and the benefits were lesser than expected so it's dead now) [1] These slides claim up to 32 bytes,…
16 bytes is long enough that collisions will be super rare, and while you obviously need to write code to support that case, it should have no performance impact.
Re: Ask HN: Why are there no open source NVMe-native key value stores in 2023?
#15https://github.com/OpenMPDK/KVRocks Given however, that most of the world has shifted to VMs, I don't think KV storage is accessible for that reason alone because the disks are often split out to multiple users. So the overall demand for this would be low.
Re: Ask HN: Why are there no open source NVMe-native key value stores in 2023?
#16There's actually an NVMe command set which allows you to use the FTL directly as a K/V store. (This is limited to 16-byte keys [1] however, so it is not that useful and probably not implemented anywhere, my guess is Samsung looked at this for some hyperscaler, whipped up a prototype in their customer-specific firmware and the benefits were lesser than expected so it's dead now) [1] These slides claim up to 32 bytes,…
Re: Ask HN: Why are there no open source NVMe-native key value stores in 2023?
#17There's actually an NVMe command set which allows you to use the FTL directly as a K/V store. (This is limited to 16-byte keys [1] however, so it is not that useful and probably not implemented anywhere, my guess is Samsung looked at this for some hyperscaler, whipped up a prototype in their customer-specific firmware and the benefits were lesser than expected so it's dead now) [1] These slides claim up to 32 bytes,…
If so, that is probably the reason for a 16 byte key - there is just no way anybody needs a key bigger than 16 bytes for an address anytime soon.
Re: Ask HN: Why are there no open source NVMe-native key value stores in 2023?
#18Naive question: are there really expected gains to address natively an NVMe disk wrt using a regular key-value database on a filesystem ?
Latency ought to be much better, since you're skipping several abstraction layers in the kernel. But that's about it. And the latency is still worse than in-memory solutions. Between that and the non-trivial effort needed to make this work in any sort of cloud setup (be it self-hosted k8s or AWS), it's a hard sell. If I really need latency above all, AWS gives me instances with 24TB RAM, and if I don't… why not just…
Re: Ask HN: Why are there no open source NVMe-native key value stores in 2023?
#19SolidCache and SolidQueue from Rails will be doing that when released. Otherwise though…you have the file system. Is that not enough?
https://github.com/rails/solid_cache didn't include anything about NVME that I could find.
Re: Ask HN: Why are there no open source NVMe-native key value stores in 2023?
#20Naive question: are there really expected gains to address natively an NVMe disk wrt using a regular key-value database on a filesystem ?