QoS mechanism in Linux-DM-ioband (1)

Source: Internet
Author: User

DM-ioband is not integrated in mainstream kernel and must be patched for use. Besides, it must be the source code of the kernel community, if I patch the kernel with a red hat, an error is reported...

Http://sourceforge.net/apps/trac/ioband/wiki/dm-ioband

After the patch is downloaded, mark it and make menuconfig. Then, check the ioband module under LVM/raid/devicemapper, re-compile and install the kernel, and restart lsmod | grep ioband, if you can see ioband, it indicates that the installation is successful. Here are a few examples to illustrate how to use the DM-ioband function. The following sections will analyze the implementation principles of device Mapper and ioband in detail.

E.g.

For I/O QoS in virtualization scenarios, UID and GID are not suitable. It is more reliable to use process ID or cgroup, while QoS policies can be based on

Iops --> "Weight-iosize"

BW --> "weight"

Io throttle --> "range-BW"

Example 1

Create two ioband devices using DMSetup, set the weight ratio to 80: 20, and use dd for testing; using FIO test to find that the effect is not obvious (subsequent studies need to explain these issues)

# Echo "0 $ (blockdev -- getsize/dev/sdf1) ioband/dev/sdf1 1 0 0 none weight 0: 80" | DMSetup create ioband1

# Echo "0 $ (blockdev -- getsize/dev/sdf2) ioband/dev/sdf2 1 0 0 none weight 0: 20" | DMSetup create ioband2

FIO is tested by random write and sequential write respectively.

The iops ratio is basically 6388: 8992, And the BW ratio is basically 25556: 35968, which is basically 1.4: 1, which is far from the requirement of 4: 1.

Example 2

Through the attach PID method, the results are still unsatisfactory.

# dmsetup message ioband1 0 type pid# dmsetup message ioband1 0 attach 15011# dmsetup message ioband1 0 weight 15011:80# dmsetup message ioband1 0 attach 15276# dmsetup message ioband1 0 weight 15276:40

I checked the ioband official wiki, as mentioned above

Run 128 processes issuing random read/write direct I/O with 4kb data on each virtual machine at the same time respectively.

However, operations on a large number of small files are still ineffective...


Finally, verify the performance impact of using device Mapper and directly operating the device.

Because device mapper finds the physical sector of a real device by searching for the btree for each sector, the performance may be compromised. The random read/write speed is about 8%, and the sequential read/write speed is about 3%.


-------------------------------------------------- Gorgeous split line --------------------------------------------------------------


Use FIO again today, where filename is selected as the device, e.g. /dev/mapper/ioband1,/dev/sdf1, test to discard the specified file size and name. Set time_base and runtime = 30. This time there is no problem. In my opinion, whether ioband works is closely related to the test method. For example, if dd is used, FIO tests based on files cannot detect accurate data.


The loss of DM devices and physical devices is about 2%.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.