WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Xen

xen-devel

[Top] [All Lists]

[Xen-devel] [PATCH 3/7] bio-cgroup: Introduction

To: linux-kernel@xxxxxxxxxxxxxxx, dm-devel@xxxxxxxxxx, containers@xxxxxxxxxxxxxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 3/7] bio-cgroup: Introduction
From: Ryo Tsuruta <ryov@xxxxxxxxxxxxx>
Date: 2008年8月04日 17:57:07 +0900 (JST)
Cc: agk@xxxxxxxxxxxxxx
Delivery-date: 2008年8月04日 01:57:47 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20080804.175254.71094191.ryov@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20080804.175126.193692178.ryov@xxxxxxxxxxxxx> <20080804.175214.226796876.ryov@xxxxxxxxxxxxx> <20080804.175254.71094191.ryov@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
With this series of bio-cgruop patches, you can determine the owners of any
type of I/Os and it makes dm-ioband -- I/O bandwidth controller --
be able to control the Block I/O bandwidths even when it accepts
delayed write requests.
Dm-ioband can find the owner cgroup of each request.
It is also possible that the other people who work on the I/O
bandwidth throttling use this functionality to control asynchronous
I/Os with a little enhancement.
You have to apply the patch dm-ioband v1.4.0 before applying this series
of patches.
And you have to select the following config options when compiling kernel:
 CONFIG_CGROUPS=y
 CONFIG_CGROUP_BIO=y
And I recommend you should also select the options for cgroup memory
subsystem, because it makes it possible to give some I/O bandwidth
and some memory to a certain cgroup to control delayed write requests
and the processes in the cgroup will be able to make pages dirty only
inside the cgroup even when the given bandwidth is narrow.
 CONFIG_RESOURCE_COUNTERS=y
 CONFIG_CGROUP_MEM_RES_CTLR=y
This code is based on some part of the memory subsystem of cgroup
and I don't think the accuracy and overhead of the subsystem can be ignored
at this time, so we need to keep tuning it up.
 --------------------------------------------------------
The following shows how to use dm-ioband with cgroups.
Please assume that you want make two cgroups, which we call "bio cgroup"
here, to track down block I/Os and assign them to ioband device "ioband1".
First, mount the bio cgroup filesystem.
 # mount -t cgroup -o bio none /cgroup/bio
Then, make new bio cgroups and put some processes in them.
 # mkdir /cgroup/bio/bgroup1
 # mkdir /cgroup/bio/bgroup2
 # echo 1234 > /cgroup/bio/bgroup1/tasks
 # echo 5678 > /cgroup/bio/bgroup1/tasks
Now, check the ID of each bio cgroup which is just created.
 # cat /cgroup/bio/bgroup1/bio.id
 1
 # cat /cgroup/bio/bgroup2/bio.id
 2
Finally, attach the cgroups to "ioband1" and assign them weights.
 # dmsetup message ioband1 0 type cgroup
 # dmsetup message ioband1 0 attach 1
 # dmsetup message ioband1 0 attach 2
 # dmsetup message ioband1 0 weight 1:30
 # dmsetup message ioband1 0 weight 2:60
You can also make use of the dm-ioband administration tool if you want.
The tool will be found here:
http://people.valinux.co.jp/~kaizuka/dm-ioband/iobandctl/manual.html
You can set up the device with the tool as follows.
In this case, you don't need to know the IDs of the cgroups.
 # iobandctl.py group /dev/mapper/ioband1 cgroup /cgroup/bio/bgroup1:30 
/cgroup/bio/bgroup2:60
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: [Xen-devel] [PATCH 2/7] dm-ioband: Documentation of design overview, installation, command reference and examples , Ryo Tsuruta
Next by Date: [Xen-devel] [PATCH 4/7] bio-cgroup: Split the cgroup memory subsystem into two parts , Ryo Tsuruta
Previous by Thread: [Xen-devel] [PATCH 2/7] dm-ioband: Documentation of design overview, installation, command reference and examples , Ryo Tsuruta
Next by Thread: [Xen-devel] [PATCH 4/7] bio-cgroup: Split the cgroup memory subsystem into two parts , Ryo Tsuruta
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /