Linode OOM debug

Hi, Our linode is OOMing ( going out of virtual memory) on a regular basis killing all the java processes and giving a 503 status on on our website : www.mobikwik.com . We run a tomcat server version 5 and jdk 1.5.

We did some debug and found that there are lot of java processes like below consuming a lot of virtual memory :

23.5 0.0 130352 1061148 /usr/bin/jdk1.5.0_12/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/production/apa

che-tomcat-5.5.23/conf/logging.properties -Xms768m -Xmx768m -Djava.endorsed.dirs=/usr/production/apache-tomcat-5.5.23/common/endorsed -classpath :/usr/production/apache-tom

cat-5.5.23/bin/bootstrap.jar:/usr/production/apache-tomcat-5.5.23/bin/commons-logging-api.jar -Dcatalina.base=/usr/production/apache-tomcat-5.5.23 -Dcatalina.home=/usr/prod

uction/apache-tomcat-5.5.23 -Djava.io.tmpdir=/usr/production/apache-tomcat-5.5.23/temp org.apache.catalina.startup.Bootstrap start

Can anyone offer a clue on how to go about debugging the root cause?

8 Replies

What size Linode are you using? Specifying "-Xms768m -Xmx768m" tells Tomcat to use 768MB ram.

Are you running 64-bit? 64-bit Java uses about twice as much RAM as 32-bit does, so I would strongly recommend against using Java on a 64-bit VPS.

I'd strongly recommend against using a 64-bit VPS to begin with. Unless you're dealing with large amounts of RAM (> 2 or 3 GB), you're likely getting no benefit and simply consuming more RAM.

i've always wondered about 32 v 64 bit - having seen many post that 32 is best - but now i wonder - is 64bit better for large RAM setups ? - like perhaps with Zimba setup on a 1440 ? who uses 64bit and why?

Well, things with heavy math do better with 64-bit. If you do a lot of encryption, you'll have much lower CPU with 64-bit. For example, big Tor nodes run better on 64-bit. Although, at least with Tor, you'll run out of bandwidth much faster than CPU.

@BarkerJr:

Well, things with heavy math do better with 64-bit.

As I recall, 64-bit x86 CPUs have 64 bit integer math, but retain 32-bit floating point math.

James

The old joke… "Windows '95 - A 32 bit patch for a 16 bit interface to an 8 bit OS designed for a 4 bit chip from a 2 bit company that can't stand 1 bit of competition… "

@zunzun:

@BarkerJr:

Well, things with heavy math do better with 64-bit.

As I recall, 64-bit x86 CPUs have 64 bit integer math, but retain 32-bit floating point math.

James

Not really, x86 processors got 64-bit integer math with MMX in the Pentium, and they got 64-bit floating point math with SSE on the Pentium III. x86-64 was never about 64-bit math, it was about increasing the address space.

That said, x86-64 does increase the width of general registers from 32-bit to 64-bit, and it doubles the number of general purpose registers and XMM (SSE) registers.

The advantages for larger RAM come from 32-bit processors only being able to address 4GB of RAM.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct