Skip to content
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

[Perf] Don't allocate all rocksdb keys #2449

Merged

Conversation

ljedrz
Copy link
Contributor

@ljedrz ljedrz commented May 7, 2024

Most of the rocksdb keys are relatively small, and we can avoid allocating them by using a SmallVec. Based on the heap profiles jemalloc is able to reuse this memory, but it costs CPU time to do so; also, such a change will reduce the number of (alloc-related) syscalls in non-Linux nodes.

The size was chosen to be 64B, as this covers the most common key sizes (including the prefixes).

ljedrz added 2 commits May 6, 2024 16:32
Signed-off-by: ljedrz <ljedrz@gmail.com>
Signed-off-by: ljedrz <ljedrz@gmail.com>
@howardwu howardwu merged commit 3ebe60c into AleoNet:mainnet-staging May 8, 2024
80 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants