In the course of our open source project Imixs-Office-Workflow, I have now examined OpenLiberty in more detail. And I came up to the conclusion that OpenLiberty has a very impressive performance.
I run OpenLiberty in Docker in the version ‘22.214.171.124-full-java8-openj9-ubi’. Our application is a full featured Workflow Management Suite with a Web Interface and also a Rest API. So for OpenLiberty we use the following feature set:
... <featureManager> <feature>javaee-8.0</feature> <feature>microProfile-2.2</feature>> <feature>javaMail-1.6</feature> </featureManager> ...
As recommended by OpenLiberty I use the following Dockerfile layout:
FROM openliberty/open-liberty:126.96.36.199-full-java8-openj9-ubi # Copy postgres JDBC driver COPY ./postgresql-9.4.1212.jar /opt/ol/wlp/lib # Add config COPY --chown=1001:0 ./server.xml /config/server.xml # Activate Debug Mode... # COPY --chown=1001:0 ./jvm.options /config/ # Copy sample application COPY ./imixs-office-workflow*.war /config/dropins/ RUN configure.sh
The important part here is the RUN command at the end of the Dockerfile. This script adds the requested XML snippets and grow image to be fit-for-purpose. This makes the docker build process a little bit slower, but the startup of the image is very fast.
I measured a startup time of round about 12 seconds. This is very fast for the size and complexity of this application. And it is a little bit faster than the startup of Wildfly with round about 15 seconds. Only in case of a hot-redeploy of the application Wildfly seems to be a little bit faster (6 seconds) in compare to OpenLiberty (8 seconds).
|Docker Startup Time||12 sec||15 sec|
|Application Hot Deploy||8 sec||6 sec|
Note: activating the debug port makes OpenLiberty performance very poor. So do not forget to deactivate debugging in productive mode! The debug mode can be activated by providing a jvm.options file like this:
I have commented on this in the Dockerfile example above.