JanusGraph full GC doesn't recycle heap memory

Raul Guo <zaixiagu...@...>

I am trying to save data to my JanusGraph(Hbase backend, with no mixed index backend) concurrently(with 100 thread bounded transactions to do with requests), I found a very strange issue, please give me a hand.
When there are many requests at the beginning, the JVM heap is soon exausted, (I have disabled the database level cache, and set cache.tx-cache-size to only 20, which is rather small compared with its default value 20000. But finally the memory is still used up). And when the system is almost free, the Full GC is executed to reallocate the taken-up memory. But though the Full GC is executed many times, but little memory is recycled, what's more, when the full GC is executing, there is no young GC executed at all, which should happen frequently. you can see it in this picture:


GC with little effect

I tried to find out what is taking up the memories and refused to be collected, so I used the JMap to print the memory object allocation, the top result is listed here:
obj nums bytes in heap  class
8398318      354795144  [B
3932394      157295760  org.janusgraph.graphdb.relations.RelationCache
5796132      139107168  org.janusgraph.diskstorage.util.StaticArrayBuffer
3772465      120718880  java.util.HashMap$Node
2599472      113164032  [J
1711221       95804520  [C
1189296       83817488  [Ljava.lang.Object;
2595595       83059040  org.janusgraph.diskstorage.util.StaticArrayEntryList
3091613       74198712  java.lang.Long
2896411       69513864  org.janusgraph.diskstorage.keycolumnvalue.SliceQuery
2595595       69314352  [Lorg.janusgraph.graphdb.relations.RelationCache;
812856       45519936  org.janusgraph.graphdb.relations.StandardEdge
827925       44428976  [Ljava.util.HashMap$Node;
891069       42771312  java.util.HashMap
1717358       41216592  java.lang.String
757686       30307440  org.janusgraph.graphdb.vertices.CacheVertex
720838       17300112  org.janusgraph.graphdb.transaction.addedrelations.SimpleAddedRelations
724187       11586992  java.util.HashMap$EntrySet
343273       10984736  java.util.concurrent.ConcurrentHashMap$Node
325235       10407520  java.util.concurrent.locks.ReentrantLock$NonfairSync
136097        7621432  org.janusgraph.graphdb.relations.StandardVertexProperty
321836        5149376  org.janusgraph.graphdb.transaction.lock.ReentrantTransactionLock
241682        3866912  org.janusgraph.graphdb.transaction.lock.LockTuple
80547        3221880  org.janusgraph.graphdb.vertices.StandardVertex

It looks very like the cache data, but I have disabled the database level cache, and set the vertex cache to very low value, so where is those objects listed above from? And how should I do with it? If the used memory cannot be recycled, it will be used up sooner or later. Any advice is grateful, thanks.