Create slab allocator for small allocs (< 512 bytes) to avoid hitting the segment allocator constantly #1049
Labels
enhancement
New feature or request
👍 lgtm
state-change
Change to Chainbase and/or fork database on-disk state. Updates require snapshots.
Milestone
Currently, many
nodeos
allocations hit the segment manager. The table below shows the allocations/deallocation which occured during one hour of runningnodeos
.We see that there were:
so 99.7% of allocations were of buffers less than 512 bytes.
We should have slab allocators for small buffer sizes to avoid hitting the segment manager for every small allocation/deallocation, with it heavy cost of rebalancing the avl tree of free blocks.
We propose to have 64 allocators, for each size (modulo 8 bytes) from 8 to 512.
Benefits:
Shared segment allocations after loading Aug-11-2024 snapshot
Runtime 1 hour, debug build of nodeos.
total allocs: 4,010,482,510 bytes
total deallocs: 3,972,943,076 bytes
The text was updated successfully, but these errors were encountered: