Top 3 Jvm Interview Questions
Browse 3 real-world technical and behavioral interview questions about Jvm. Review scenarios, edge cases, and architectural best practices.
Your GC log shows a stop-the-world pause far longer than the collection work inside it. Where did the rest of the time go?
Most likely into reaching the safepoint. Every application thread has to arrive at a poll point before the operation can begin, and one late thread stalls all of them, so the pause is time-to-safepoint plus the actual work. Safepoint logging separates the two.
A service dies with OutOfMemoryError in production. Walk me through diagnosing it.
Read the message text first, because it names which region ran out. Then use the GC log to see whether the live set after each full collection is trending upward, which means a leak, or flat and close to the ceiling, which means the heap is simply too small. A heap dump tells you what is retaining the memory.
How do you optimise Java Virtual Machine (JVM) garbage collection to eliminate tail latency spikes in a game server?
Analyse JVM tuning strategies to prevent Stop-The-World (STW) pauses and ensure predictable microsecond response times for game server logic. It also connects garbage collection to the point an interviewer is testing.