Performance Tuning interview questions
Garbage Collection Basics, OutOfMemoryErrors, Stop-The-World Pauses, Thread Dumps
67 questions with answers and explanations · 67 flashcards
Questions (page 1 of 2)
- Why does a memory leak on JVM performance change runtime behavior?Multiple choiceMedium
- In a system using the Z Garbage Collector (ZGC), what is a notable advantage compared to traditional Stop-The-World garbage collectors?Multiple choiceHard
- How would you explain a common cause of a 'java.lang.OutOfMemoryError: Metaspace' error in a JVM application in an interview?Multiple choiceEasy
- How would you explain a key advantage of the Z Garbage Collector (ZGC) over traditional garbage collectors in an interview?Multiple choiceMedium
- CPU is pinned and requests are hanging. Which artifact tells you what threads are doing right now?Multiple choiceMedium
- What does the Z Garbage Collector (ZGC) mainly aim to achieve?Multiple choiceMedium
- In the context of JVM garbage collection, what is the main benefit of using the G1 Garbage Collector over traditional collectors like CMS?Multiple choiceMedium
- Why do teams use a thread dump (jstack) when diagnosing application performance issues in production code?Multiple choiceEasy
- How would you explain a key benefit of using the Z Garbage Collector (ZGC) in high-performance applications in an interview?Multiple choiceHard
- In the context of generational garbage collection, what is the primary role of the 'Old' generation?Multiple choiceMedium
- Why does a 'Thread Dump' in diagnosing JVM issues matter in this design?Multiple choiceMedium
- How does ZGC achieve concurrent memory relocation without significant pauses?Multiple choiceHard
- In what way does G1GC attempt to predict and control pause times?Multiple choiceHard
- When analyzing a thread dump, what type of information would you expect to find?Multiple choiceMedium
- Which aspect of G1GC makes it suitable for applications requiring predictable pause times?Multiple choiceMedium
- Why might an application experience increased latency when using the Generational Garbage Collection model?Multiple choiceMedium
- Which garbage collector is designed to minimize pause times and is suitable for applications requiring low latency?Multiple choiceMedium
- Which tool would you use to analyze memory leaks by inspecting heap dumps?Multiple choiceMedium
- What does the 'RUNNABLE' state indicate in a Java thread dump?Multiple choiceEasy
- Which of the following describes a major advantage of using ZGC over G1GC?Multiple choiceHard
- Why does a Thread Dump in Java matter in practice?Multiple choiceEasy
- What does the java.lang.OutOfMemoryError: Java heap space indicate?Multiple choiceEasy
- Why is it risky to diagnose production latency from GC logs alone?Multiple choiceHard
- Which of the following scenarios is most likely to trigger a 'Stop-The-World' pause in a JVM?Multiple choiceHard
- What can cause a java.lang.OutOfMemoryError: Java heap space?Multiple choiceEasy
- Why does the difference between the Young and Old Generation in the Generational Garbage Collection model matter in practice?Multiple choiceMedium
- In the context of garbage collection, what is a 'young generation'?Multiple choiceMedium
- Which tool would you use to analyze Java heap memory allocation and identify objects consuming the most memory?Multiple choiceMedium
- How does a Stop-The-World (STW) pause affect a running Java application?Multiple choiceMedium
- How would you explain a key difference between the G1GC and the ZGC in terms of handling large heaps in an interview?Multiple choiceHard
- Which of the following scenarios might lead to a 'stop-the-world' pause, even when using a collector like ZGC?Multiple choiceHard
- When might you prefer using G1GC over ZGC in a Java application?Multiple choiceHard
- Which feature of the G1 Garbage Collector helps to minimize pause times compared to traditional collectors?Multiple choiceHard
- How does G1GC differ from traditional garbage collectors in its approach to managing heap memory?Multiple choiceMedium
- How does the G1 Garbage Collector prioritize regions for collection?Multiple choiceHard
- How does the 'jstack' tool help in diagnosing a deadlock situation?Multiple choiceMedium
- When analyzing a thread dump, you notice several threads are in a BLOCKED state waiting on a monitor. What might this indicate?Multiple choiceMedium
- Two services show similar steady-state heap size, but one has much worse throughput. Which explanation fits best?Multiple choiceHard
- What can a thread dump reveal if 500 threads are blocked on HikariPool database connections?Multiple choiceMedium
- In the context of JVM Garbage Collection, what is a 'Stop-The-World' pause?Multiple choiceMedium
- Why do teams use a heap dump when diagnosing application memory issues in production code?Multiple choiceEasy
- Why might you observe a 'runnable' thread in a thread dump that does not seem to be progressing?Multiple choiceMedium
- What does it usually mean if many request threads are parked in HikariPool.getConnection()?Multiple choiceEasy
- How would you use 'jstack' to diagnose an infinite loop in a Java application?Multiple choiceMedium
- Which diagnostic tool is used to capture a snapshot of all JVM threads?Multiple choiceEasy
- What role does Metaspace play in Java's memory model?Multiple choiceHard
- Which garbage collection algorithm is designed to handle large heaps with minimal pause times?Multiple choiceEasy
- How can static references cause memory leaks in Java?Multiple choiceHard
- Which garbage collector attempts to achieve predictable pause times by dividing the heap into regions and collecting them incrementally?Multiple choiceMedium
- Why do teams use ZGC over G1GC in applications with large heaps in production code?Multiple choiceHard