From the course: Java Memory Management: Values and References
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
JVM tuning - Java Tutorial
From the course: Java Memory Management: Values and References
JVM tuning
- [Instructor] The JVM runs in a certain way and this way can be adjusted with JVM tuning. This requires specifying how the JVM should start. When starting a Java application, the JVM can be given certain options and parameters to do so. It can optimize garbage collection, change heap memory. You can optimize metaspace, which is the previous PermGen memory. This is actually where all the static variables and static methods are being stored. This is special reserved bit of the memory, which you'll see in more detail with more advanced Java memory management topics. And with JVM tuning, you can also dump the heap memory on the OutOfMemoryError. So this all sounds great, but JVM cheating is not as easy as it sounds, and this will be elaborated upon in a later course. But for now just know what can be done and don't worry too much about how it can be done. Tuning typically focuses on three pillars, memory use, latency and throughput. So when to use JVM tuning? Well, whenever the…