Fórumok
setting JVM heap size in 64bit JVM
Sreeraj AV, módosítva 11 év-val korábban
setting JVM heap size in 64bit JVM
Regular Member Bejegyzések: 239 Csatlakozás dátuma: 2010.04.27. Legújabb bejegyzések
Below is the system details. This server is dedicated to Liferay portal. I need to change the JVM heap size. Can anyone please tell me what is the optimal heap size i can provide for this particular JVM?
Processor: Intel(R) Xeon(R) CPU E5645 @ 2.40GHz , dual core- 64bit
Memory : 6GB
OS : Linux 64bit
Java : java version "1.6.0_21-ea" 64bit
Processor: Intel(R) Xeon(R) CPU E5645 @ 2.40GHz , dual core- 64bit
Memory : 6GB
OS : Linux 64bit
Java : java version "1.6.0_21-ea" 64bit
Sagar A Vyas, módosítva 11 év-val korábban
RE: setting JVM heap size
Liferay Master Bejegyzések: 679 Csatlakozás dátuma: 2009.04.17. Legújabb bejegyzésekSreeraj AV:
Below is the system details. This server is dedicated to Liferay portal. I need to change the JVM heap size. Can anyone please tell me what is the optimal heap size i can provide for this particular JVM?
Processor: Intel(R) Xeon(R) CPU E5645 @ 2.40GHz , dual core- 64bit
Memory : 6GB
OS : Linux 64bit
Java : java version "1.6.0_21-ea" 64bit
Hi Sreeraj,
You can edit setenv.sh located in "tomcat-New\tomcat-6.0.32\bin"
-Xmx1024m -XX:MaxPermSize=256m" change it to -Xmx1024m -XX:MaxPermSize=512m"
Hope this help.
Thanks,
Sagar Vyas
Chintan Akhani, módosítva 11 év-val korábban
RE: setting JVM heap size
Regular Member Bejegyzések: 111 Csatlakozás dátuma: 2008.03.13. Legújabb bejegyzések
As you have 6 GB memory allocated for liferay instance only, so you can increase heap size upto 4 GB.
Sreeraj AV, módosítva 11 év-val korábban
RE: setting JVM heap size
Regular Member Bejegyzések: 239 Csatlakozás dátuma: 2010.04.27. Legújabb bejegyzésekChintan Akhani:
As you have 6 GB memory allocated for liferay instance only, so you can increase heap size upto 4 GB.
Thanks for your reply. How you are telling 4GB? is there any procedure or best practices to determine the heap size value? Can you please explain..
Linus Sphinx, módosítva 11 év-val korábban
RE: setting JVM heap size
Junior Member Bejegyzések: 99 Csatlakozás dátuma: 2010.08.12. Legújabb bejegyzések
I use apache bench or http_load if non-ssl to simulate a bunch of users banging on the site while monitoring the memory usage in jvisualvm remotely and adjust accordingly til I get the behavior desired.
Given your hardware I'd assume you'll need some resources for other apps like backup etc. and recommend for a starting point a setenv.sh of;
concatenate this to the above string to enable JMX;
Given your hardware I'd assume you'll need some resources for other apps like backup etc. and recommend for a starting point a setenv.sh of;
JAVA_OPTS="$JAVA_OPTS -XX:NewSize=700m -XX:MaxNewSize=700m -Xms2560m -Xmx2560m -XX:MaxPermSize=512m -Dfile.encoding=UTF8 -Duser.timezone=GMT -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=20 -XX: ParallelGCThreads=8"
concatenate this to the above string to enable JMX;
-Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=33100
Mika Koivisto, módosítva 11 év-val korábban
RE: setting JVM heap size in 64bit JVM (Válasz)
Liferay Legend Bejegyzések: 1519 Csatlakozás dátuma: 2006.08.07. Legújabb bejegyzések
Heap is not absolute amount of memory your java process will take. There's several factors and I've quite recently explained them in my blog post: Why is my java process taking more memory than I gave it?
Sagar A Vyas, módosítva 11 év-val korábban
RE: setting JVM heap size in 64bit JVM
Liferay Master Bejegyzések: 679 Csatlakozás dátuma: 2009.04.17. Legújabb bejegyzések
Hi Mika,
Good Sharing,
@Sreeraj : you can follow given formula.
(-Xmx) + (-XX:MaxPermSize) + numberofthreads * (-Xss) + Other mem
Thanks,
Sagar Vyas
Good Sharing,
@Sreeraj : you can follow given formula.
(-Xmx) + (-XX:MaxPermSize) + numberofthreads * (-Xss) + Other mem
Thanks,
Sagar Vyas
Sreeraj AV, módosítva 11 év-val korábban
RE: setting JVM heap size in 64bit JVM
Regular Member Bejegyzések: 239 Csatlakozás dátuma: 2010.04.27. Legújabb bejegyzések
Thanks Mika..
Mika Koivisto:
Heap is not absolute amount of memory your java process will take. There's several factors and I've quite recently explained them in my blog post: Why is my java process taking more memory than I gave it?
Mika Koivisto, módosítva 11 év-val korábban
RE: setting JVM heap size in 64bit JVM
Liferay Legend Bejegyzések: 1519 Csatlakozás dátuma: 2006.08.07. Legújabb bejegyzések
The maximum heap certainly isn't 4GB on a 64bit system. You can increase it well beyond that but doing so may adversely affect the performance of the application because of longer full garbage collection times.
Linus Sphinx, módosítva 11 év-val korábban
RE: setting JVM heap size in 64bit JVM
Junior Member Bejegyzések: 99 Csatlakozás dátuma: 2010.08.12. Legújabb bejegyzésekMika Koivisto:
The maximum heap certainly isn't 4GB on a 64bit system. You can increase it well beyond that but doing so may adversely affect the performance of the application because of longer full garbage collection times.
Must have been thinking 32 bit, thank you. GC is also tunable.
-XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=20 -XX: ParallelGCThreads=8