我使用EC2 c3.4xlarge实例上的2个本地SSD驱动器创build了一个RAIDarrays。
# mdadm --create /dev/md127 --level=0 --raid-devices=2 /dev/xvdf /dev/xvdg # mkfs.ext4 /dev/md127 # mkdir /data # echo 'DEVICE /dev/xvdf /dev/xvdg' > /etc/mdadm.conf # mdadm --detail --scan >> /etc/mdadm.conf # echo "/dev/md127 /data ext4 defaults 1 2" >> /etc/fstab
该设备工作很好。 但是,当我试图为数组设置I / O调度程序(以root身份)时,调度程序文件不会更改。
# echo noop > /sys/block/md127/queue/scheduler # cat /sys/block/md127/queue/scheduler none
设置调度程序的正确方法是什么,以便最后的命令输出是'noop'?
不要手动做这个。 我的意思是,你可以通过追加内核启动参数行来全局化。 但是,使用tuned-utils框架来处理这个问题。
yum install tuned tuned-utils
一旦安装…
tuned-adm profile virtual-guest
或者根据虚拟客人制作您自己的个人资料。
在/etc/tune-profiles/virtual-guest ,有一段说:
# This is the I/O scheduler ktune will use. This will *not* override anything # explicitly set on the kernel command line, nor will it change the scheduler # for any block device that is using a non-default scheduler when ktune starts. # You should probably leave this on "deadline", but "as", "cfq", and "noop" are # also legal values. Comment this out to prevent ktune from changing I/O # scheduler settings. ELEVATOR="deadline"
修改品尝和完成!