5.3.1 Estimating virtual memory usage of the J2EE server
This section describes how to estimate the virtual memory that is used. For details about the option for invoking JavaVM used in the formula for calculating the virtual memory usage, see 7.2.6 Configuration of memory space used by JavaVM when using serial GC and JavaVM options.
Moreover, when you use the Explicit Memory Management functionality, apart from the contents described here, you must provide the estimation of the memory size used by the Explicit Memory Management functionality. For details on estimating the memory size used by the Explicit Memory Management functionality, see 7.11 Explicit heap tuning.
- Organization of this subsection
(1) Formula for calculating virtual memory usage
The formula for calculating (Unit: Megabytes) virtual memory usage is as follows:
Virtual-memory-usage-of-J2EE-server = A + B + C + (D + 22 + E) × F + G + H
Legend:
-
A: Java heap size
The default value is the value specified in the -Xms option when invoking JavaVM. This value is extended up to the maximum value specified in the -Xmx option when invoking JavaVM on running J2EE server.
-
B: Metaspace area size
The default value is the value allocated by the JavaVM. This value is extended up to the maximum value specified in the -XX:MaxMetaspaceSize option when invoking JavaVM on running J2EE server.
-
C: Area size used by native program
The value used differs for each OS. The following table describes the value of the area size used by native programs for each OS:
Table 5‒14: List of values of the area size used by native programs OS type
Value of area used
(Unit: megabytes)
Windows
300
AIX
400
Linux
600
-
D: Number of J2EE server threads
Number of threads used by J2EE server. For details about the number of threads used by J2EE server, see 5.2.1 Estimating the resources used by J2EE server.
-
E: Number of G1 GC threads
Number of threads created when using G1 GC. G1 GC threads are not created when using Serial GC. When using G1 GC, specify a value equivalent to three times the number of logical CPUs.
-
F: Stack area size
This is the value specified in the -Xss option while invoking JavaVM.
-
G: Explicit heap size
The size of Explicit heap used by explicit heap management functionality. This value can be extended up to the maximum value specified in -XX:HitachiExplicitHeapMaxSize when invoking the J2EE server.
-
H: Maximum size of the code cache area
This value is specified in the option -XX:ReservedCodeCacheSize, when JavaVM is invoked.
(2) Notes when calculating the virtual memory usage
-
The value of the area size used by native program keeps on changing. The value changes in the following cases:
-
When you change the trace size of ORB
-
When you change the value of area size used by JDBC driver
-
When you change the value of area size used by native library of products in use
In such cases, add the memory used for each product to the value of the area size used by native programs. Calculate the memory used for each product as per the documents of the products in use.
-
-
The virtual memory used in the standard configuration of the batch server might exceed the estimates due to the impact of the software products in use. Add this exceeded value to the value of the virtual memory used. To calculate the increased memory, calculate the memory used for each product according to the documentation of the software products.
-
In Linux, the system slows down if the memory swap file size is insufficient. We recommend that you specify the real memory size as the upper limit of the virtual memory.