...
ID | IEP-32 | ||||||
Author | |||||||
Sponsor |
| ||||||
Created | |||||||
Status |
|
Table of Contents |
---|
Currently batch updates on page memory level are not implemented in Ignite. Internal structures, such as BPlusTree and FreeList, do not support them. The performance of batch operations (putAll, datastreamer, preloader) can be improved by implementing batch updates on page memory level.
Profiling the current rebalancing process shows that most of the time spent on working with FreeList and B+ Tree (details).
Currently, when updating the batch of cache entries in off-heap, each of them is processed separately. Such update in PageMemory consists of the following steps:
...
To prevent a redundant secondary search in B+ Tree the invoke operation was introduced.
Let's describe the B+ Tree in more detail to understand the need for invoke operation.
...
Code Block |
---|
OffHeapManager.invoke |-> BPlusTree.invoke | | | | | | | |-> Invoke.invokeClosure() | | |-> UpdateClosure.call(foundRow) | | | |- compare entry version | | | |- newRow = create newRow on data page | | | |- treeOp = PUT/REMOVE/NOOP | | | | | \-> read treeOp -> create operation closure (Put(newRow)/Remove(row)) | | | \-> Invoke.found()/notFound() -> exec operation closure | | \-> finishUpdate/finishRemove |
Saving a key-value on data page consists of the following operations:
The batch will improve:
Implementation should consists of two major related improvements:
draw.io Diagram | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Find the most free page with enough space for data row in FreeList (if there is no such page - allocate new one) and fill it up to the end.
TBD: describe the implementation.
Overall changes to support batch updates in PageMemory can be divided into following phases.
// Describe project risks, such as API or binary compatibility issues, major protocol changes, etc.
// Links to discussions on the devlist, if applicable.
// Links to various reference documents, if applicable.
Jira | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|