Introduction
This article describes which Vault Metrics could be useful when the Linux utilities top and free are showing high memory utilization for the Vault Process.
Looking at the free and top Linux utilities and or Operating System specific Memory utilization metrics only, could lead to a wrong interpretation of the memory utilization by the Vault process.
Scenario
The Linux utility free -h reports a low value in the free column
The Linux utility top reports a high value for the RES column for the Vault Process
The Linux utility top reports a low value for the free column in KiB Mem:
Recommendation
Analyzing the following metrics will provide more insight: vault.runtime.sys_bytes and vault.runtime.alloc_bytes.
Measuring the memory usage reported by top and free, probably matches closely with the vault.runtime.sys_bytes metric.
This metric shows the total number of allocated system bytes includes space currently used by the heap plus space that has been reclaimed by, but not returned to the operating system.
To vizualize the memory that Vault is actually using, it is recommended to monitor the vault.runtime.alloc_bytes metric.
This metric shows the number of allocated bytes by Vault.
The number of allocated bytes may peak from time to time, but should always return to a steady state value in a health Vault installation.