Extremally slow Class.getDeclaredField0 calls under agent

Questions about YourKit Java Profiler
Post Reply
vektory
Posts: 4
Joined: Mon Aug 21, 2017 3:36 pm

Extremally slow Class.getDeclaredField0 calls under agent

Post by vektory »

I trying to use our application with attached agent from a new YourKit version (2019.8).

I run application with this params of the agent:

Code: Select all

-agentpath:/path/to/agent/libyjpagent.so=disablestacktelemetry,exceptions=disable,delay=10000,listen=all,sessionname=appname
Application startup is a WERY slow. I can't to wait that process to complete during several hours.

When connecting to agent and enable the stack telemetry, then I see, that application stucking in Class.getDeclaredField0 most time. Yes we are loading large amount of classes on startup.

In the same time, with agent from the older version, the startup is fine and application is loading in 10 minutes.

Can anyone give me some recomendations to solve this issue?
Ilya Kalikin
Posts: 16
Joined: Mon Jun 12, 2017 3:06 pm

Re: Extremally slow Class.getDeclaredField0 calls under agen

Post by Ilya Kalikin »

Could you please post the full stack trace here or send it to [email protected].
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Extremally slow Class.getDeclaredField0 calls under agen

Post by Anton Katilin »

Could you please try adding the startup option "disable_async_sampling". Does it help?
vektory
Posts: 4
Joined: Mon Aug 21, 2017 3:36 pm

Re: Extremally slow Class.getDeclaredField0 calls under agen

Post by vektory »

Huh... "disable_async_sampling" option have returned my application to normal.

Seems like it's a known problem: https://github.com/jvm-profiling-tools/ ... -521662058

I have posted there some amount of debugging information. For your agent this is same.

I think, that it could be best to activate "disable_async_sampling" by default...
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Extremally slow Class.getDeclaredField0 calls under agen

Post by Anton Katilin »

Thank you for the feedback. We'll re-consider the default value.
Post Reply