High Memory usage but not seen by unix tools

Using Jira v5.1 under SUSE Linux with mySQL running on the same server
JVM memory options : JAVA_OPTS="${JAVA_OPTS} -Xms2G -Xmx2G"
Lastest Java Java(TM) SE Runtime Environment (build 1.6.0_38-b05)
Tomcat
Around 500 registered users
~ half of them currently logged

We experience high total unix memory usage

Free command result (reformated for easy reading)

Before we start our tomcat running only Jira (mySQL started)
Mem : total 8'889'816 ; used 1'546'856 free 7'342'960
After we have fully started Jira
Mem : total 8'889'816 ; used 80846856 free 429'60

The "top" command reports

tomcat VIRT = 3038m RES =2.5g
mysql VIRT = 339m RES=41m

So the top commands tell me that 3038m is used by tomcat/Jira but the free command tells me that
4'304'960 has vanished somewhere !
And I can't regain those 4Gb even when I stop tomcat process

Any Idea ?
Is jira natively using system to allocate some memory external to the JVM ?
Is Jira loading a lot of native libraries ?

2 answers

1 accepted

The Problem was in WMWare !

  • WMWare was not giving to Linux the RAM asked
  • Under linux the total RAM was reported there
  • But a non seen process was locking it
  • Instead of using real physical RAM Linux was swapping !
    It didn't know it
    So we add VERY high CPU usage and no reported Swap

1 vote

http://www.linuxatemyram.com/

In short - this is normal. The memory is used for caching files like the lucene indexes, classes etc. It's not shown as free but it is "available".

Cached memory in Linux means, AFAIK, it was accessed and mapped to page tables, then released by the app and available quickly when demanded.

Thanks for you answer
I have read the http://www.linuxatemyram.com/
I knew already the -/+ buffers/cache
free reportes me 350'220
which is pretty low regarding my 9Gb of total memory

Thanks for you answer
I have read the http://www.linuxatemyram.com/
I knew already the -/+ buffers/cache
free reportes me 350'220 : 350kb is pretty low
Pretty low regarding my 9Gb of total memory

Christophe,

If memory "vanishes" it is because something claimed it. I would do as root a "ps -adef | grep java" and I would see if there's no zombie tomcat process around (or whatever).

And, for 500 users total 2Gb as heap is excessive anyway.

Dear Radu : only one process the tomcat one

pmap -d <PID>, look at the last line:

mapped: - total amount of memory mapped to files

writeable/private: - the amount of private address space

shared: - the amount of address space this process is sharing with others

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

503 views 1 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you