Re: Latency profiling.

From: Richard B. Johnson
Date: Fri Aug 13 2004 - 12:04:36 EST


On Fri, 13 Aug 2004, James Courtier-Dutton wrote:

> 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.

> 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.

> 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.

> 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.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/