-
Notifications
You must be signed in to change notification settings - Fork 275
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
[HelixTask] Reduce memory footprint to minimize GC pauses #2657
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2657 +/- ##
============================================
+ Coverage 32.40% 33.36% +0.95%
- Complexity 4460 5138 +678
============================================
Files 806 809 +3
Lines 65491 65515 +24
Branches 7994 7994
============================================
+ Hits 21225 21857 +632
+ Misses 42031 41964 -67
+ Partials 2235 1694 -541 ☔ View full report in Codecov by Sentry. |
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.
LGTM , just some minor comments
ambry-clustermap/src/main/java/com/github/ambry/clustermap/MySqlClusterAggregator.java
Outdated
Show resolved
Hide resolved
ambry-clustermap/src/main/java/com/github/ambry/clustermap/MySqlClusterAggregator.java
Show resolved
Hide resolved
Could you please change the title to be more aligned with your change? |
The frontends are timing out connecting to servers because servers are busy with GC. The GC pause is 3-second long because JVM is busy releasing memory consumed by StatsAggregator. The aggregator fetches results for all accounts, containers and partitions to store it in a giant map, which consumes close to 10GB of heap.
This patch fixes this issue by not buffering those stats. Instead it fetches each stat and immediately processes it without saving it for further use.