Go to content

The JVM and Docker. A good idea? by Christopher Batey

What is the point of putting a JVM inside a linux container? On my latest project 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 became 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 * Avoiding the container swap problem * Operating system tools that are/are not container aware and when they will come in handy: top, htop, dstat, dmesg, systemd-cgtop * What tools should you include in your container for debugging/analysis e.g. the Swiss Java Tools https://github.com/aragozin/jvm-tools * External tools for monitoring containers: prometheus, cadvisor, heapster * Tuning thread pools for various frameworks Christopher Batey (@chbatey) is a freelance Software Engineer/Architect/Trainer. His speciality is large scale operational systems and has worked on trading systems, online television services as well as building off the shelf software at IBM. Likes: Scala, Java, the JVM, Akka, distributed databases, XP, TDD, Pairing. Hates: Untested software, code ownership. You can checkout his blog at: http://christopher-batey.blogspot.co.uk/. [AUW-2376]

November 7, 2016