Page tree
Skip to end of metadata
Go to start of metadata

Performance Monitoring Metrics

USXS redesign applications have some built-in monitoring statistics.  One useful one for performance is Metrics.  To get to this, go to System → Monitor → Metrics.  Java Heap can be useful in diagnosing performance issues. In the Name field, put heap if it's not showing.

Java Heap

Setting Java Memory Options

The memory options are set in the docker-compose.override.yml file.  See JVM Configuration in the Production Release setup.  Note we do not recommend setting the java thread stack size.

-XmsSet initial Java heap size
-XmxSet maximum Java heap size

Monitoring Metrics

Note that the metrics shown in the application are in bytes.  Meanings:

heap.committedAmount of memory committed /guaranteed for JVM to use (may be less than the maximum amount).  The amount may change over time.
heap.initThe initial Java heap size (set with -Xmx)
heap.maxThe maximum amount that can be used (set with -Xms).
heap.usagePercent of maximum heap used (used/max)
heap.usedThe amount of memory used

Note that heap.committed is the amount of memory guaranteed available for the JVM and this can be less than the maximum set.  The JVM may fail to allocate memory up to the max if the amount of committed is less than the max set.  The heap usage percent should be less than 80%, otherwise the JVM will do a lot of garbage collection.



In this instance, the maximum heap setting is 2 G.  In the docker-compose.override.yml file, the setting is:  - JAVA_OPTS=-Xmx2g 

47.8% of the maximum memory is used.  However, 52% of the committed memory is used (used/committed). 

Connection Pool Values

To see the values for the current connection pool, go to System → Monitor → Metrics and filter for connection.

Current Settings

The system monitor is used to show current settings. As an example, the db.pool.max settings may need to be changed, and the system monitor is used to verify settings. To get to this, go to System → Monitor → Info, and filter for the setting. 


Default DB.Pool.Max Setting

After changing DB.Pool.Max setting

See DB Pool Max Configuration in the Production Release setup page. After adjusting the pool size (to 40 in this example), and restarting the usxsapp, the settings can be verified:

Note that in this case, the setting appears twice.  It shows DB_POOL_MAx with a value of 40 as an environment setting (env).  That environment setting caused the spring db.pool.max setting to change to 40, which is the desired effect.