2.1.4.1 Start Java Service Manager (STRJSM)
The JSM subsystem needs to be started using the STRSBS SBSD (JSM) command.
The STRJSM command submits a JSM instance to the JSM subsystem.
The source code for STRJSM is in the QCLSRC source file in the JSM library.
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 and *.zip 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:
- classes
- jar
- properties
- system
- temp
- trace
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. This value can be changed using 2.1.4.6 Change Default Instance (CHGJSMDFT).
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
Garbage collect initial size.
The possible value range is 256-240000000 kilobytes.
The default is 131,072 kilobytes or 128M.
For more information about the GCHINL keyword refer to the i5/OS JAVA (Run Java Program) command.
For the IBM Technology for Java the GCHINL keyword value becomes the –Xms value.
GCHMAX
Garbage collect maximum 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 Classic JVM is *NOMAX.
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.
This 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 |
… |
|
|
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(*JVM5032) GCHMAX(3407872)
64bit JVM's are limited to 239861760 kilobytes:
STRJSM VERSION(*JVM5064) GCHMAX(239861760)
If you are using the shared classes option (-Xshareclasses), then the maximum GCHMAX value will be less.
Refer to the following IBM Redbook:
IBM Technology for Java Virtual Machine in IBM i5/OS.
For more information about the GCHMAX keyword refer to the i5/OS JAVA (Run Java Program) command.
JOB
Name of submitted instance job.
COUNT
The number of times the instance is submitted.