Reputation: 93
My program is all the time running at max 1% of CPU usage but sometimes since some event inside the program, that i cannot determine, it has 100% usage for about 5-10 seconds every 15 seconds. It looks like a Thread causing usage spikes but i cant determine the source of that(there are 8000 classes so thats quite hard). It's hard to test if problem still exists(for example after making some part of code "dead") because that problem is sometimes starting it's existence after few hours of Virtual Machine lifetime.
Have you got any idea what would help me find the source of that problem?
Upvotes: 1
Views: 1548
Reputation: 86403
Without more information, it would be impossible to even attempt a guess at the cause of your problem.
I would suggest using a profiler, such as VisualVM, to determine which thread causes the issue and potentially what the exact circumstances are when it happens.
Using a profiler would tell you for example:
Upvotes: 5