-
Notifications
You must be signed in to change notification settings - Fork 804
Split Block table #4053
Copy link
Copy link
Open
Labels
databaseRelates to lmdb or rocksdbRelates to lmdb or rocksdbdatabase structureIf the database changes it needs updating in the nanodb repositoryIf the database changes it needs updating in the nanodb repository
Milestone
Description
Currently the block table maps block_hash -> block data. Each block is keyed on random data which causes frequent database page splits, hurting performance and causing internal fragmentation. For highest performance and lowest internal fragmentation, the database should append data whenever possible.
Splitting the block table in to one table mapping block_hash -> index and another table mapping index -> block_data significantly reduces the amount of fragmented data. Initial tests show disk space saving up to 50%, a speed up for non-seeking disks, and a significant speed up for seeking disks (HDDs).
Organizing blocks this way has the side effect of providing a topology sort of blocks which can be used for incremental ledger snapshots.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
databaseRelates to lmdb or rocksdbRelates to lmdb or rocksdbdatabase structureIf the database changes it needs updating in the nanodb repositoryIf the database changes it needs updating in the nanodb repository
Type
Projects
Status
In Progress / V28.0