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
  • 相关阅读:
    jquery实现表格文本框淡入更改值后淡出
    硬件抽象层
    第八章读书笔记
    Linux驱动——LED闪烁
    编写Linux驱动与统计单词个数
    在开发板上安装Android
    源代码的下载和编译
    初学Git随笔
    Ubuntu Linux环境下的Android开发环境的配置
    Android系统移植于驱动开发概述
  • 原文地址:https://www.cnblogs.com/jackydalong/p/3642597.html
Copyright © 2011-2022 走看看