Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Java in Docker pitfalls
- ---
- ## Why Java is a special case
- - JVM ergonomics
- - Libraries ergonomics
- JVM and libraries decide how much memory and how many threads to use.
- This decision is based on a host hardware configuration. They are designed to take full advantage of all available resources.
- ---
- ## Docker is a leaking abstraction
- - Docker uses Linux namespaces and cgroups
- - In a docker instance, an application can access a host hardware configuration
- - Java doesn't know about Docker, cgroups and namespaces (before April 2017)
- ---
- ## Memory examples
- - What if memory limit less than JVM wants to allocate for heap
- - What if memory limit is a little bit more than JVM wants to allocate for heap
- JVM allocates memory for
- - Heap
- - Metaspace
- - Code
- - GC
- - Threads
- - Native objects
- ---
- ## CPU examples
- ---
- ## Java 9 and Java 8 u131(April 2017)
- - CPU limits work out of the box
- - for a memory, JVM option is still required
- ---
- ## Q&A
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement