[Bug 1346687] Re: Ubuntu 14 KVM Guest I/O Elevator Non-configurable
any news ? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1346687 Title: Ubuntu 14 KVM Guest I/O Elevator Non-configurable To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1346687/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1346687] Re: Ubuntu 14 KVM Guest I/O Elevator Non-configurable
I hate to reopen an old bug, but I haven't seen this discussed anywhere else, and I think there is some validity in this. Without the use of the cfq scheduler on block devices (virtual or not), the blkio cgroup controller doesn't perform any IO accounting (see below). Without that, tools like systemd-cgtop don't show any I/O stats. Determining which (group of) processes is using the most IO can be very valuable even in a virtual environment. It also prevents the use of ionice (which depends on cfq) on certain tasks within the VM, which again still have merit inside a VM, and the hypervisor can't affect once it reaches that level in the I/O path. Now, for accounting at least, whether that's a fix that should be done in the choice of block device queue scheduler or the blkio cgroup controller, is perhaps up for debate. But as it stands, users/operators are prevented from making the choice of elevator for themselves which seems wrong to me. If I want to pay the CPU cost for performing IO accounting if not scheduling inside a VM, even if the underlying storage may turn around and reorder things with its own more global optimization view, I should still be allowed to. Thanks, Brian This was done on a VMware VM since obviously I can't demonstrate it in a KVM VM, but the idea applies to physical machines as well. Tested running both 3.16 and 4.5 kernels. (get the current process' blkio cgroup) # grep blkio /proc/self/cgroup 7:blkio:/system.slice/ssh.service (yeah, I know, I was missing pam_systemd in the stack, but whatever) (check the current scheduler being used) # cat /sys/block/sda/queue/scheduler [noop] deadline cfq (check the current stats) # cat /sys/fs/cgroup/blkio/system.slice/ssh.service/blkio.io_serviced Total 0 (induce some IO) # time find /var/log -type f -print0 2>/dev/null | xargs -0 cat > /dev/null 2>/dev/null real0m4.539s user0m0.000s sys 0m0.048s (check the new blk io stats) # cat /sys/fs/cgroup/blkio/system.slice/ssh.service/blkio.io_serviced Total 0 (no change) (switch to the cfq scheduler) # echo cfq | sudo tee /sys/block/sda/queue/scheduler cfq (verify that the change happened) # cat /sys/block/sda/queue/scheduler noop deadline [cfq] (check the current blkio stats) # cat /sys/fs/cgroup/blkio/system.slice/ssh.service/blkio.io_serviced 8:0 Read 0 8:0 Write 0 8:0 Sync 0 8:0 Async 0 8:0 Total 0 Total 0 (look new fields) (clear the page cache to make sure our next test actually causes io) # echo 1 | sudo tee /proc/sys/vm/drop_caches 1 (induce io again) # time find /var/log -type f -print0 2>/dev/null | xargs -0 cat > /dev/null 2>/dev/null real0m2.386s user0m0.000s sys 0m0.040s (check the blkio stats again) # cat /sys/fs/cgroup/blkio/system.slice/ssh.service/blkio.io_serviced 8:0 Read 1827 8:0 Write 0 8:0 Sync 0 8:0 Async 1827 8:0 Total 1827 Total 1827 (look, data!) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1346687 Title: Ubuntu 14 KVM Guest I/O Elevator Non-configurable To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1346687/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1346687] Re: Ubuntu 14 KVM Guest I/O Elevator Non-configurable
** Package changed: util-linux (Ubuntu) = linux (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1346687 Title: Ubuntu 14 KVM Guest I/O Elevator Non-configurable To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1346687/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1346687] Re: Ubuntu 14 KVM Guest I/O Elevator Non-configurable
This is a change in the kernel between 3.13 and 3.13-rc1. It also persists in the most recent kernel version. I believe this is still an invalid bug as what benefit would setting an I/O scheduler to anything be if the device is virtual? On a physical machine you are still able to set the I/O scheduler properly. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1346687 Title: Ubuntu 14 KVM Guest I/O Elevator Non-configurable To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1346687/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1346687] Re: Ubuntu 14 KVM Guest I/O Elevator Non-configurable
As suggested, I added the package for /bin/lsblk. That is probably good enough for initial bug report. Dusan Baljevic ** Package changed: ubuntu = util-linux (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1346687 Title: Ubuntu 14 KVM Guest I/O Elevator Non-configurable To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1346687/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1346687] Re: Ubuntu 14 KVM Guest I/O Elevator Non-configurable
Your other distributions are running older kernels. This behavior was changed in the kernel because it does not make sense to run an elevator on virtual devices. You will notice the same thing on bare metal for lvm and raid: they no longer have their own elevator. Instead the IO is passed straight down the stack to the real disk where there is a single elevator managing all IO to that disk, whether it comes from different virtual machines, or logical volumes. ** Changed in: util-linux (Ubuntu) Status: New = Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1346687 Title: Ubuntu 14 KVM Guest I/O Elevator Non-configurable To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1346687/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1346687] Re: Ubuntu 14 KVM Guest I/O Elevator Non-configurable
** Tags added: trusty -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1346687 Title: Ubuntu 14 KVM Guest I/O Elevator Non-configurable To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1346687/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1346687] Re: Ubuntu 14 KVM Guest I/O Elevator Non-configurable
Thank you for the update. I am then not sure why it is also wrong in CentOS 7 guest. The inconsistency with other Linux distributions is what I am concerned about... # uname -a Linux centos7-vm2 3.10.0-123.4.2.el7.x86_64 #1 SMP Mon Jun 30 16:09:14 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux # cat /sys/block/vda/queue/scheduler noop [deadline] cfq # ./Linux-check-IO-scheduler-and-discard-support.pl INFO: File systems and raids NAME FSTYPE LABEL UUID MOUNTPOINT sr0 vda ├─vda1 xfs a1652174-58b6-4e97-a3ca-4a2160a31100 /boot └─vda2 LVM2_member fVCpR3-mtm0-J1KU-XG56-IvOx-9Use-tqS0o2 ├─centos_centos7--vm2-swap swap ad6f9fd9-59a5-49b2-afe9-531a8b74a446 [SWAP] └─centos_centos7--vm2-root xfs 63a2a109-cb5a-4b75-ac63-b903d81df633 / INFO: Block devices NAME ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC ROTA SCHED RQ-SIZE RA WSAME sr0 0512 0 512 5121 cfq 128 1280B vda 0512 0 512 5121 deadline 128 40960B ├─vda1 0512 0 512 5121 deadline 128 40960B └─vda2 0512 0 512 5121 deadline 128 40960B ├─centos_centos7--vm2-swap 0512 0 512 5121 128 40960B └─centos_centos7--vm2-root 0512 0 512 5121 128 40960B INFO: I/O elevator (scheduler) and discard support summary INFO: Hard Disk vda configured with I/O scheduler deadline All other KVM guests that I run exhibit different reports from Ubuntu 14.01: OpenSUSE Linux 13.1 (3.11.10-17.x86_64 #1 SMP PREEMPT) Oracle Linux 6.5 (3.8.13-35.1.2.el6uek.x86_64 #2 SMP) CentOS Linux 7.0.1406 (3.10.0-123.4.2.el7.x86_64 #1 SMP) Regards, Dusan -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1346687 Title: Ubuntu 14 KVM Guest I/O Elevator Non-configurable To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1346687/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1346687] Re: Ubuntu 14 KVM Guest I/O Elevator Non-configurable
Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode. To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1346687/+editstatus and add the package name in the text box next to the word Package. [This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.] ** Tags added: bot-comment -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1346687 Title: Ubuntu 14 KVM Guest I/O Elevator Non-configurable To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+bug/1346687/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs