1

I have an JAVA application running in Kubernetes which listens to port 8080. When I connect JProfiler to JVM and run a few requests sequentially, everything works fine. But as soon as I fire some load using Jmeter, my application stops responding on Port 8080 and I get request timeout.

When JProfiler is detached from JVM, everything starts working fine again. I explored a lot but couldn't find any help regarding what in JProfiler is blocking my application to respond.

Varshney P.
  • 208
  • 1
  • 12
  • 1
    When you run the load test, is your application/system under serious load? What is the CPU utilization and memory consumption? A profiler can have a lot of overhead so I would start with something more lightweight. Async Profiler is an excellent tool: https://github.com/jvm-profiling-tools/async-profiler – Juraj Martinka Jul 26 '22 at 07:21
  • 1
    What kind of data do you record? I would suggest to start with only CPU sampling or async sampling. Regarding the tool that has been mentioned above, the overhead will then be the same. – Ingo Kegel Jul 26 '22 at 08:08
  • @IngoKegel how to configure JProfiler for async sampling? – Varshney P. Jul 26 '22 at 13:54
  • @JurajMartinka since application hangs I could not figure out memory and CPU utilization. It shows me no data – Varshney P. Jul 26 '22 at 13:56
  • @VarshneyP. what do you mean by "application hangs". Cannot you login to the target machine and grab basic OS metrics like memory consumption and CPU utilization? (if you are not already gathering them automatically) – Juraj Martinka Jul 26 '22 at 14:02
  • In the session startup dialog, click on "Edit" next to "Call tree recording". There you can change the recording type between instrumentation, full sampling and async sampling. Note that async sampling is generally not recommended, it's only good for special situations where the "safe-point bias" in the profiling interface of the JVM is significant or if you want to see native call stacks. Apart from that, async sampling is worse than full sampling in many respects. – Ingo Kegel Jul 26 '22 at 14:20
  • @IngoKegel ohkk.. I also mailed u all the details regarding my scenario for better clarification of the problem. – Varshney P. Jul 26 '22 at 14:27

1 Answers1

1

From the feedback you have sent me by email, the overhead becomes noticeable when you switch on allocation recording. Just with CPU and probe recording you don't experience any problem.

Allocation recording is an expensive operation that should only be used when you have a related problem. The added overhead can be reduced by reducing the allocation sampling rate.

Ingo Kegel
  • 46,523
  • 10
  • 71
  • 102