• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to set or tune the best parameters for the Application ??  RSS feed

 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try setting with -X JVM best options for tuning GC. (If more memory is available, the GC will be lazy ).

Then how can i decide what are the best parameters ??
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi RaviNada,

I don't think there is ONE answer to your question which fits every Java program. As often in software development it simply depends :-) Almost every application will behave slightly different and create different objects at different points of execution. So it's obviously not possible to tune the GC for every program.

Beside this it's almost always a bad idea trying to "help" the JVM or the garbage collectors. Modern GCs are very efficient and will do their best for every average application. Tuning it will only help you if you know that your application performance really suffers from garbage collection and if you have a deeper understanding of how the GC internally works. If the GC isn't a bottleneck then it won't make your application any faster or better when you're playing around with JVM parameters.

If you don't really have problems or special requirements regarding memory management then you shouldn't think too much about the garbage collector. If you experience performance problems then it would be probably more helpful to use a profiler and search for performance or memory problems in your own code! There are often some places where you can "tune" your code without too much work and this will help you much more than tuning the GC.

Of course the situation looks different if you've already figured out that there are indeed problems with the garbage collector...


Marco


 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a lot easier to investigate if you have some way of simulating a load on the application with appropriate monitoring of response time, etc. For web applications you can use HttpClient to write load simulators.

What kind of application is this?

Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!