When running Java applications in containers, you need to be careful with your resources. If you're not careful with layering your images (for example using Google's Jib), you can quickly get into disk-space issues, especially when your base image and/or application gets updated regularly. One of the ways you can save resources is by using small base images. In this blog post I determined the uncompressed size of several base images containing OpenJDK 11.0.6 which are available on Docker Hub.
Articles containing tips, tricks and nice to knows related to IT stuff I find interesting. Also serves as online memory.
Showing posts with label openjdk. Show all posts
Showing posts with label openjdk. Show all posts
Tuesday, March 31, 2020
Friday, November 23, 2018
Comparing JVM performance; Zulu, OpenJDK, Oracle JDK, GraalVM CE
There are many different choices for a JVM for your Java application. Which would be the best to use? This depends on various factors. Performance being an important one. Solid performance research however is difficult. In this blog post I'll describe a setup I created to perform tests on different JVMs at the same time and show some interesting results! I also looked at the effect of resource isolation (assigning specific CPUs and memory to the process). This effect was negligible. My test application consisted of a reactive (non-blocking) Spring Boot REST application and I've used Prometheus to poll the JVMs and Grafana for visualization.
Below is an image of the used setup. Everything was running in Docker containers except SoapUI.
Below is an image of the used setup. Everything was running in Docker containers except SoapUI.
Labels:
actuator,
cpu,
docker,
docker-compose,
graalvm,
grafana,
load,
memory,
metrics,
openjdk,
oracle jdk,
oraclejdk,
performance,
prometheus,
resource constraints,
resource limits,
zulu
Tuesday, October 30, 2018
Running Reactive Spring Boot on GraalVM in Docker
GraalVM is an open source polyglot VM which makes it easy to mix and match different languages such as Java, Javascript and R. It has the ability (with some restrictions) to compile code to native executables. This of course offers great performance benefits. Recently, GraalVM Docker files and images have become available. See here.
Since Spring Boot is a popular Java framework and reactive (non blocking) RESTful services/clients implemented in Spring Boot are also interesting to look at, I thought; lets combine those and produce a Docker image running a reactive Spring Boot application on GraalVM.
I've used and combined the following
Since Spring Boot is a popular Java framework and reactive (non blocking) RESTful services/clients implemented in Spring Boot are also interesting to look at, I thought; lets combine those and produce a Docker image running a reactive Spring Boot application on GraalVM.
I've used and combined the following
- Building a Reactive RESTful Web Service
- Spring Boot with Docker and Running Spring Boot in a Docker container on OpenJDK, Oracle JDK, Zulu on Alpine Linux, Oracle Linux, Ubuntu
- Oracle's GraalVM Docker images
- (my very own) Ubuntu Development VM (requires VirtualBox, Vagrant)
As a base I've used the code provided in the following Git repository here. In the 'complete' folder (the end result of the tutorial) is a sample Reactive RESTful Web Service and client.
Labels:
docker,
graalvm,
jdk,
llvm,
openjdk,
oracle jdk,
r,
reactive,
rest,
spring boot
Saturday, March 17, 2018
Running Spring Boot in a Docker container on OpenJDK, Oracle JDK, Zulu on Alpine Linux, Oracle Linux, Ubuntu
Spring Boot is great for running inside a Docker container. Spring Boot applications 'just run'. A Spring Boot application has an embedded servlet engine making it independent of application servers. There is a Spring Boot Maven plugin available to easily create a JAR file which contains all required dependencies. This JAR file can be run with a single command-line like 'java -jar SpringBootApp.jar'. For running it in a Docker container, you only require a base OS and a JDK. In this blog post I'll give examples on how to get started with different OSs and different JDKs in Docker. I'll finish with an example on how to build a Docker image with a Spring Boot application in it.
Subscribe to:
Posts (Atom)



