Ctrl K
Java · Mid-level · Theory

A service running on G1 periodically has pauses of one to two seconds, and it's hurting latency. What would you do, and when is it worth looking at a different garbage collector?

~4 min by voice

How to approach it

This checks whether you can diagnose GC problems from data rather than by guessing: read the GC logs, tell normal G1 pauses from emergency ones, find the cause, and consciously choose between tuning, changing the code and switching collectors, understanding the cost of each option.

Have you seen this question in a real interview?
Answers0
Avg. score—
Strong—
Practiced0
Topics
Similar questionsHow is reflow different from repaint, and why does frequent reflow hurt performance? JuniorYou have a Java service with a 30 GB heap, and the business is complaining about long pauses. How would you choose and tune the garbage collector? SeniorA load test showed that at 500 requests per second, response time grew from 200 milliseconds to three seconds. How would you track down the cause, and what would you put in the report? Mid-levelHow do you track down a performance bottleneck in Python code? What's the most telling case from your own experience? SeniorWhat is the garbage collector in Java, and how does it figure out which objects can be removed? Junior

Answer by voice

The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.

Sign in to answer

Best with headphones · ~4 min