Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 1 of 1

Thread: Buggy App – Simulates performance problems

  1. #1
    Member
    Join Date
    Nov 2017
    Location
    USA
    Posts
    148
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default Buggy App – Simulates performance problems

    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 probelms. (Infact 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 interes) 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 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 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
    Last edited by Ram Lakshmanan; October 28th, 2020 at 01:41 AM. Reason: updating contents

Similar Threads

  1. Replies: 0
    Last Post: March 5th, 2020, 11:21 PM
  2. Micrometrics to forecast performance problems!
    By Ram Lakshmanan in forum Java SE API Tutorials
    Replies: 0
    Last Post: February 17th, 2020, 11:10 PM
  3. Performance of Threads
    By Matts4948 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: May 20th, 2014, 03:53 PM
  4. Performance issue
    By itsurraja in forum What's Wrong With My Code?
    Replies: 13
    Last Post: August 20th, 2013, 05:50 AM
  5. buggy class
    By solo_2101 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: May 28th, 2010, 02:11 PM