Learning goals of this exercise
In this exercise you will learn:
Background for this exercise
Please see Exercise 1 for an overview of running
the javaperf GUI launcher.
In the previous exercise, Exercise 7, we demonstrated the result of setting the perm gen too small.
Steps to follow
compiler=
|
. You will see the Java 2D Demo application start.... Immediately click on the "Transforms" tab.
Then click into the "Shear" area so it fills the entire window.![[Stop]](Stop.png)
Summary
How do you know the perm
gen is sized just right? When you find that the program runs with a comfortable margin of perm gen space.
Can I let the JVM figure the right perm gen size? Sure, in fact
you may want to set initial and maximum values for NewSize and PermGen
just like for Total Heap as described in the
Total Heap section of the Tuning
Garbage Collection with the 5.0 Java™ Virtual Machine document.
As with the old gen exercises, however, we've opted instead to
set these values the same to lead to more predictable results.
Why
is having a tuned perm gen important? If controlling overall
memory consumption is important and you want to gain an incremental
performance benefit by not resizing the perm gen then you gain some
performance by tuning it for your application. Note that
applications that do a significant amount of classloading and unloading
may need to allow for additional perm gen space.
Next Steps
This lab documentation is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.