JVisualVM Questions and Answers

JVisualVM | Mock Test

1
As a performance engineer, you suspect that the application (though multi threadeis performing poorly due to lack of sync between the threads. How do you confirm this?
a. Look at the thread tab -> Details. If there is a sync problem, then most of the application threads will be shown in a ‘waiting’ state
b. Look at the disk reads and writes. This will show you the bottle neck for poor thread performance, as most of the threads will be in reading or writing state
c. Look at the monitor tab where the application’s CPU utiization is shown for each thread
d. Look at the VisualVM tab where the heap size will reflect the thread sync issue

Answer : Look at the thread tab -> Details. If there is a sync problem, then most of the application threads will be shown in a ‘waiting’ state

2
The application creates a large number of objects which are fairly “long lived”. The dev team has configured the Young generation size to be 2 times that of the tenured generation’s size. What potential problem will be observed?
a. A memory leak will be observed
b. Large ‘stop the world’ pauses as a minor GC will kick in more often than a major GC
c. Large ‘stop the world’ pauses as the major GC will kick in more often than a minor GC
d. No issues will be observed
Answer : Large ‘stop the world’ pauses as the major GC will kick in more often than a minor GC

3
The application has moved from a smaller ‘dev’ env to a larger ‘test’ env. Which option should the developer tweak so that the initial heap size take more than the default 128M confgured for the dev env.
a. -Xms
b. -Xmx
c. -Xmn
d. -Xml
Answer : -Xms

4
In Oracle, DB time is mixture of all three times in any order
a. WAIT
b. CPU Processing
c. IDLE
d. THREAD RELEASE
Answer : WAIT

5
The hardware box on which the application was hosted was upgraded recently from 8 GB to 64 GB RAM. Which Java option should the developer tweak to increase the upper limit of the JVM
a. -Xms
b. -Xmx
c. -Xmn
d. -Xml
Answer : -Xmx

6
There is an application which creates many short lived objects. These objects are created by various classes. Which type of compiler would be the best fit?
a. Simple complier
b. Generational Compiler
c. JIT compiler
d. Complex compiler
Answer : JIT compiler

7
Under what state will an object be if the JVM has marked it for collection
a. Collected
b. Created
c. In use
d. Deallocated
Answer : Collected

8
Under what state will an object be it has “Strong References”
a. Collected
b. In User
c. Created
d. Deallocated
Answer : In User

9
What is the option used to set the maximum memory in the JVM
a. -Xmx
b. -Xms
c. -Xml
d. -Xmm
Answer : -Xmx

10
What is the option used to set the minimum memory in the JVM
a. -Xmx
b. -Xms
c. -Xml
d. -Xmm
Answer : -Xms