javajava-8jvmrcpmetaspace

What happens if you don't specify the maxmetaspace parameter in a java 8 rcp app?


What can happens if you launch and use a heavy java 8 rcp desktop app without specifying the jvm parameters MaxMetaspaceSize and the metaspacesize ?

Is it normal that the memory consumed by the heap memory is almost like the non-heap (metaspace) consumption?

the last question: can the non-specifying of the metapace size parameters causes a crash of the app ?


Solution

  • MaxMetaspaceSize unless specified, is, well, unlimited as in as much memory you have. What you have seen at some point that the meta space is the same as the heap size is possible. BUT, both the heap and meta-space are garbage collected; so those values can quickly change.

    Not specifying it, effectively means grow as much as you can (I think even including swap). I don't think the app can crash from that, unless with an OutOfMemory when you are filling the MetaSpace; which I highly doubt personally.