3 ms·
Not really. But you could imagine hacks like forcing updates instead of logging to the first N-levels (N = 1 or 2) of the B-tree. I don't know how well that wou
by thorwahnawa 12y ago
Not really. But you could imagine hacks like forcing updates instead of logging to the first N-levels (N = 1 or 2) of the B-tree. I don't know how well that would work in practice.
I do know that B-tree block contention is a big problem for my $DAYJOB's use case for smaller B-trees.
- koverstreet 12y agoBlock contention? You mean contention on the locks for individual nodes?
- thorwahnawa 12y agoYes. You can grab the ancestors shared and the leaf or subtree you want to modify exclusive. If all of your writers land in the root of the tree because it's a small tree, they all contend on the same lock.
- skybrian 12y agoI'm no expert, but it seems like you need to guess at some key ranges and start the BTree at some minimum size even if most of the leaves start out empty. Either that, or don't write anything until the tree grows a bit and rely on a writeahead log for durability. Hotspots could still show up further down, though, if writes aren't fairly random.
- koverstreet 12y agoSo it's only an issue with small trees? I'm not really seeing the issue then, use smaller btree nodes if it's really an issue...
- dignati 12y agoThe issue seems yo be that writes in Fractal trees always go through the root node. This would lead to a situation similar to small B-Trees where writes will most likely access the root node and contend.