2.2.4 Start Java Service Manager (STRJSM)

The JSM subsystem needs to be started.

Each JSM instance has its own Java Virtual Machine (JVM).

The JSM instance JVM's current working directory is set to the instance path.

A CLASSPATH is created using the instance classes subdirectory and all the *.jar files located in the jar subdirectory.

You can start multiple Java Service Managers with a different instance directory, different interface and port, etc.

When the JSM instance starts, a check is made for the existence of the following sub-directories below the instance directory:

The Java Service Manager can run on a separate machine to the JSM Client.

When you select the option to start the Java Service Manager, you will be prompted to enter the following:

INSTANCE

The instance defaults to a value of *DEFAULT. This is the recommended value. The default instance is defined in the JSMMGRDTA data area at position 1 to 50.

VERSION

The JVM Version defaults to a value of *DEFAULT. This is the recommended value. Valid values are based on the currently supported versions of the JVM.

OPTION

The option defaults to a value of *NONE. Valid values include *VERBOSE, *VERBOSEGC, *NOCLASSGC.

For more information about the OPTION keyword refer to the i5/OS JAVA (Run Java Program) command.

GCHINL

Initial heap size.

The possible value range is 256-240000000 kilobytes.

The default is 131,072 kilobytes or 128M.

For the IBM Technology for Java the GCHINL keyword value becomes the –Xms value.

For more information about the GCHINL keyword refer to the i5/OS JAVA (Run Java Program) command.

GCHMAX

Maximum heap size.

The possible value range is 256-240000000 kilobytes.

The GCHMAX value determines the maximum heap size of the JVM, the default value is *DFT.

The GCHMAX *DFT value for the IBM Technology for Java is 2G.

For the IBM Technology for Java the GCHMAX keyword value becomes the –Xmx value.

The default value of 2G is too small for a 64-bit Java environment and needs to be increased.

Do not use the maximum value of 240000000 as the IBM Technology for Java command treats this as a *NOMAX value and defaults back to the 2G value.

IBM Technology for Java allocates memory in 256M segments.

The –Xmx value should be a multiple of 256M so allocated memory is not wasted.

The 32-bit JDK can only have a process address space of 4096M (16 segments) and some of these segments are reserved.

Segment Count

Segment MB

GCHMAX Value

1

256

262144

2

512

524288

3

768

786432

4

1024

1048576

5

1280

1310720

6

1536

1572864

7

1792

1835008

8

2048

2097152

9

2304

2359296

10

2560

2621440

11

2816

2883584

12

3072

3145728

13

3328

3407872

 

 

16

4096

4194304

 

 

20

5120

5242880

 

 

24

6144

6291456

 

 

915

234240

239861760

 

From experimentation, these are the maximum GCHMAX values for IBM Java Technology for Java JDK's.

32bit  JVM's are limited to 3407872 kilobytes:

         STRJSM VERSION(*JVM8032) GCHMAX(3407872)

64bit  JVM's are limited to 239861760 kilobytes:

         STRJSM VERSION(*JVM8064) GCHMAX(239861760)

If you are using the shared classes option (-Xshareclasses), then the maximum GCHMAX value will be less.

The GCHMAX parameter controls the maximum size of the Java heap.

If this value is too low, then frequent garbage collection cycles occur.

One of the key performance impacts is the garbage collection cycle which relies heavily on processor power.

Increasing this value increases the memory available to the server, and reduces the frequency of garbage collection cycles.

However, increasing this value also increases the duration of the garbage collection cycle when it does occur, as more memory needs to be freed.

Increasing the value above the available system memory can cause system paging and a significant decrease in performance.

This value needs to be sized to the server workload requirement and available system memory.

If there is a requirement for more memory or additional resources, the best way to provide them is through load balancing.

Refer to Best Practices for Sizing and Tuning the Java Heap.

JOB

Name of submitted instance job.

COUNT

The number of times the instance is submitted.

Refer to 2.7 Java Service Manager Additional Servers.