Home


How to avoid fragmentation

Java SDK Release 1.3.1 at SR7, and later, provides command-line options to specify the size of the JVM kCluster and pCluster regions. Refer to Table | -4 for a summary of the switches. For additional information see the IBM Java technology Web page "Diagnosis Documentation," which has a section on garbage collection and performance tuning. The Web address is:

http://www-128.ibm.com/developerworks/java/jdk/diagnosis/142.html

Table 2-4

JVM

region

JVM

switch

 
kCluster -Xk  
pCluster overflowsize -Xp sz,ovfl The -Xp switch has two parameters:
sz = the pCluster size parameter in KB
ovfl = the overflow size parameter in KB

JVM kCluster and pCluster sizing switches

Set the initial sizes of the clusters large enough to help avoid fragmentation issues occurring on your Web site. It is not unusual in a large Java application, such as WebSphere Application Server, that the default kCluster space might not be sufficient to allocate all class blocks.

Example 2-18 Sample garbage collection output using -verbosegc switch

<GC(VFY-SUM): pinned=4265(classes=3955/freeclasses=0) dosed=10388 movable=1233792 free=5658>

In Example | -18, the pinned size value(4265) and classes size value(3955) are about the right size needed for the -Xk parameter. However, we recommend that you add 10% to the reported value (3955)

In the preceding example, -Xk4200 is probably a reasonable setting. The difference between pinned (=4265) and classes (=3955) provides a guide for the initial size of pCluster; however, because each object might be a different size, it is difficult to predict the requirements for the pCluster and pCluster overflow options.

+

Search Tips   |   Advanced Search