Skip to content

Instantly share code, notes, and snippets.

View CharlesLuttos's full-sized avatar
🌔
Working from home

Charles Luttos CharlesLuttos

🌔
Working from home
View GitHub Profile
@CharlesLuttos
CharlesLuttos / tomcat_memory.md
Created October 21, 2021 00:39 — forked from mlconnor/tomcat_memory.md
Memory settings for Java JVM in Amazon Elastic Beanstalk

Elastic Beanstalk Java JVM Settings

Determining the right memory settings (MX & MS) for the JVM is not trivial. If you set memory too low then your machine will trash as it runs out and eventually crash. If you set it too high then other critical processes such as Apache or the OS itself may become memory starved and also cause crashes.

In general, I think it best to set the initial memory setting (MS) to be small, around 200M. The real variable we need to calculate is the limit we will place on JVM memory (MS).

In order to make this determination, we need to calculate a few things such as the memory that Apache and the Linux OS need to operate efficiently.

Apache Memory Needs