Use and performance tuning of WebLogic JRockit

Source: Internet
Author: User
Tags garbage collection min xms

A Introduction to JRockit Tuning

JRockit is an adaptive JVM that automatically adjusts itself to the underlying hardware, so its tuning is focused on some parameters that require manual intervention, such as how much RAM to use for JRockit. JRockit has a set of non-standard-X startup options that we can use to tune the JVM. JRockit has two main sets of subsystems that can be optimized-memory management systems (including garbage collection) and threading systems. In the memory management subsystem, there are a lot of tuning work to do.

Two Tuning WebLogic JRockit JVM

1. Set initial heap Size

You can set the initial heap size by-xms:<size>m, and if the value of-XMX is less than 128MB, the default value of-XMS is 16MB, and if the-XMX setting is greater than 128MB, the-XMS default is 25% of the physical memory, and the maximum does not exceed 64M. Example:

-xgc:gencon-xms:64m-xmx:64m MyClass

2. Set maximum heap Size

You can set the maximum heap size by-xmx:<size>m. Under the IA32 architecture, the maximum heap size cannot exceed 1.8G because the operating system gives each process a maximum memory addressing space of 1.8G. Under the IA64 framework, there is no 1.8G limit.

If your Java application is running with an out of memory error, you will need to increase the maximum heap size. If the maximum heap size is not set, the default value is:

1. If the-xgc:gencopy is set, the maximum heap size is min{400, physical memory *75%};

2. If no-xgc:gencopy is set, the maximum heap size is min{1536, physical memory *75%};

It is best to manually set the maximum heap size to 75% of physical memory (1024M):

-xgc:gencon-xms:64m-xmx:768m MyClass

3. Set the size of the nursery

You can use-xns:<size> to set the size of the nursery, and we need to maximize the size of the nursery while keeping the garbage collection pause (garbage Collection-pause) as short as possible, This is especially important when creating a large number of temporary objects. The default values are:

1. For-xgc:gencopy, the default nursery size is 320KB/CPU, and for 10 CPU systems, the nursery size is 3200KB (3.2M)

2. For-xgc:gencon, the default nursery size is 10M/CPU, and for 10 CPU systems, the nursery size is 100M

4. Defining the time to clean up the memory space

You can use-xcleartype:<gc|local|alloc> to define when the memory space that has been garbage collected can be cleaned up and support the following three ways:

1. GC, which cleans up memory while garbage is collected;

2. Local, when allocating a piece of thread-local area to clean up the memory, only when the parameter-xallocationtype set to the regional only use;

3. Alloc, cleans up when this memory is allocated to other objects. Not yet supported on the IA64.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.