-
Notifications
You must be signed in to change notification settings - Fork 6k
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
DBENGINE v2 - improvements part 8 #14319
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ion receivers ignores chart and dimension states when rbegin is also ignored
github-actions
bot
added
area/collectors
Everything related to data collection
collectors/plugins.d
labels
Jan 24, 2023
…nto dbengine2-improvements8
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/aclk
area/collectors
Everything related to data collection
area/daemon
area/database
area/streaming
area/web
collectors/plugins.d
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Minimize use of
malloc()
for pagesA netdata parent receives 1M points per second from about 200 Netdata children.
Every a few minutes, this happens (stops digesting more data for about 5 seconds, then it catches up):
The reason is this (about 60k new pages added to main cache, more than 150k - probably smaller pages - had to be evicted to make room):
We traced the problem to
malloc()
. A lot of data had to be allocated and deallocated and this created this effect.This PR keeps the deallocated pages as buffers and when new pages are needed uses the cached ones, to avoid allocations.
3 page sizes are cached, the ones needed by the storage tiers.
Every 1 second, a cleanup is running that removes 1 page per size from the cache. So, the system tries to cleanup all the time, but as the cycle of allocation and deallocation repeats the system stabilizes automatically at the really needed size for the cache.
Other improvements