What is the difference between the total memory and the max memory?

Rain Vaine
Kilo Sage

Hello,

Do any you have any idea on the difference between the total memory and the max memory in the instance. How are the two used and how does it differ from each other based on their uses?

When I was exploring on the UI pages on system_diagnostic_pages, I am getting values for total memory and max memory.

find_real_file.png

And I am confused on what do i use in case I want to get the number of memory not in use?

Thanks in advance

 

1 ACCEPTED SOLUTION

When you start you JVM, As a best practice you will set Max memory that JVM can extent to. So here total memory cannot be greater or equal to max Memory. It will always be little lesser than max memory. Total memory is the current allocated memory out of the maxmemory allocated to the JVM. If you need more details than you to understand about how JVM allocate memory for the object and garbage collection process running in JVM to free up memory.

Thanks & Regards,
Vasanth

View solution in original post

3 REPLIES 3

Vasantharajan N
Giga Sage
Giga Sage

Please refer to the documentation link, to understand about JVM memory

https://docs.oracle.com/javase/8/docs/api/java/lang/Runtime.html#freeMemory--


Thanks & Regards,
Vasanth

Hello,

Thanks for the path, but can you further elaborate more on this since I am fairly new to scripting and have zero knowledge in java. Much appreciated.

Thanks in advance.

When you start you JVM, As a best practice you will set Max memory that JVM can extent to. So here total memory cannot be greater or equal to max Memory. It will always be little lesser than max memory. Total memory is the current allocated memory out of the maxmemory allocated to the JVM. If you need more details than you to understand about how JVM allocate memory for the object and garbage collection process running in JVM to free up memory.

Thanks & Regards,
Vasanth