如何在Linux上显示当前磁盘IO队列长度? [英] How do I display the current disk IO queue length on Linux?

查看:1299
本文介绍了如何在Linux上显示当前磁盘IO队列长度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Linux内核开发一个新的IO调度程序。我试图看看是否有人知道在Linux中打印出未完成的IO请求总数(磁盘IO队列)的工具?

I am working on a new IO scheduler for the Linux Kernel. I am trying to see if anyone knows of a tool that prints out total number of outstanding IO requests (Disk IO queue) in Linux?

我将从终端工作。

谢谢!

推荐答案

在这里原谅大规模的死灵。你真的想要 iostat -x ,这将显示自上次运行iostat以来有问题的设备的扩展统计数据。如果您希望实时监控队列,您需要 iostat -xt 1 (或 iostat -xmt 1 以显示详细信息以兆字节为单位。

Forgive the massive necro here. You actually want iostat -x which will display the extended stats for the device in question since last iostat was run. If you wish to monitor the queue in realtime you want iostat -xt 1 (or iostat -xmt 1 to show details in megabytes).

您可以在 avgqu-sz 列中查看平均队列大小。

You can see the average queue size in the avgqu-sz column.

考虑以下来自 iostat -xmt 1 的示例输出,该输出显示完整的IO队列(此设备的最大队列长度为128)基准测试期间饱和磁盘。

Consider the following example output from iostat -xmt 1 which shows a full IO queue (max queue length is 128 for this device) and a saturated disk during a benchmark.

18/05/15 00:41:05
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.00    0.00    0.00    6.02    0.00   93.98

Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await  svctm  %util
xvda              0.00     0.00    1.00 1308.00     0.00   163.50   255.81   133.30  101.15   0.76 100.00

这篇关于如何在Linux上显示当前磁盘IO队列长度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆