I have a java program, which i ran and figured out its process id with jps.
How can i see what is the value of -Xms and -Xmx variable for this java process ?
The flag Xmx specifies the maximum memory allocation pool for a Java virtual machine (JVM), while Xms specifies the initial memory allocation pool. This means that your JVM will be started with Xms amount of memory and will be able to use a maximum of Xmx amount of memory.
The default values for Xmx is based on the physical memory of the machine. The Xmx value is 25% of the available memory with a maximum of 25 GB. However, where there is 2 GB or less of physical memory, the value set is 50% of available memory with a minimum value of 16 MB and a maximum value of 512 MB.
The flag Xmx specifies the maximum memory allocation pool for a Java Virtual Machine (JVM), while Xms specifies the initial memory allocation pool. The memory flag can also be specified in different sizes, such as kilobytes, megabytes, and so on.
Try
jcmd <PID> VM.command_line
jcmd <PID> VM.flags
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With