Tuning Java virtual Machine

WebSphere application server is a Java based server and requires a Java virtual machine to run the server and applications deployed on it. Tunning underlying Java virtual machine can play a major role in tuning performance. The WebSphere Application Server runs on different JVMS. In most of the cases it is IBM JDK, but on Solaris it is Sun JDK,.. What parameters you can use and the syntax to set there values depends on the type of JVM your tuning.

The parameters that can be used for tuning JVM can be divided into following three types and you can tune all three of them from WAS Admin Console this page

  • Java memory or heap tuning: Java memory or heap controls the amount of memory that is allocated for use by individual application server instance. You can change the JVM both initial and maximum heap size. Increasing this parameter increases the memory available to the application server, and reduces the frequency of garbage collection. Increasing this setting can improve server response time and throughput. However, increasing this setting also increases the duration of a garbage collection when it does occur. This setting should never be increased above the system memory available for the application server instance. Increasing the setting above the available system memory can cause system paging and a significant decrease in performance. Tuning value of initial heap size reduces the overhead of garbage collection, which improves server response time and throughput. You can change the initial or maximum heap size by changing value of "Initial heap size" and "Maximum heap size" fields.
  • Garbage collection tuning: When the JVM cannot allocate an object from the current heap because of lack of contiguous space, the garbage collector is invoked to reclaim memory from Java objects that are no longer being used. Each JVM vendor provides unique garbage collector policies and tuning parameters. You can set the garbage collection policy by passing it as command line parameter using -X option suitable for your JVM. The generational garbage collection is the best performing garbage collection policy, Also by default, the JVM unloads a class from memory whenever there are no live instances of that class left. Class unloading can degrade performance. Turning off class garbage collection eliminates the overhead of loading and unloading the same class multiple times.
  • Start up versus runtime performance optimization: In some environments, such as development environment, it is more important to optimize the startup performance of your application server rathar than the runtime performance. In production or test environment it is more important to optimize the runtime performance than startup performance.The Java JIT compiler has a big impact on whether startup or runtime performance is optimized. The initial optimization level that the compiler uses influences the length of time it takes to compile a class method, and the length of time it takes to start the server. For faster startups, you should reduce the initial optimization level that the compiler uses. However if you reduce the initial optimization level, the runtime performance of your applications might be degraded because the class methods are now compiled at a lower optimization level. The share classes option of the IBM Java 2 Runtime Environment (J2RE) Version 1.5.0 lets you share classes in a cache. Sharing classes in a cache can improve startup time and reduce memory footprint. Processes, such as application servers, node agents, and deployment managers, can use the share classes option.

    palak pal said...

    A nice tutorial on
    JVM Architecture Specification Basic The Heap Area Introduction, teach about the JVM Heap Area in details

    JVM Architecture Specification Basic The Method Area explained, teach about the JVM method area

    srjwebsolutions said...

    We are leading responsive website designing and development company in Noida.
    We are offering mobile friendly responsive website designing, website development, e-commerce website, seo service and sem services in Noida.

    Responsive Website Designing Company in Noida
    Website Designing Company in Noida
    SEO Services in Noida
    SMO Services in Noida

    Vikas Chaudhary said...

    Battery Mantra is Authorized exide car battery dealer in Noida and Greater Noida. We are providing our service in Indirapuram, Delhi, Ashok Nagar.

    Exide Battery Dealer in Noida
    Battery Dealer in Noida
    Authorized Battery Dealer in Noida
    Car Battery Dealer in Noida
    Car Battery Dealer
    Exide Battery Dealer

    EG MEDI said...

    Egmedi.com is online medical store pharmacy in laxmi nagar Delhi. You can Order prescription/OTC medicines online.
    Cash on Delivery available. Free Home Delivery

    Online Pharmacy in Delhi
    Buy Online medicine in Delhi
    Online Pharmacy in laxmi nagar
    Buy Online medicine in laxmi nagar
    Onine Medical Store in Delhi
    Online Medical store in laxmi nagar
    Online medicine store in delhi
    online medicine store in laxmi nagar
    Purchase Medicine Online
    Online Pharmacy India
    Online Medical Store