can't start tomcat on centos with large memory

We are trying to run tomcat 5 with 30G memeory: -Xms30G -Xmx30G, running on centos 5 64bit with 64G memory and 24 CPUs.

we know that the jvm requires contiguous memory, before starting tomcat 'free -m' shows there are 40G available.

what ever we do we can't start the jvm with more then 26G, beyond that it complains on "Cannot allocate memory for initial java heap".

any idea will be helpfull.

 

Comments

what is the size of the swap partition ?

[root@localhost ~]# free -m
                  total       used       free     shared    buffers     cached
Mem:         64465      55556       8909          0        388      42647
-/+ buffers/cache:      12520      51944
Swap:         1983          0       1983
 

if I am not mistaken, swap should be 1.05 of the real memory, seem like it is less?

you mean 1.05 percent ?

no, I meant 105%

So your saying we need 68G swap partition, I'll try to add a swap file at that size and see if it changes anything.

we added a 70G swap file but it didn't help:

[root@localhost ~]# free -m
                  total       used       free     shared    buffers     cached
Mem:         64465       5242      59223          0        194       4727
-/+ buffers/cache:        321      64144
Swap:        73663          0      73663
 

 

when starting tomcat it says:

Invalid initial heap size: -Xms30GB
Could not create the Java virtual machine. �

 

 

java -version:

Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) 64-Bit Server VM (build 11.2-b01, mixed mode)
 

 

 

 

Invalid initial heap size: -Xms30GB ?

It should be "-Xms30g"...

you are right, stupid typo, I must say its not I'm touching this machine, but I should have noticed what the message is saying.

anyway, as always Lior, you were right , without large swap the jvm doesn't start and with a 70G swap it does!

Thanks.