Memory Size and Function | Vantage BYOM - JVM Memory Size and JVMMemStats Function - Teradata Vantage

Teradata Vantageā„¢ - Bring Your Own Model User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Teradata Vantage
Release Number
6.0
Published
March 2025
ft:locale
en-US
ft:lastEdition
2025-03-21
dita:mapPath
fee1607120608274.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
fee1607120608274
If using H2OPredict with NLP models, the recommended value for the JVM memory is 12 GB. As a prerequisite, if any of the following values are lower than your current configuration, you must set the following parameters in cufconfig. See Changing CufConfig Parameter Values.
JVMOptions: -Xms3g -Xmx12g -DcacheMaxLimit=5g
JavaHybridThreads: 50
In 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.

For example, this line sets the initial allocation of JVM memory specified by Xms to 3 GB out of the maximum memory pool of 12 GB specified by Xmx, in 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.

Increasing the maximum JVM memory pool (-Xmx) in a memory constrained system may impact other workloads that need memory allocated to JVM.