(Sorry if this is not directly related to ES. But I don't know where to ask)
my environments
- ES Version: 2.3.2
- GC: CMS gc
- Heap Size: 20GB
- Total Ram: 64GB
- Java Version: 1.8.0_60 Java HotSpot(TM) 64-Bit
- OS: CentOS 7.2
Here is Heap Usage of one of my test servers
ES only uses less than 4GB (20% of heap of 20GB)
But Java process uses 16GB of resident memory!
$ jps
53089 Elasticsearch
$ ps aux | grep 53089
username 53089 112 35.7 168712820 17672036 ? Sl Nov16 13599:09 /path/to/java ... -Xms20g -Xmx20g -Des.path.home=/path/to/elasticsearch -cp /path/to/elasticsearch/lib/elasticsearch-2.3.2.jar:/path/to/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch start -d
Q: Does this means, almost the most of resident memory are fragmented?
Here is jmap
output:
$ jmap -histo:live 53089 | head -n 20
num #instances #bytes class name
----------------------------------------------
1: 264406 1274923328 [B
2: 105756 102571056 [J
3: 98842 12137408 [C
4: 125753 9054216 org.apache.lucene.util.fst.FST$Arc
5: 34735 5001840 org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame
6: 145887 4668384 org.apache.lucene.store.ByteArrayDataInput
7: 34736 3334656 org.apache.lucene.codecs.lucene50.Lucene50PostingsFormat$IntBlockTermState
8: 92266 2952512 java.util.HashMap$Node
...
Thank you for advenced answer.