zoukankan      html  css  js  c++  java
  • Linux Change The I/O Scheduler For A Hard Disk

    ow do I change the I/O scheduler for a particular hard disk without rebooting my Linux server system?

    CFQ [cfq] (Completely Fair Queuing) is an I/O scheduler for the Linux kernel and default under many Linux distributions.

    Noop scheduler (noop) is the simplest I/O scheduler for the Linux kernel based upon FIFO queue concept.

    Anticipatory scheduler (anticipatory) is an algorithm for scheduling hard disk input/output as well as old scheduler which is replaced by CFQ

    Deadline scheduler (deadline) - it attempt to guarantee a start service time for a request.

    Task: View Current Disk scheduler

    Assuming that your disk name /dev/sda, type:
    # cat /sys/block/{DEVICE-NAME}/queue/scheduler
    # cat /sys/block/sda/queue/scheduler

    Sample output:

    noop anticipatory deadline [cfq]

    Task: Set I/O Scheduler For A Hard Disk

    To set a specific scheduler, simply type the command as follows:
    # echo {SCHEDULER-NAME} > /sys/block/{DEVICE-NAME}/queue/scheduler
    For example, set noop scheduler, enter:
    # echo noop > /sys/block/hda/queue/scheduler

    我在IBM工作,可以为大家内部推荐IBM各种职位 IBM全球职位尽在以下链接(请在浏览器中打开,QQ/微信 会阻止): http://ibmreferrals.com/ 很乐意为感兴趣的小伙伴分享:我的面试经验^_^ 如需咨询,请邮件发送以下邮箱,有问必回 1026096425@qq.com
  • 相关阅读:
    Xdebug
    单点登录
    一个Https网站发送Http的 ajax请求的解决方法
    js关闭微信浏览器页面
    标准的身份证验证(第18位校验码)
    Redis 更新(set) key值 会重置过期时间问题
    PHP 报错:Deprecated: Methods with the same name as their class will not be constructor...
    php防sql注入
    web开发原则
    fopen()函数
  • 原文地址:https://www.cnblogs.com/jackydalong/p/3642597.html
Copyright © 2011-2022 走看看