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

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

Teradata Vantage
Release Number
Release Date
October 2021
Content Type
User Guide
Publication ID
English (United States)

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).


 *** 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 2 GB (2048 MB) out of the maximum memory pool of 8 GB (8192 MB) specified by Xmx, in every node:
JVMOptions: -Xms2048m -Xmx8192m
Increasing JVM memory may impact other workloads that need memory now allocated to JVM.