0

this is the memory i have on my server (from webmin page) :

Operating system Debian Linux 7 Webmin version 1.760 Kernel and CPU Linux 3.2.0-4-686-pae on i686 Processor information Intel(R) Xeon(R) CPU E5620 @ 2.40GHz, 2 cores Real memory 698.57 MB used, 7.92 GB total Virtual memory 0 bytes used, 2.07 GB total Local disk space 5.51 GB used, 47.17 GB total

and this is the JAVA_OPTS that i have into the startup script of tomcat :

JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms2048m -Xmx2048m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC";

so i have a server with 8Gb RAM, but if I change the -Xmx2048m parameter to a larger value (for example 3072m) tomcat fails to start with a "not enough memory.."

I cannot understand why..

afterbit
  • 383
  • 7
  • 20
  • 32-bit JVM, perhaps? Edit: actually, it seems to be 32-bit OS (i686) – david a. Sep 14 '15 at 15:29
  • In general, 32-bit application can't allocate more than 4G of RAM (it typically is even less than that, depending on operating system and other conditions). – david a. Sep 16 '15 at 12:30
  • Update: In theory, any 32-bit application can't allocate more than 4G of RAM. It is typically less than that, depending on operating system and other conditions (e.g. on 32-bit Windows, the maximum JVM heap size can't be more than some 1.6G). I'm not sure about 32-bit Debian limitations, it's something you might want to find out. Also keep in mind that JVM does not allocate only the heap, it needs some memory e.g. for permgen (seems 256M in your case), the JVM itself and so on. – david a. Sep 16 '15 at 12:37
  • thank you david.. it seems it's a 32-bit limitation : http://www.oracle.com/technetwork/java/hotspotfaq-138619.html#gc_heap_32bit – afterbit Sep 16 '15 at 15:00

0 Answers0