eap-vs-tomcat-vs-spring-boot icon indicating copy to clipboard operation
eap-vs-tomcat-vs-spring-boot copied to clipboard

Modern Java Runtimes Basic Performance

This project contains several applications written using a collection of modern Java-based runtimes. It is intended to use this for rough comparisons of app disk footprint, memory, and throughput for basic "Hello World"-type applications using the default settings for each of the runtimes.

This is not a rigorous test of all application performance characteristics, and is not intended to be the "final say" in runtime performance - careful tuning based on expected workloads must be done.

Scenarios Included

Prerequisites

To run these commands you need:

  • A Bash or Bourne Shell console (e.g. on Linux or Mac)
  • A Java development environment (JDK 8 or greater, such as Red Hat OpenJDK) with commands like java, javac, jconsole on your $PATH
  • Typical web development utilities curl, unzip on your $PATH
  • Maven 3.5.3+
  • Apache Bench 2.3+
  • To test JBoss products, you'll need to download and copy production zip files to the installs/ directory. See the installs/README.md for more detail on which zip files you'll need.

Running the tests

Clone this repo using git or some other Git-compatible environment, and then run the following command to output the available tests:

./run.sh
Valid commands:
run.sh spring-boot      # [Runs as a Spring Boot Fat JAR]
run.sh vertx            # [Runs as a Eclipse Vert.x Fat JAR]
run.sh jws              # [Runs JBoss Web Server]
run.sh thorntail        # [Runs Thorntail]
run.sh jboss-eap-spring # [Runs JBoss EAP with Spring app]
run.sh jboss-eap-javaee # [Runs JBoss EAP with Java EE app]
run.sh kill-all         # [Stops all servers]

Each test will:

  1. Install any necessary products
  2. Start the server or Fat JAR
  3. Open jconsole (you'll need to accept the Insecure Connection Dialog box)
  4. Run a warm-up test
  5. Run the actual performance using Apache Bench with the specified iterations and concurrency specified at the top of run.sh
  6. Wait for the test to finish
  7. Stop the server or Fat JAR

After the test completes, you can find throughput information in performance.txt and log files from various runtimes in *.log. You can also watch the memory and other VM usage patterns in JConsole.