BOB
BOB

Reputation: 87

max Java memory + TOMCAT + server with 144GB RAM

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

Upvotes: 8

Views: 6981

Answers (2)

BOB
BOB

Reputation: 87

I know that 111000M ought to be enough for everyone ..... but it is not. I do have 144GB of real memory + 200GB swap (I know, I know ....)

Problem starts when I start TOMCAT.

I am using LINUX as my OS. In catalina.sh i use those options

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 

I really need memory and those "extra" 20GB will make a difference for some time (i know that I will need to upgrade memory soon (192 because of

hardware limit and buy new server wuth 512GB ram but it will be in the future. I am nowhere near there [yet])

I did get out of Heap space I did continue decreasing (from 135000) by 1000 and TOMCAT did start to work when i reached 111000M

I do not have anything else running on that server.

On "idle" when TOMCAT is stoppped LINUX "takes" ~ 800-900MB of RAM. I have never reached more than 1GB ram on "idle" (of couse it is ~500M after

restart and than "grow" to ~1GB).

SO i do have 143-GB RAM (let say 140GB RAM).

I would really love to get 135000M. I know that it is a lot of increase but application that is installed on TOMCAT eats memory (really does).

So far I have found that when Xms=Xmx - performance is far the best (and it soles lots of JAVA problems - but that is what we experienced over the

years).

Those setting

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 

Work for us the best. We did try a lot of different options (not all to be honest) and those ones works. But those exta 20GB RAM.......

What is your full GC time for a process with 110G (Server is 4x6core (hyperthreaded cpu) so 24cores, 48threads) takes ~ 3- minutes. In the code we

"force" to run full GC overnight as a part of maintenance process.

Emil: Thank you for the tip with using G instead of M. I will try that. And following that link you gave me. I have never came across BigApp option. I will try that.

Before i start tomcat i do have memory avalible.

I did even fresh restarts and start from 0 (should be from 0 to hero but .....).

I do have few smaller servers (128GB ram and 4x4core CPUs) aI will try to make changes there. If works that OK if not - will dig further

Thank you Bob

Upvotes: -1

Aaron Digulla
Aaron Digulla

Reputation: 328604

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).

Upvotes: 2

Related Questions