RHEL7:如何配置I / O调度程序

介绍

I / O调度程序用于优化磁盘上的读/写。

RHEL 7中有三种类型的I / O调度程序(也称为I / O电梯):

  • CFQ(C fullly F air Q ueuing)促进来自实时流程的I / O并使用历史数据来预测应用程序是否会在不久的将来发出更多I / O请求(导致轻微的空闲趋势)。
  • 截止时间尝试为请求提供有保证的延迟,尤其适用于读取操作比写入操作更频繁的情况(一个队列用于读取,一个用于写入,I / O根据队列中花费的时间进行调度)。
  • Noop实现了一种简单的FIFO(先进先出)调度算法,并且CPU成本最低。

对于RHEL 7,默认的I / O调度程序现在是SATA驱动器的CFQ和  其他所有内容的截止日期。 这是因为截止日期优于CFQ以获得比SATA驱动器更快的存储空间。

RHEL 7性能调整指南中提供了更多详细信息。

Configuration at boot

To define a global I/O scheduler (here cfq) at boot, type:

# grubby --update-kernel=ALL --args="elevator=cfq"

Configuration for a particular disk

To get the current configuration of a disk (here /dev/sda), type:

# more /sys/block/sda/queue/scheduler
noop deadline [cfq]

To assign an I/O scheduler (here deadline) to a particular disk (here /dev/sda), type:

# echo deadline > /sys/block/sda/queue/scheduler

Note: This could be set permanently through the rc-local service.

To check the new configuration, type:

# more /sys/block/sda/queue/scheduler
noop [deadline] cfq

Source: RHEL 7 Performance Tuning Guide.

Additional Resources

You can also read IBM Best Practices for KVM starting at page 25.
RedHat provides some suggestions concerning the I/O scheduler to use in a virtualized environment.

转载于:https://www.cnblogs.com/DataArt/p/9983565.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值