Buggy App – Simulate performance problems

Buggy App – Simulate performance problems:

 Using the simple Java application Buggy App, you can simulate various performance problems in your environment. This article will examine some use cases, how to download the application, and what common performance problems you can simulate through Buggy App.

Buggy App is a simple Java application that simulates different performance problems like Memory Leak, OutOfMemoryError, CPU spike, thread leak, StackOverflowError, deadlock, unresponsiveness, …

Using this application, you can simulate various performance problems in your environment. Here are a few use cases where Buggy App can be used:

  • a. You can configure and launch Buggy App to consume high memory on the same server where your application is running. You can study under this circumstance whether your application’s SLA (Service Level Agreement) is impacted.
  • b. You can configure and launch Buggy App in a Docker container to consume high CPU and see whether other containers on the same host are impacted or not.
  • c. If you are building performance tools or monitoring tools, you can simulate various performance degradations using Buggy App and see whether your tools address those performance problems. (In fact, we developed this BuggyApp to validate our root cause analysis tool yCrash behaviour.)

Download

You can download:

  1. Buggy App from this location
  2. Source code (if it’s of interest) from this location

To run Buggy App, you will need Java 8 or above version installed.

Performance Problems

Here are the performance problems that you can simulate through Buggy App:

1. OutOfMemoryError: Java heap space

To generate ‘java.lang.OutOfMemoryError: Java heap space’ launch Buggy App with the following arguments:

java -Xmx512m -jar buggyApp.jar PROBLEM_OOM

2. Memory Leak

If you would like to simulate a memory leak without experiencing OutOfMemoryError, then launch Buggy App with the following arguments.

 java -jar buggyApp.jar PROBLEM_MEMORY

When you launch the Buggy App with these arguments, 80% – 90% of the allocated memory will be consumed. But it will not result in OutOfMemoryError.

3. CPU spike

If you would like the CPU consumption to go up to 80 – 90% then launch the Buggy App with the following arguments:

 java -jar buggyApp.jar PROBLEM_CPU

4. Thread Leak

If you would like the application to keep slowly spawning new threads, then launch the Buggy App with the following arguments.

java -jar buggyApp.jar PROBLEM_THREADLEAK

When you launch the Buggy App with these arguments eventually ‘java.lang.OutOfMemoryError: Unable to create new native thread’ will be generated.

5. Deadlock

If you would like the application to experience Deadlock, then launch the Buggy App with the following arguments.

java -jar buggyApp.jar PROBLEM_DEADLOCK

6. Stackoverflow Error

If you would like the application to experience ‘java.lang.StackOverflowError’, then launch the Buggy App with the following arguments.

java -jar buggyApp.jar PROBLEM_STACKOVERFLOW

7. Blocked Threads

If you would like to put multiple threads in BLOCKED state, then launch the Buggy App with the following arguments.

java -jar buggyApp.jar PROBLEM_BLOCKED

from Tumblr https://generouspiratequeen.tumblr.com/post/641089052871983104

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s