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

Consider running with GOGC=25 (not 100) #527

Open
Al2Klimov opened this issue Sep 15, 2022 · 2 comments
Open

Consider running with GOGC=25 (not 100) #527

Al2Klimov opened this issue Sep 15, 2022 · 2 comments
Assignees
Labels

Comments

@Al2Klimov
Copy link
Member

To GC earlier and reduce memory spikes.

@Al2Klimov
Copy link
Member Author

The GOGC variable sets the initial garbage collection target percentage. A collection is triggered when the ratio of freshly allocated data to live data remaining after the previous collection reaches this percentage. The default is GOGC=100.

https://pkg.go.dev/runtime

@julianbrost
Copy link
Contributor

This is a classic tradeoff between memory and CPU usage. Given that syncing data shouldn't be CPU-bound in the Go process, I think we can afford using a bit more CPU to keep memory usage lower. But before doing this, we should evaluate this a bit and play around with different values.

@julianbrost julianbrost removed their assignment Oct 5, 2022
@Al2Klimov Al2Klimov removed their assignment Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants