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.
Setting Java Memory Options
|-Xms||Set initial Java heap size|
|-Xmx||Set maximum Java heap size|
Note that the metrics shown in the application are in bytes. Meanings:
|heap.committed||Amount of memory committed /guaranteed for JVM to use (may be less than the maximum amount). The amount may change over time.|
|heap.init||The initial Java heap size (set with -Xmx)|
|heap.max||The maximum amount that can be used (set with -Xms).|
|heap.usage||Percent of maximum heap used (used/max)|
|heap.used||The 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.
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
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.