Some scripts to measure the CPU and Memory utilisation of JAX-RS appliations. The performance test runs inside a docker container.
The test uses the following demo projects:
- demo-payara contains a simple JAX-RS application packaged as uber-jar with Payara Micro (5.2020.4) application server
- demo-payara-jpa contains an advanced JAX-RS, JSON-B, CDI, JPA, PostgresDB application packaged as uber-jar with Payara Micro (5.2020.4) application server
- demo-quarkus contains a simple Quarkus (1.8.1.Final) application packaged as jar and additionally compiled as native image using the GraalVM Native Image
- demo-quarkus-jpa contains an advanced JAX-RS, JSON-B, CDI, JPA, PostgresDB Quarkus (1.8.1.Final) application packaged as jar and additionally compiled as native image using the GraalVM Native Image
- demo-python contains a simple (REST service) and advanced (REST with DB access) Python application
- demo-spring-boot contains a simple REST service using Spring Boot (2.4.0-M3)
- demo-spring-boot-jpa contains an advanced REST, JSON, JPA, PostgresDB service using Spring Boot (2.4.0-M3)
- Modify the Dockerfile (look for PROXY) to use a proxy server or not
- Build the docker image with
env_build.sh
orenv_build.cmd
- Run the image in a new docker container with
env_run.sh
orenv_run.cmd
- Build the demo projects inside the docker container with
./scripts/build.sh
- Run the tests inside the docker container with
./scripts/test-all.sh
- Plots are generated to directory
plots
- Logs are generated to directory
logs
The plot-test consists of the following actions:
- starting the application (simple JAX-RS application)
- wait until the first http request to the JAX-RS endpoint can be served (time to first request)
- sleep 1 second
- start load-test using apache benchmarking tool
- requests: 5000
- concurrency: 5
- url: the JAX-RS endpoint of the application
All plots are generated on my Notebook inside the running docker container.
Docker Host Machine:
- CPU: Intel i7-8650U 1.90GHz (8 cores)
- RAM: 16GB
Docker Engine Configuration:
- CPUs: 4
- Memory: 8 GB
Simple | Advanced |
---|---|
Simple | Advanced |
---|---|
Simple | Advanced |
---|---|
Simple | Advanced |
---|---|
Simple | Advanced |
---|---|
Simple | Advanced |
---|---|
- Quarkus - https://quarkus.io
- GraalVM - https://www.graalvm.org
- OpenJ9 - https://www.eclipse.org/openj9
- OpenJDK RI - https://jdk.java.net/java-se-ri/8
- Adopt OpenJDK - https://adoptopenjdk.net/
- Zulu OpenJDK - https://www.azul.com/products/zulu-community
- Payara Micro - https://www.payara.fish
- Spring Boot - https://spring.io/projects/spring-boot
- psrecord - https://github.com/astrofrog/psrecord
- psutil - https://psutil.readthedocs.io
- matplotlib - https://matplotlib.org
- jabba - https://github.com/shyiko/jabba
- Apache Benchmarking Tool - https://httpd.apache.org/docs/2.4/programs/ab.html