-
Notifications
You must be signed in to change notification settings - Fork 632
feat(single-node): add memory allocation #19895
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a discussion of @Li0k recently on the memory allocation between CN and compator in standalone.
Let's say
CN_MEM = x * Total_MEM
,Compactor_MEM = y * Total_MEM
,FE_MEM = z * Total_MEM
, the choices arex + y + z = 1
.x + y + z > 1
I am more leaning towards 2 because it fits more to the CN dynamic operator cache design. For example, we can have
x = y = z = 0.8
as well as the gradient allocation. WDYT?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CN operator cache is special - keep in mind that it's controlled according to the process-level jemalloc statistics. (See
memory_manager_target_bytes
in next line)Here the 3 options
frontend_opts.frontend_total_memory_bytes
compactor_opts.compactor_total_memory_bytes
compute_opts.total_memory_bytes
Mostly decides decides the storage memory, including uploading buffer and meta & block cache:
frontend_opts.frontend_total_memory_bytes
(code here)batch_memory_limit
compactor_opts.compactor_total_memory_bytes
(code here)meta_cache_capacity_bytes
compactor_memory_limit_bytes
compute_opts.total_memory_bytes
decides (code here)block_cache_capacity_mb
meta_cache_capacity_mb
shared_buffer_capacity_mb
compactor_memory_limit_mb
As you are more familiar with storage, I'll follow your decisions.
Besides, it doesn't count the Meta's memory usage (because there is no such as option), so actually it's already
> 1
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the example above
Total memory is well over 1.0 (0.8 * 3 = 2.4)
My concern is that when we use “excessive” configurations, it will cause the CN's memory to be evicted faster (according to jemalloc statistics), which will severely weaken the CN's capabilities.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also in favor of option 2, but it seems that the limit should not be exceeded. For example, it is only allowed to exceed 0.5 or less, in order to guarantee the capacity of the CN.