Monday, October 27, 2008

resolving latency problems on linux with latencytop utility

Finding out what is causing unresponsive behaviour, audio delays or stalls on your linux machines can be a hard task.
Latencytop utility gives information where latency is occured to diagnose problem.

Here is an example how to use latencytop on fedora core 9 distribution.

yum install latencytop

By default kernel does not enable latency statistics reporting.You have to enable it by hand.

echo 1 > /proc/sys/kernel/latencytop

this command enables it. disabling it is easy by echo 0 > /proc/sys/kernel/latencytop
latencytop uses the statistics from proc file system. statistics is in /proc/latency_stats file.

here is a screenshot where it shows latency caused disk io on ext3 filesystem and with which pid caused it.

note: if your linux system does not have /proc/latency_stats file. it's either is disabled when kernel is compiled or your kernel does not have latency stats support. In that case you have to patch your kernel an recompile it.
for patch see

No comments: