-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
Consider increasing max_semi_space_size #2115
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 15 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 15 days if no further activity occurs. Thank you for your contributions. |
cc @matthewkeil re #5829 |
@wemeetagain I had this set on |
As a note, the docs are not super clear about what "semi" space is. But after digging in the codebase its related to young generation and size_t Heap::YoungGenerationSizeFromSemiSpaceSize(size_t semi_space_size) {
return semi_space_size * (2 + kNewLargeObjectSpaceToSemiSpaceRatio);
} |
Memory leak #5851 resolved. Deploying |
Results
all runs are with
|
Moving the new space to The sweet spot for setting new space is at a value similar to the net rate at which objects are created/collected such that they exist in only the from space and do not get moved to the to space (as a net average) when collection occurs. GC tends to drop a bit further (as a % of CPU time) up to roughly as threshold of two times the rate of object creation. At this point though the space is so large that it tends to affect performance of the node, likely do to searching for objects during runtime. Current creation rate on Using a 6h This value is set at the command line however it is possible to programmatically adjust it during startup from historical data. The same is true of the new space adjustment for the network worker and assumptions made here apply to the worker as most of the scavenged garbage is network related. This investigation started with #5829 and that fact was proven out there. As a note once the heap size is set at startup it is not possible to change the value in either case. |
Final not for reference:
To set this value in the future run the node without setting a maxYoungGeneration size and see what the net scavenge collection rate is and set this to the same value. See example in images above. That value seems to be near the sweet spot. If this methodology is refined in the future another note will be added below. |
Closed via #5829 |
According to GC metrics on master the beacon node spends 10% of the time doing Scavenge GC runs.
If the metrics are correct this article suggests increasing
max_semi_space_size
with the flag--max_semi_space_size
to reduce the frequency of these runs.https://www.alibabacloud.com/blog/better-node-application-performance-through-gc-optimization_595119
The text was updated successfully, but these errors were encountered: