Memory parameters for mn
mirchiseth opened this issue · 1 comments
I am trying to run petstore on Cloud Foundry. Due to the way it works out of the box I have to allocate any java app at least 1G memory (even for hello world examples). I can reduce it by configuring some parameters and looking for guidance on good values on these. I would appreciate if someone can provide some nice defaults for the following ( consider a hello world example)
Heap (-Xmx)
Metaspace (-XX:MaxMetaspaceSize)
Thread Stacks (-Xss)
Direct Memory (-XX:MaxDirectMemorySize)
Code Cache (-XX:ReservedCodeCacheSize)
Compressed Class Space (-XX:CompressedClassSpaceSize)
For more on why CF needs atleast 1G read here https://www.cloudfoundry.org/blog/just-released-java-buildpack-4-0/ )
Was able to get hello-world examples running on Cloud Foundry with 256MB runtime with following settings
-Xss230k -Xmx70679K -XX:ReservedCodeCacheSize=120M -XX:MaxDirectMemorySize=10M -XX:MaxMetaspaceSize=42608K