Foros de discusión

Total and Maximum Memory

Trollbahrt Wunderlich, modificado hace 14 años.

Total and Maximum Memory

Junior Member Mensajes: 70 Fecha de incorporación: 11/06/07 Mensajes recientes
Hi all!

In Control Panel > Server Administration I found the memory graphics. I m a bit confused about the terms "total memory" and "maximum memory". For my opinion "total" should be a synonym for "maximum". But this seems not correct, cause my "total memory" is 80% used an my "maximum memory" about 10%.

How can I increase the "total memory"? Or is this not neccesary while the maximum is enough free?

Greetings
Troll
Tarkan Corak, modificado hace 14 años.

RE: Total and Maximum Memory

Regular Member Mensajes: 141 Fecha de incorporación: 7/10/08 Mensajes recientes
Hi Trollbahrt,

Hava a look at JAVA_OPTS in "setenv.sh" (Windows: "setenv.bat"). There you can change the memory parameters (e.g. -Xms512m -Xmx1024) Xms is your Total Memory, and Xmx is Maximum Memory.

Tarkan
Trollbahrt Wunderlich, modificado hace 14 años.

RE: Total and Maximum Memory

Junior Member Mensajes: 70 Fecha de incorporación: 11/06/07 Mensajes recientes
Hi Tarkan!

Thanks! That works :-)

But what is the difference between the meaning of TotalMemory and MaximumMemory?

Troll
Tarkan Corak, modificado hace 14 años.

RE: Total and Maximum Memory

Regular Member Mensajes: 141 Fecha de incorporación: 7/10/08 Mensajes recientes
Trollbahrt Wunderlich, modificado hace 14 años.

RE: Total and Maximum Memory

Junior Member Mensajes: 70 Fecha de incorporación: 11/06/07 Mensajes recientes
yes, off course! it 's a java option!! where is my head!? emoticon

thanks tarkan! emoticon

Troll
thumbnail
devaraj s, modificado hace 10 años.

RE: Total and Maximum Memory

Regular Member Mensajes: 228 Fecha de incorporación: 21/05/12 Mensajes recientes
I have configured memory parameter like below

"JAVA_OPTS=%JAVA_OPTS% -Xms512M -Xmx1024M -XX : PermSize=256M -XX:MaxPermSize=512M


As in previous reply said that totalmemory is xms value and maximum memory is xmx value we had set.
but when i check in liferay control panel ->server administration its showing some other value. Here i am not able to identify this memory meter behaviour.

memory meter values in server administarion part are

Used Memory: 761,741,872 Bytes
Total Memory: 869,400,576 Bytes
Maximum Memory: 954,466,304 Bytes


Can someone help me to understand/read this memory meter?
thumbnail
Achmed Tyrannus Albab, modificado hace 8 años.

RE: Total and Maximum Memory

Regular Member Mensajes: 158 Fecha de incorporación: 5/03/10 Mensajes recientes
devaraj s:
I have configured memory parameter like below

"JAVA_OPTS=%JAVA_OPTS% -Xms512M -Xmx1024M -XX : PermSize=256M -XX:MaxPermSize=512M


As in previous reply said that totalmemory is xms value and maximum memory is xmx value we had set.
but when i check in liferay control panel ->server administration its showing some other value. Here i am not able to identify this memory meter behaviour.

memory meter values in server administarion part are

Used Memory: 761,741,872 Bytes
Total Memory: 869,400,576 Bytes
Maximum Memory: 954,466,304 Bytes


Can someone help me to understand/read this memory meter?



Its 2015. Can anyone explain or answer this guys question.
I am trying to understand the same thing.
thumbnail
Olaf Kock, modificado hace 8 años.

RE: Total and Maximum Memory

Liferay Legend Mensajes: 6403 Fecha de incorporación: 23/09/08 Mensajes recientes
First: For tomcat, you should configure CATALINA_OPTS, not JAVA_OPTS, but this is unrelated to the question, just general best practice.

In memory management it might happen that the JVM allocates some memory but does not provide every single byte to the application as heap space. As a Maximum this JVM is configured to have 1024M and the memory meter shows that the JVM can provide up to 954466304 bytes to the running application. It has not yet allocated all that memory from the OS (rather only 869400576 bytes) and without asking the OS for more memory, this is what is available to the application. After the last garbage collection, when some of the memory has been freed up, Java, Tomcat and Liferay are now using 761741872 bytes of this available memory.

In production environments I recommend to set -Xms and -Xmx to the same value: If, sooner or later, java couldn't allocate up to -Xmx memory from the operating system, you'll probably like to get this message right when you start your server than sunday night at 3 o'clock when the server fails unexpectedly with an out of memory condition.

You might want to read about general java memory handling, which might even be specific to the brand and version of the JVM you're using - the configuration above is (at least) valid for the Oracle implementation of Java7. And your production server will most likely have more finetuned values for the garbage collector and other aspects of the JVM, not just the max. memory.