[PoC] Initial support for Optane PM - #5
Closed
Mark Hildebrand (hildebrandmw) wants to merge 4 commits into
Closed
Conversation
added 2 commits
May 3, 2021 11:42
Minimal changes to the DiskANN code to facilitate placing the dataset
and graph data structures in Optane PM for benchmarking purposes.
Additional flags are added to the `build_memory_index` and
`search_memory_index` executables to provide control over data
structures placement.
Notes:
* This change is only implemented for Linux based systems.
* This change adds an additional dependency of `libmemkind` to support
heap allocations in either DRAM or PM. On Ubuntu systems, this library
can be installed system wide with
```
apt install libmemkind-dev libmemkind0
```
Other distributions require building `libmemkind` from scratch.
* The directory provided as a commandline argument must point to a
properly configured "DAX" (direct-access) filesystem backed by NVDIMMs.
Contributor
|
Mark, Thanks a lot for this contribution. A few questions from the compatibility side:
|
Contributor
Author
|
Hi Harsha, Thanks for the questions!
|
Contributor
Author
|
Hi Harsha, We've added some changes that should let the code work compile and run on both Linux and Windows (the Windows version does not support Optane, but should otherwise work just like before). Please let us know if you run into any issues! |
Contributor
|
closing - cleaning up old prs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there!
This proof of concept PR implements a small set of changes to explore using Optane PM to store the dataset and graph data structures for benchmarking purposes.
Additional arguments are added to the
build_memory_indexandsearch_memory_indexbinaries. These are:Limitations
This PR is mainly meant for benchmarking purposes/start a discussion. As such, it only supports Linux based operating systems.
This change also adds an additional dependency of
libmemkindto support heap allocations in either DRAM or PM. On Ubuntu systems, this library can be installed system wide withOther distributions require building
libmemkindfrom scratch (which fortunately is not too difficult).Furthermore, though it uses persistent memory as if it were volatile memory. If robust persistence is required, a library like PMDK would have to be used. The change set would be larger to support the transactional semantics of PMDK.
Other Notes
The implementation of the
pmem_allocatoras a lazily initialized global is definitely a bit awkward (also definitely not particularly flexible). An alternative could be to replace the raw pointer for the dataset with something like aunique_ptrwith the custom allocator - but this could lead to combinatorial expansion in Index template parameters to support the Cartesian product of datatypes/graph allocators/dataset allocators, which also seems less than ideal. Since allocations are not on the critical path, we could use something likestd::functionto wrap the allocation/free functions. I'm open to suggestions 😃I'm more than happy to answer any questions, make changes to this PR, and provide any assistance in exploring this direction. Thanks!!