icasimpan
icasimpan

Reputation: 1333

Where do I start optimizing the JVM?

I'm kinda confused as to where to start looking to optimize my java-based application. Can someone give me some guidance as to what to look for?

Add note:

The java application I'm running is open source but I don't want to tweak it myself as I'm not capable of doing it. So what I'm looking at is on how to optimize the execution environment so as to fit the current behavior of the app. By the way, the application is hudson, a java-based continuous integration system.

Thanks in advance :)

Upvotes: 1

Views: 3308

Answers (4)

Christian
Christian

Reputation: 1697

Before start optimizing try to find out where you do you have a problem. Is your application CPU bound, memory-bound, or I/O bound? When you know this, try to find the biggest performance impact first and try to optimize it. Use Java profilers to find the problems in your application or configuration.

A good starting point for the whole process could be the Java Performance Tuning site.

Upvotes: 5

Peter Lawrey
Peter Lawrey

Reputation: 533750

Before you attempt to optimise the JVM, I suggest you optimise your code. You can use a profiler like VisualVM (free) or YourKit (commercial) to look at CPU and memory performance bottleneck. Often simple changes can make a big difference.

Conversely, you can change lots of JVM options and not be sure its really helped.

Upvotes: 0

alvosu
alvosu

Reputation: 109

  • Read Java HotSpot VM options performance tuning.
  • Try unlock experimental VM options(-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:+UseFastAccessorMethods).
  • Optimizes the code.

Upvotes: 0

Related Questions