summaryrefslogtreecommitdiff
path: root/Documentation/accounting
diff options
context:
space:
mode:
authorWang Yaxin <wang.yaxin@zte.com.cn>2024-12-03 16:48:48 +0800
committerAndrew Morton <akpm@linux-foundation.org>2025-01-12 20:20:59 -0800
commit658eb5ab916ddc92f294dbce8e3d449470be9f86 (patch)
treea1cbd2699cb8f2b0cd2514649aa0df69619de1e7 /Documentation/accounting
parent1e1857230c4879ae6ec37e1dbcbf6ce6217056b5 (diff)
downloadlinux-658eb5ab916ddc92f294dbce8e3d449470be9f86.tar.gz
linux-658eb5ab916ddc92f294dbce8e3d449470be9f86.tar.bz2
linux-658eb5ab916ddc92f294dbce8e3d449470be9f86.zip
delayacct: add delay max to record delay peak
Introduce the use cases of delay max, which can help quickly detect potential abnormal delays in the system and record the types and specific details of delay spikes. Problem ======== Delay accounting can track the average delay of processes to show system workload. However, when a process experiences a significant delay, maybe a delay spike, which adversely affects performance, getdelays can only display the average system delay over a period of time. Yet, average delay is unhelpful for diagnosing delay peak. It is not even possible to determine which type of delay has spiked, as this information might be masked by the average delay. Solution ========= the 'delay max' can display delay peak since the system's startup, which can record potential abnormal delays over time, including the type of delay and the maximum delay. This is helpful for quickly identifying crash caused by delay. Use case ========= bash# ./getdelays -d -p 244 print delayacct stats ON PID 244 CPU count real total virtual total delay total delay average delay max 68 192000000 213676651 705643 0.010ms 0.306381ms IO count delay total delay average delay max 0 0 0.000ms 0.000000ms SWAP count delay total delay average delay max 0 0 0.000ms 0.000000ms RECLAIM count delay total delay average delay max 0 0 0.000ms 0.000000ms THRASHING count delay total delay average delay max 0 0 0.000ms 0.000000ms COMPACT count delay total delay average delay max 0 0 0.000ms 0.000000ms WPCOPY count delay total delay average delay max 235 15648284 0.067ms 0.263842ms IRQ count delay total delay average delay max 0 0 0.000ms 0.000000ms [wang.yaxin@zte.com.cn: update docs and fix some spelling errors] Link: https://lkml.kernel.org/r/20241213192700771XKZ8H30OtHSeziGqRVMs0@zte.com.cn Link: https://lkml.kernel.org/r/20241203164848805CS62CQPQWG9GLdQj2_BxS@zte.com.cn Co-developed-by: Wang Yong <wang.yong12@zte.com.cn> Signed-off-by: Wang Yong <wang.yong12@zte.com.cn> Co-developed-by: xu xin <xu.xin16@zte.com.cn> Signed-off-by: xu xin <xu.xin16@zte.com.cn> Co-developed-by: Wang Yaxin <wang.yaxin@zte.com.cn> Signed-off-by: Wang Yaxin <wang.yaxin@zte.com.cn> Signed-off-by: Kun Jiang <jiang.kun2@zte.com.cn> Cc: Balbir Singh <bsingharora@gmail.com> Cc: David Hildenbrand <david@redhat.com> Cc: Fan Yu <fan.yu9@zte.com.cn> Cc: Peilin He <he.peilin@zte.com.cn> Cc: tuqiang <tu.qiang35@zte.com.cn> Cc: Yang Yang <yang.yang29@zte.com.cn> Cc: ye xingchen <ye.xingchen@zte.com.cn> Cc: Yunkai Zhang <zhang.yunkai@zte.com.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'Documentation/accounting')
-rw-r--r--Documentation/accounting/delay-accounting.rst42
1 files changed, 21 insertions, 21 deletions
diff --git a/Documentation/accounting/delay-accounting.rst b/Documentation/accounting/delay-accounting.rst
index f61c01fc376e..8a0277428ccf 100644
--- a/Documentation/accounting/delay-accounting.rst
+++ b/Documentation/accounting/delay-accounting.rst
@@ -100,29 +100,29 @@ Get delays, since system boot, for pid 10::
# ./getdelays -d -p 10
(output similar to next case)
-Get sum of delays, since system boot, for all pids with tgid 5::
+Get sum and peak of delays, since system boot, for all pids with tgid 242::
- # ./getdelays -d -t 5
+ bash-4.4# ./getdelays -d -t 242
print delayacct stats ON
- TGID 5
-
-
- CPU count real total virtual total delay total delay average
- 8 7000000 6872122 3382277 0.423ms
- IO count delay total delay average
- 0 0 0.000ms
- SWAP count delay total delay average
- 0 0 0.000ms
- RECLAIM count delay total delay average
- 0 0 0.000ms
- THRASHING count delay total delay average
- 0 0 0.000ms
- COMPACT count delay total delay average
- 0 0 0.000ms
- WPCOPY count delay total delay average
- 0 0 0.000ms
- IRQ count delay total delay average
- 0 0 0.000ms
+ TGID 242
+
+
+ CPU count real total virtual total delay total delay average delay max
+ 239 296000000 307724885 1127792 0.005ms 0.238382ms
+ IO count delay total delay average delay max
+ 0 0 0.000ms 0.000000ms
+ SWAP count delay total delay average delay max
+ 0 0 0.000ms 0.000000ms
+ RECLAIM count delay total delay average delay max
+ 0 0 0.000ms 0.000000ms
+ THRASHING count delay total delay average delay max
+ 0 0 0.000ms 0.000000ms
+ COMPACT count delay total delay average delay max
+ 0 0 0.000ms 0.000000ms
+ WPCOPY count delay total delay average delay max
+ 230 19100476 0.083ms 0.383822ms
+ IRQ count delay total delay average delay max
+ 0 0 0.000ms 0.000000ms
Get IO accounting for pid 1, it works only with -p::