Skip to content

2.6 Java Performance Problems Causes

Rajendra Prasad Reddy Penumalli edited this page May 11, 2020 · 2 revisions

Common Performance Problems:

  • Related To CPU
    • High CPU Usage
  • Related to Memory
    • Memory Leak
    • Allocated less than expected/required
    • Lack of Cache
  • Related to Disk Utilization
    • High Logging level
  • Related to DB
    • too low or too high connection pooling
  • Related to Software Code
    • poorly written multi threading code

Common Java Performance Problems

TopTen_Common_Java_Performance_problems

1.1 .Out-of-Memory Errors in the JVM

  • Sudden spike in traffic (this normally handled by keeping servers behind load balancer clusters)
  • Programming error: Memory leak (this normally handled by profiling code)
  • Under provisioned heap memory in the JVM (this normally handled by profiling heap setting)
  • When attempting to read a huge file into memory (this normally handled by max file size settings)

1.2 .Excessive Garbage Collection

  • Garbage collector can have an impact on performance.
  • For best performance, garbage collection should be taking a small percentage of CPU time (< 10%).
  • If more than 20% of CPU time is used for garbage collection, it means that the application has a significant memory related performance problem that must be corrected.
  • Configuring your JVM’s memory to be too large can also be detrimental to performance due to long STW

2.1 .Improper Data Caching

  • Sub-optimal memory configuration for caching will lead to more GC pauses and subsequently affect application processing.

applicationservercluster.png

application_Cache.png

https://dzone.com/articles/introducing-amp-assimilating-caching-quick-read-fo

References

Concurrency

  • Concurrency occurs when several computations are executed at the same time.
  • Java uses synchronization and locks to manage multithreading.
  • But synchronization can cause thread deadlocks, gridlocks and thread pool size issues.
Clone this wiki locally