-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adaptive Radix Tree: high-performance memtable #273
base: 6.4.tikv
Are you sure you want to change the base?
Conversation
Signed-off-by: Little-Wallace <[email protected]>
Signed-off-by: Little-Wallace <[email protected]>
Signed-off-by: Little-Wallace <[email protected]>
Signed-off-by: Little-Wallace <[email protected]>
Signed-off-by: Little-Wallace <[email protected]>
Signed-off-by: Little-Wallace <[email protected]>
Signed-off-by: Little-Wallace <[email protected]>
Signed-off-by: Little-Wallace <[email protected]>
Signed-off-by: Little-Wallace <[email protected]>
Signed-off-by: Little-Wallace <[email protected]>
Signed-off-by: Little-Wallace <[email protected]>
Signed-off-by: Little-Wallace <[email protected]>
Signed-off-by: Little-Wallace <[email protected]>
Signed-off-by: Little-Wallace <[email protected]>
Signed-off-by: Little-Wallace <[email protected]>
Signed-off-by: Little-Wallace <[email protected]>
Signed-off-by: Little-Wallace <[email protected]>
Signed-off-by: Little-Wallace <[email protected]>
Memory UsageI tested the adaptive radix tree and inlineskiplist with 8byte key + 16byte value and 8byte key + 136byte (include 8byte sequence in value). For value = 16byte. For value = 136byte I think the extra memory cost is worth it.
|
Excellent job; I'm interested in your work. Can I work with your on this? I recently worked with art, and I did some micro bench compared with the B tree, which showed that range-scan performance is poor. (sort of similar to the result in the paper ) To improve the range-scan performance, the first idea that comes to my mind is that may be added the double link between the parent node of the leaves, and I'm going to do more research on this idea. For synchronization, we may look at this paper.
see also casbin-mesh/neo#10 |
Background
see more algorithm details in https://db.in.tum.de/~leis/papers/ART.pdf
Adaptive Radix Tree is a kind of Trie and can save more memory capacity but still keep high performance.
But the classic algorithm does not explain how to make it work in concurrency read and write.
Here I port a high performance memtable which based on this paper. I only support it in one thread write, which means that we shall set allow_concurrent_memtable_write false. But ART is 8 times than skiplist, it means that only one thread could make a large throughput.
Perfomance compare
fillrandom : 1.446 micros/op 691349 ops/sec; 89.0 MB/s
fillrandom : 0.283 micros/op 3527534 ops/sec; 454.2 MB/s
TODO
CompressedNode16
like the previous note.Node
andInnerNode
to save memory. Because we do not need to store prefix and prefix_len for a leaf node.