Go to content

The JVM and Docker, a good idea? by Christopher Batey

Containers are the latest hype. It goes without saying that Docker for the development environment is a good thing but what about running our production Java applications inside a container? One of the well known benefits of containers is that they provide a self-contained way to package and ship applications. However, it is already common practice to build fat executable jars that require only a JRE so what advantages would containers actually offer a pure Java shop? At Sky our motivation is efficient utilisation of hardware. We used to run single purpose VMs, which makes sense for production but for our countless test environments it is prohibitively expensive. Even IaaS is still too slow to provision new environments and bootstrap new applications. This talk will be focusing on the downsides and lessons learned from running JVMs inside containers. We will cover the following topics: The benefits, downsides and complexities of running a Java application inside a container. Tuning memory limits taking into account Heap, Native memory, Metaspace, Stacks to avoid being OOM killed Tracking native memory with jcmd

June 8, 2016