Reputation: 606
I am developing simple distributed in memory key-value storage service. In my case, I embed Ignite as using maven dependancy.
The application have simple controller, which is get and put API.
Get API is get object from ignite cache, Put API is put object to ignite cache.
Anyway, I do load test and I monitored jvm status using visual vm, I observed each heap area(e.g eden, suv, old) using visual gc plugin and direct buffer using buffer monitor plugin.
when I started load test, The eden area filled gradually and moved old area, not direct buffer. when the load test is end, direct buffer only use 150kb, but old area used 512m.
Image by visualGC
Image by buffer monitor plugin
※data size might be 500mb.
I guess, the direct buffer almost not used. why? hear is my configuration
-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms1g -Xmx1g -XX:MaxDirectMemorySize=6g -XX:+AlwaysPreTouch -XX:NewSize=512m -XX:GCTimeRatio=4 -XX:InitiatingHeapOccupancyPercent=30 -XX:ConcGCThreads=4 -XX:+UseParNewGC -XX:+UseTLAB -XX:+ScavengeBeforeFullGC -XX:MaxNewSize=512m -XX:MaxMetaspaceSize=128m -XX:CompressedClassSpaceSize=32m -XX:SurvivorRatio=6 -XX:+UseConcMarkSweepGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:+CMSScavengeBeforeRemark -XX:ParallelGCThreads=6 -XX:MaxTenuringThreshold=5 -XX:MaxGCPauseMillis=1000 -XX:+DisableExplicitGC -XX:+ExplicitGCInvokesConcurrent -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:/data/log/catalina/cc.rnd.subnode1/GC.log -XX:+CMSClassUnloadingEnabled -Dspring.profiles.active=production
Upvotes: 0
Views: 404
Reputation: 1139
Ignite uses sun.misc.Unsafe for storing data in off-heap space. This gives maximal performance and flexibility, but it's not reflected in monitoring tools. Direct buffers used mostly in communication between nodes. You may observe memory consumption by analyzing java process size and used heap - with large data, process size will be much bigger than heap.
If you use Apache Ignite 1.x version, you need to configure off-heap. 2.0+ versions use off-heap by default.
Upvotes: 1