Latency profiling.
I have been looking, but I cannot find out if anyone has already done what I want.
I have a problem that my desktop linux system becomes un-responsive when there is a lot of Hard Disc access. I.E. During HD access, the mouse fails to move.
I suspect that this is due to a certain kernel process holding onto the CPU resources too long without letting the kernel schedule a different process.
I therefore need a kernel profiler that will log every kernel schedule/context switch, and if the interval between any switch is greater than X, it will write a log entry, telling me which process/function/module was holding onto the CPU for too long.
I could then use this tool to help me track down exactly where the problem is, and therefore hopefully find a fix for it.
Does a tool like this already exist?
James
Hi,
Dou you have DMA enabled for your hard-disk?
# hdparm /dev/your_hard_disk will tell.
Lenar
Quoted 1 line · James Courtier-Dutton
I have a problem that my desktop linux system becomes un-responsive when there is a lot of Hard Disc access. I.E. During HD access, the mouse fails to move.
Quoted 7 lines · James Courtier-Dutton
I have been looking, but I cannot find out if anyone has already done what I want.
I have a problem that my desktop linux system becomes un-responsive when there is a lot of Hard Disc access. I.E. During HD access, the mouse fails to move.
Yes.
Quoted 4 lines
I suspect that this is due to a certain kernel process holding onto the CPU resources too long without letting the kernel schedule a different process.
There are no such kernel processes. Linux and other Unixes perform functions on behalf of the caller. If there is some task hogging the CPU then top will show it.
Quoted 5 lines
I therefore need a kernel profiler that will log every kernel schedule/context switch, and if the interval between any switch is greater than X, it will write a log entry, telling me which process/function/module was holding onto the CPU for too long.
Some task, waiting for I/O to complete, will automatically get the CPU taken away and given to some other task that is not waiting for I/O to complete.
Quoted 6 lines
I could then use this tool to help me track down exactly where the problem is, and therefore hopefully find a fix for it.
Does a tool like this already exist?
James
The problems you describe are most likely caused by your hard-disk and/or driver. If you have an IDE drive with no DMA capability, you are stuck. If you have ATA, Fiberchannel, SCSI or something professional your processes will get CPU time while I/O is occurring.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
Note 96.31% of all statistics are fiction.