Odd OS-level memory reporting for Java

Shawn Heisey java at elyograg.org
Thu Jan 7 16:15:25 UTC 2016


I have seen something very odd with memory reporting in both Windows and
Linux.

This may not be the correct list for this question, but I am already
subscribed to a very large number of mailing lists and would prefer to
not add another one for a one-off question.  I apologize if this is the
wrong list.

Take a look at these two screenshots:

https://www.dropbox.com/s/64en3sar4cr1ytj/linux-solr-mem-high-shr.png?dl=0
https://www.dropbox.com/s/w4bnrb66r16lpx1/Resource%20Monitor.png?dl=0

The first one is a Linux server that I am running, the second is a
Windows server that someone else is running.  Both machines are running
Solr.  The Windows machine is running two copies of Solr, and the Solr
processes are at the top of both lists.  The Linux machine has an 8GB
heap for its copy of Solr, and I believe that each of the copies of Solr
on the Windows machine have the heap set to 14GB.

In both cases, the shared memory reported is very high, with the
resident (or working) memory *far* higher than the configured heap size.

In the case of the Linux machine, I can illustrate that there is
definitely a reporting bug.  If you take the 48GB currently allocated to
the disk cache, and add the *reported* 22GB resident size of the Solr
process, you get 70GB ... but the machine only has 64GB total.

On the Linux machine, Solr is accessing over 100GB of data via MMap (see
the VIRT memory size of 121GB).  This is the data that is in the disk
cache.  I was told that the indexes are even larger on the Windows machine.

This is the Java version on the Linux machine.  I am working to learn
what the version is on the Windows machine.

java version "1.7.0_72"
Java(TM) SE Runtime Environment (build 1.7.0_72-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.72-b04, mixed mode)

Here are the packages providing this Java version (CentOS 6.6).  I used
the source RPM on the city-fan.org website and the official tarball from
Oracle:

java-1.7.0-oracle-jdbc-1.7.0.72-1.0.cf.x86_64
java-1.7.0-oracle-devel-1.7.0.72-1.0.cf.x86_64
java-1.7.0-oracle-1.7.0.72-1.0.cf.x86_64

Is this memory reporting problem a bug in Java or a bug in both
operating systems?  I do not have easy access to any other OS platforms.

Thanks,
Shawn


More information about the hotspot-gc-use mailing list