I have problems with the application that I developed. When I run it for a long period of time, the CPU load is slow. Here is a screenshot of Java VisualVM after 45 minutes.

As you can see, the memory usage is very constant and the number of threads. The application opens the LAN jack and measures every 2 seconds. This measurement is performed in a separate thread (which can be seen at the bottom of the thread).
CPU usage is slowly but surely increasing, but during the night it builds up to 70-80%, and at this point the whole system slows down noticeably (obviously). Now I do not want this increase in rate, but I can not find the reason for this. There is no memory leak (which will also lead to a continuous increase in memory), and I will not create more and more threads (because this number is also stable).
My application has an extensive graphical interface and several threads. Here is a list of threads from the profiler:

I marked "my" threads in yellow. Therefore, MeasurementCommunication.startMeasurement threads are created (and terminated again) when necessary. So at any moment there is only one of these guys.
So, to shorten the long story: I don't know where this increase in CPU comes from. Do you have ideas? Maybe a common Java problem? If you need more information or details, just tell me and I will try to answer them.;)
source share