My product has 256 MB of RAM. I have upgrade java 6 to java 8. Then I started facing memory related issue with java 8. memory consumption is incresing by the time with Java 8 With same code, memory consumption is stable with java 6 I have explored so much regarding metaspace,java8 and found below metaspace parameters.
I have tried below combinations and got out of memory error
1.MaxMetaspaceSize 50M MaxMetaspaceFreeRatio 60M MinMetaspaceFreeRatio 50M
2.MaxMetaspaceSize 30M
3.MaxMetaspaceSize 40M
4.MaxMetaspaceSize 50M
5.MaxMetaspaceSize 80M
But after 2 to 3 hours ,outofmemory metaspace error raised.
Can someone explain what the metaspace options MaxMetaspaceSize,MaxMetaspaceFreeRatio ,MinMetaspaceFreeRatio are?
How do I decide what the right size is? what is the correct combination of these values to avoid outofmemory instance in production and reduce memory consumption ?