当前位置: 首页 > 工具软件 > runq > 使用案例 >

使用sar -q查看等待运行的任务数量(runq-sz)和系统负载情况(ldavg-1,ldavg-5,ldavg-15)

宿鹏程
2023-12-01
[root@abc ~]# man sar

       -q     Report queue length and load averages. The following values are displayed:
              runq-sz
                     Run queue length (number of tasks waiting for run time).
              plist-sz
                     Number of tasks in the task list.
              ldavg-1
                     System load average for the last minute.  The load average is calculated as the average number of runnable or running tasks (R state), and the number of tasks in unin-
                     terruptible sleep (D state) over the specified interval.
              ldavg-5
                    System load average for the past 5 minutes.
              ldavg-15
                     System load average for the past 15 minutes.

[root@abc ~]# sar -q  1 10
Linux 2.6.32-642.el6.x86_64 (abc) 	06/06/2018 	_x86_64_	(4 CPU)


11:39:51 AM   runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15
11:39:52 AM         0       291      0.12      0.09      0.06
11:39:53 AM         0       291      0.11      0.09      0.06
11:39:54 AM         0       291      0.11      0.09      0.06
11:39:55 AM         0       291      0.11      0.09      0.06
11:39:56 AM         0       291      0.11      0.09      0.06
11:39:57 AM         0       291      0.11      0.09      0.06
11:39:58 AM         0       291      0.10      0.09      0.06
11:39:59 AM         0       291      0.10      0.09      0.06
11:40:00 AM         1       291      0.10      0.09      0.06
11:40:01 AM         0       291      0.10      0.09      0.06
Average:            0       291      0.11      0.09      0.06
[root@abc ~]# 
typically a system's load should remain at 70% of the number of cores or lower. 
If the system's load is consistently above this amount there may be performance degradation, 
and if the load ever rises above the number of cores there will be a significant slowdown.
如上摘自:https://access.redhat.com/articles/325783
How to analyze and interpret sar data.

 类似资料: