M
M
mitaichik2021-08-11 14:30:34
Java
mitaichik, 2021-08-11 14:30:34

How to find out what loads the processor?

Good afternoon.

On the server, the application (SpringBoot) starts eating one core at 100% days after 5 work.
We know which piece of code, but we can’t understand why - it doesn’t do anything there + there’s a lot of code there, it’s not clear from the logs.

Can I somehow track what exactly the processor is eating?

There is nothing like that in the tests, but we can’t give such a load - the main purpose of the service there is accessing a third-party API that takes money for each request, and their sandbox has small limits....

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Cheremisin, 2021-08-11
@leahch

Try to hook through JMX. Or try profile.
Try using strace or lsof to peek.
Get a dump of a hanging thread - Thread.currentThread().getStackTrace() (just substitute your hanging thread). In general, you can take all the threads and get stack traces from all of them!

S
Sergey Gornostaev, 2021-08-11
@sergey-gornostaev

It is necessary to remove the profile with Flight Recorder and analyze the state of the streams. I'm betting on thread pool starvation or livelock.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question