How if Process total vitual memory calculated


(Ramaseshan) #1

https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html#process-stats

I was generating some stats for ElasticSearch Node. Looking at this API in the above url, I am trying to figure out how is the process..mem.total_virtual_in_bytes is calculated and what exactly does it mean.

Running
ES : 2.4.0
Java : OpenJDK 1.7.0_111
OS : Ubuntu 14.04


(Ramaseshan) #2

I have so far traced it all the way to MxBean in Java itself.

Running this code in a standalone is giving me data close to what this parameter( process..mem.total_virtual_in_bytes) is showing.

http://alvinalexander.com/java/jwarehouse/openjdk-8/jdk/test/com/sun/management/OperatingSystemMXBean/GetCommittedVirtualMemorySize.java.shtml

Also I ran the code with the same parameters elastic search run with.
I see about 70MB difference. Is that an acceptable difference ?

I ran it like this "java -Xms256m -Xmx1g -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC -Dfile.encoding=UTF-8 -Djna.nosys=true -Des.path.home=/usr/share/elasticsearch -cp /usr/share/elasticsearch/lib/elasticsearch-2.4.1.jar:/usr/share/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch GetMemory.java"

Where am I missing the 70MB here ?


(system) #3