Update workshop to include containers
It is common where Java workloads are within a Linux container, and they aren't aware of all the sizing that can occur which feeds into the overall container size. Furthermore, using some of the available tooling requires making adaptations to use these and connect it to the container.
- Provide prerequisite for running the service workload as a container locally (ex. Docker)
- Simulate an example: OutOfMemoryError: Unable to create native thread
- Share common tooling to understand to inspect contents of the container to understand the Java process and OS resource usage
- Share differences and JVM options to acknowledge, like Metaspace limits (diff from PermGen -> Metaspace where it is unlimited by default). Also share documentation on what influences this (classloading).
Share common tooling to understand to inspect contents of the container to understand the Java process and OS resource usage
@cchesser is there any opensource tooling you use besides the provided Docker Dashboard ?
Yeah, it may be good to highlight memory settings that previously would spend time calculating with approaches like in java-buildpack-memory-calculator but that can be minimized with many of the JVM improvements since Java 8u191+ that auto-calculates this limits based on cgroup limitations being set.
Another tool which can be used to then look at the image to then make sense of its composition is dive. This could be used if we want to highlight the latency of container spin-ups that can be optimized with Class Data Sharing, which could show how to including the jsa file via -XX:SharedArchiveFile=.
I'm going to close this out as a result of #48. Will create a new one for the Docker setup, which currently refers to Docker's documentation that will use Docker Desktop (which will no longer be available for free use).