Capacity Planning using the Universal Scalability Law with Java and usl4j

Capacity planning is an important task when trying to anticipate resources and scaling factors for our applications. The usl4j library offers us an easy abstraction for Neil J. Gunther’s Universal Scalability Law and allows us to build up a predictive model based on the parameters throughput, latency and concurrent operations. With a basic input set of two of these parameters, we are able to predict how these values change if we change one input parameter so that we can build our infrastructure or systems according to our SLAs. ...

September 30, 2018 · 6 min · 1070 words · Micha Kops

Snippet: Java Mission Control (JMC) and Flight Recorder (JFR)

The Java Mission Control and the Java Flight Recorder allow us to capture run-time information from our Java applications without much overhead and aggregate profiling information. I have written down the commands that I’m using the most when profiling a Java application with this tool chain in the following article. Figure 1. Java Mission Control - Report Running Java Mission Control (JMC) We may start the JMC user interface shown above using the jmc command that is shipped with Oracle’s JRockit or Java (since Java 7 update 40). ...

October 11, 2017 · 4 min · 748 words · Micha Kops

Microbenchmarks with JMH / Java Microbenchmark Harness

Writing microbenchmarks for parts of our applications is not always easy – especially when the internals of the virtual machine, the just-in-time-compiler and such things are coming into effect. Java Microbenchmark Harness is a tool that takes care of creating JVM warmup-cycles, handling benchmark-input-parameters and running benchmarks as isolated processes etc. Now following a few short examples for writing microbenchmarks with JMH. Figure 1. Java JMH Microbenchmarks running in IntelliJ...

October 2, 2017 · 8 min · 1578 words · Micha Kops

Performance Testing a Multiuser Web Application with JMeter and Maven

When there is the need to create load tests or performance tests for an application, Apache JMeter is a handy tool and set up with ease. In the following short tutorial I’d like to demonstrate how to configure JMeter to log into a Java EE web application with multiple users specified in a CSV file, how to generate some basic reports and how to integrate JMeter into a mavenized build using the JMeter Maven Plugin. ...

January 18, 2015 · 7 min · 1327 words · Micha Kops

Java EE 7 JMX Reports with Yammer Metrics

There are several ways to aggregate and report application performance indicators in a Java application. One common way here is to use Java Management Extensions (JMX) and MBeans. The Yammer Metrics Library eases this task for us and simplifies the aggregation of different reports. In the following tutorial, we’re going to set up a full Java EE 7 web application by the help of Maven archetypes and we’re running the application on WildFly application server that is downloaded and configured completely by the WildFly Maven Plugin. ...

August 26, 2014 · 10 min · 2117 words · Micha Kops

Micro Benchmarking your Tests using JUnit and JUnitBenchmarks

I recently stumbled upon a nice framework that allows to convert simple JUnit tests into micro benchmarks named JUnitBenchmarks. It allows to set basic benchmark options and and to generate charts by adding some simple annotations and a test rule to your tests. One might argue if it is wise to mix the aspects, testing and benchmarking and I’d agree for sure – nevertheless I think this framework can be handy sometimes so let’s create some benchmarks using JUnit and JUnitBenchmarks.. ...

March 10, 2013 · 8 min · 1508 words · Micha Kops