JVMOptions: -Xms3g -Xmx12g -DcacheMaxLimit=5g JavaHybridThreads: 50In this example, the initial allocation of JVM memory (Xms) is set to 3GB out of the maximum memory pool of 12GB (Xmx) in every node and the size of the cache is set to 5 GB.
When a Vantage BYOM query runs, the model is loaded into Java Virtual Machine (JVM) memory.
To check if the JVM has enough memory for your model or models, run the JVMMemStats function included in the Vantage BYOM package. JVMMemStats is a Java UDF that returns the amount of JVM memory in several categories on each node:
Column | Description |
---|---|
Node ID | Node identifier. |
Free Memory | KB of JVM memory available for new objects on this node. |
Used Memory | KB of JVM memory used by instantiated objects on this node. |
Total Memory | KB of total JVM memory on this node (Free Memory on this node plus Used Memory on this node). |
Max Memory | Maximum KB of memory allocated for JVM (-Xmx value) on this node. |
Unalloc Memory | KB of memory designated for new objects on this node but not yet allocated (Max Memory minus Total Memory). |
Example:
SELECT DISTINCT * FROM mldb.JVMMemStats() AS dt
*** Query completed. 2 rows found. 6 columns returned. *** Total elapsed time was 1 second. Node ID Free Memory (KB) Total Memory (KB) Used Memory (KB) Max Memory (KB) Unalloc Memory (KB) ------- ---------------- ----------------- ---------------- --------------- ------------------- 55 4267470 4589568 322098 7456768 2867200 56 3899147 4589056 689909 7456768 2867712
The model must be loaded in each node. If the total free memory ("Free Memory" plus "Unalloc Memory") on any node does not have enough space for your PMML model or models, you can change the minimum and maximum sizes of JVM memory with the -Xms and -Xmx options of the CufConfig parameter JVMOptions. These option changes apply to JVM memory on every node.
JVMOptions: -Xms3g -Xmx12g
The recommended value (-Xmx) for the JVM memory is 8GB, unless using H2OPredict with NLP models where the minimum is 12GB.