Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

max Java memory + TOMCAT + server with 144GB RAM

Tags:

java

I did my homework and i could not find an answer for my problem.

I have a server with 144GB ram (147456MB) I do have java JDK 1.6.0_24-b07 I also have tomcat 7.0.10.0

I would like to assign as much memory as possible.

I would like to have something like Xmx=130000M (or even Xmx=135000M). I want to have as much JVM memory as possible.

Curently i can not jump over 111000M it says Out of Heap Space

JAVA_OPTS="$JAVA_OPTS "-Xms111000M
JAVA_OPTS="$JAVA_OPTS "-Xmx111000M
JAVA_OPTS="$JAVA_OPTS "-XX:PermSize=64M
JAVA_OPTS="$JAVA_OPTS "-XX:MaxPermSize=256M
JAVA_OPTS="$JAVA_OPTS "-d64
JAVA_OPTS="$JAVA_OPTS "-XX:+UseParallelOldGC 

And i really have to have Xms=Xmx I tried a lot of options and I could not jump over. Is it possible to have "bit" extra memory?

Regards Bob

like image 496
BOB Avatar asked Nov 02 '11 13:11

BOB


People also ask

How much RAM do I need for Tomcat?

Tomcat will use 2048MB (Xmx parameter) and the size of the heap from version 1.8 is dinamically assigned by JVM. For this configuration your server needs at least >=3.5GB of RAM (It is a good practice always getting 1GB of free RAM for OS).

What is maximum memory pool in Tomcat?

It is recommended for production usage that the Maximum Memory Pool which is the allocation of memory for Apache Tomcat for BI4 usage be set to 4096 MB as a minimum maxmium memory pool setting. Below is recommendations to follow on what size to set based on reports and number of users for your system.

What is Tomcat default heap size?

For particularly large models it is possible to run out of memory since the Java Virtual Machine (JVM) used by Apache Tomcat sets the maximum heap size to only 64 MB by default.


1 Answers

First of all, Java needs a bit of memory to manage the heap. So if you allocate 1GB heap, it will allocate 1.5GB (heap + permgen + code space + ....). So you need to check how much memory Java really allocates from the OS when you say -Xms111000M -Xmx111000M. Note that you need -Xms or Java will slowly allocate the memory and it will be hard to test the OOM condition.

Also make sure that you actually have that much memory available in a single chunk. So maybe some other process needs a lot of RAM or your RAM is split into two smaller chunks (should not happen with a MMU since all pages for a process will always appear to be continuous but maybe you've found a bug).

like image 168
Aaron Digulla Avatar answered Nov 03 '22 00:11

Aaron Digulla