QoS mechanism in Linux-cgroup (2)

Source: Internet
Author: User

This article focuses on how cgroup controls the QoS of the blkio sub-system. First, let's look at the settings

Blkio. Weight blkio. weight_device my understanding is that blkio. weight is the weight of the entire Io subsystem, while blkio. weight_device is the weight of a specific major: minor device.

Blkio. Throttle. Limit blkio. Throttle. write_bps_device blkio. Throttle. Limit blkio. Throttle. write_iops_device the maximum number of read/write BPS for specific major: minor devices.

The other blkio settings are the perf report data of the current blkio sub-system. Most of the data is similar to the iostat-x attribute and will not be repeated.

# Mount-T cgroup-O blkio NONE/cgroup/blkio

# Mkdir-P/cgroup/blkio/tinker

# Mkdir-P/cgroup/blkio/tailor

# Echo 800>/cgroup/blkio/Tinker/blkio. Weight

# Echo 200>/cgroup/blkio/tailor/blkio. Weight

Next we will use dd to write a large file and put the two processes into different cgroups. We can see that blkio changes to Io QoS by comparing the changes before and after.

Before using cgroup, we can see that I/O bandwidth is evenly allocated.

After cgroup is used, the ratio is basically 800: 200.

TIPS: cgroups of a virtual machine that uses PVM cannot work normally. I wonder if it is related to xenlinux.

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.