How to debug high sysload in 2,3 second
Hi everyone, My system during idle sometimes has high sysload in 2,3 seconds (around 70% sysload) and then come back to normal after that. I see it happen in some conditions and try to use top commands to debug and see one of processes in my system consume CPU. I would like to investigate more what code causes CPU high. However the spike only happens 2,3 seconds so I have no ideas to continue debugging. I thought about perf tool, but I am not sure how to profile with perf to identify exactly what happens in 2,3 seconds during high CPU. Because I can reproduce the issue to see it, but only during 3 or 4 minutes, I can see CPU increase in 2,3 seconds. So I worry that using perf to profile in 3,4 minutes cannot identify the code causing CPU increase in a short time. Could you help to advise how I can debug in this case? Thanks, Brs, Naruto
On Mon, 15 May 2023 18:58:33 +1000, Naruto Nguyen said:
My system during idle sometimes has high sysload in 2,3 seconds (around 70% sysload) and then come back to normal after that. I see it ... CPU. Because I can reproduce the issue to see it, but only during 3 or 4 minutes, ... Could you help to advise how I can debug in this case?
First place to look would be at what you do to reproduce it. You could always leave 'top' running with a 0.5 or 1 second refresh in a terminal window, point some sort of video camera at the screen, and after you've reproduced it go back and look at the video frame-by-frame until you find the 'top' refresh(es) that happened during the high load.
On Tue, May 16, 2023 at 06:44:20AM -0400, Valdis Klētnieks wrote:
You could always leave 'top' running with a 0.5 or 1 second refresh in a terminal window, point some sort of video camera at the screen, and after you've reproduced it go back and look at the video frame-by-frame until you find the 'top' refresh(es) that happened during the high load.
You can also try atop as it has the ability to record and report short running userspace processes that consume a lot of CPU. -- Valentin
participants (3)
-
Naruto Nguyen -
Valdis Klētnieks -
Valentin Vidić