OpenVZ Forum - RDF feed
type: channel
items: [PATCH 0/2] dm-ioband: I/O bandwidth controller v0.0.4: Introduction
items: [PATCH 1/2] dm-ioband: I/O bandwidth controller v0.0.4: Source code and patch
items: [PATCH 2/2] dm-ioband: I/O bandwidth controller v0.0.4: Document
items: Re: [PATCH 2/2] dm-ioband: I/O bandwidth controller v0.0.4: Document

[PATCH 0/2] dm-ioband: I/O bandwidth controller v0.0.4: Introduction
type: item
description: Hi everyone, This is dm-ioband version 0.0.4 release. Dm-ioband is an I/O bandwidth controller implemented as a device-mapper driver, which gives specified bandwidth to each job running on the same physical device. Changes since 0.0.3 (5th February): - Improve the performance when many processes are issuing I/Os simultaneously. - Change the table format to fully support dmsetup table/load commands. The table format consists all configuration parameters. - Port to linux-2.6.25. An administration tool is available. It makes it easy to configure bandwidths of disk partitions. You can download it and find the manual at http://people.valinux.co.jp/~kaizuka/dm-ioband/iobandctl/ For more details, please refer to: http://people.valinux.co.jp/~ryov/dm-ioband/ Thanks, Ryo Tsuruta _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Ryo Tsuruta
date: 2008-04-24T11:18:57-00:00

[PATCH 1/2] dm-ioband: I/O bandwidth controller v0.0.4: Source code and patch
type: item
description: Here is the patch of dm-ioband. Based on 2.6.25 Signed-off-by: Ryo Tsuruta <ryov@valinux.co.jp> Signed-off-by: Hirokazu Takahashi <taka@valinux.co.jp> diff -uprN linux-2.6.25.orig/drivers/md/dm-ioband-ctl.c linux-2.6.25/drivers/md/dm-ioband-ctl.c --- linux-2.6.25.orig/drivers/md/dm-ioband-ctl.c 1970-01-01 09:00:00.000000000 +0900 +++ linux-2.6.25/drivers/md/dm-ioband-ctl.c 2008-04-24 19:44:08.000000000 +0900 @@ -0,0 +1,1036 @@ +/* + * Copyright (C) 2008 VA Linux Systems Japan K.K. + * Authors: Hirokazu Takahashi <taka@valinux.co.jp> + * Ryo Tsuruta <ryov@valinux.co.jp> + * + * I/O bandwidth control + * + * This file is released under the GPL. + */ +#include <linux/module.h> +#include <linux/init.h> +#include <linux/bio.h> +#include <linux/slab.h> +#include <linux/workqueue.h> +#include <linux/raid/md.h> +#include "dm.h" +#include "dm-bio-list.h" +#include "dm-ioband.h" + +#define DM_MSG_PREFIX "ioband" +#define POLICY_PARAM_START 6 +#define POLICY_PARAM_DELIM "=:," + +static LIST_HEAD(ioband_device_list); +/* to protect ioband_device_list */ +static DEFINE_SPINLOCK(ioband_devicelist_lock); + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) +static void ioband_conduct(void *); +#else +static void ioband_conduct(struct work_struct *); +#endif +static void ioband_hold_bio(struct ioband_group *, struct bio *); +static struct bio *ioband_pop_bio(struct ioband_group *); +static int ioband_set_param(struct ioband_group *, char *, char *); +static int ioband_group_attach(struct ioband_group *, int, char *); +static int ioband_group_type_select(struct ioband_group *, char *); + +long ioband_debug; /* just for debugging */ + +static int policy_init(struct ioband_device *dp, char *name, + int argc, char **argv) +{ + struct policy_type *p; + int r; + + for (p = dm_ioband_policy_type; (p->p_name); p++) { + if (!strcmp(name, p->p_name)) + break; + } + + dp->g_policy = p; + r = p->p_policy_init(dp, argc, argv); + if (!dp->g_hold_bio) + dp->g_hold_bio = ioband_hold_bio; + if (!dp->…
creator: Ryo Tsuruta
date: 2008-04-24T11:21:44-00:00

[PATCH 2/2] dm-ioband: I/O bandwidth controller v0.0.4: Document
type: item
description: Here is the document of dm-ioband. Based on 2.6.25 Signed-off-by: Ryo Tsuruta <ryov@valinux.co.jp> Signed-off-by: Hirokazu Takahashi <taka@valinux.co.jp> diff -uprN linux-2.6.25.orig/Documentation/device-mapper/ioband.txt linux-2.6.25/Documentation/device-mapper/ioband.txt --- linux-2.6.25.orig/Documentation/device-mapper/ioband.txt 1970-01-01 09:00:00.000000000 +0900 +++ linux-2.6.25/Documentation/device-mapper/ioband.txt 2008-04-24 16:51:58.000000000 +0900 @@ -0,0 +1,883 @@ + Block I/O bandwidth control: dm-ioband + + ------------------------------------------------------- + + Table of Contents + + [1]What's dm-ioband all about? + + [2]Differences from the CFQ I/O scheduler + + [3]How dm-ioband works. + + [4]Setup and Installation + + [5]Getting started + + [6]Command Reference + + [7]Examples + +What's dm-ioband all about? + + dm-ioband is an I/O bandwidth controller implemented as a device-mapper + driver. Several jobs using the same physical device have to share the + bandwidth of the device. dm-ioband gives bandwidth to each job according + to its weight, which each job can set its own value to. + + At this time, a job is a group of processes with the same pid or pgrp or + uid. There is also a plan to make it support cgroup. A job can also be a + virtual machine such as KVM or Xen. + + +------+ +------+ +------+ +------+ +------+ +------+ + |cgroup| |cgroup| | the | | pid | | pid | | the | jobs + | A | | B | |others| | X | | Y | |others| + +--|---+ +--|---+ +--|---+ +--|---+ +--|---+ +--|---+ + +--V----+---V---+----V---+ +--V----+---V---+----V---+ + | group | group | default| | group | group | default| ioband groups + | | | group | | | | group | + +-------+-------+--------+ +-------+-------+--------+ + | ioband1 | | ioband2 | ioband devices + +-----------|------------+ +-----------|------------+ + +-----------V--------------+-------------V------------+ + | | | + | sdb1 | sdb2 | physical devices + +--------------------------+--------------------------+ + + + --…
creator: Ryo Tsuruta
date: 2008-04-24T11:22:19-00:00

Re: [PATCH 2/2] dm-ioband: I/O bandwidth controller v0.0.4: Document
type: item
description: On Thu, 24 Apr 2008 20:22:19 +0900 (JST) Ryo Tsuruta <ryov@valinux.co.jp> wrote: > +What's dm-ioband all about? > + > + dm-ioband is an I/O bandwidth controller implemented as a device-mapper > + driver. Several jobs using the same physical device have to share the > + bandwidth of the device. dm-ioband gives bandwidth to each job according > + to its weight, which each job can set its own value to. > + > + At this time, a job is a group of processes with the same pid or pgrp or > + uid. There is also a plan to make it support cgroup. A job can also be a > + virtual machine such as KVM or Xen. Most writes are performed by pdflush, kswapd, etc. This will lead to large inaccuracy. It isn't trivial to fix. We'd need deep, long tracking of ownership probably all the way up to the pagecache page. The same infrastructure would be needed to make Sergey's "BSD acct: disk I/O accounting" vaguely accurate. Other proposals need it, but I forget what they are. Much more minor points: when merge-time comes, the patches should have the LINUX_VERSION_CODE stuff removed. And probably all of the many `inline's should be removed. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: akpm
date: 2008-04-26T18:45:35-00:00

Re: [PATCH 2/2] dm-ioband: I/O bandwidth controller v0.0.4: Document
type: item
description: Hi, > > +What's dm-ioband all about? > > + > > + dm-ioband is an I/O bandwidth controller implemented as a device-mapper > > + driver. Several jobs using the same physical device have to share the > > + bandwidth of the device. dm-ioband gives bandwidth to each job according > > + to its weight, which each job can set its own value to. > > + > > + At this time, a job is a group of processes with the same pid or pgrp or > > + uid. There is also a plan to make it support cgroup. A job can also be a > > + virtual machine such as KVM or Xen. > > Most writes are performed by pdflush, kswapd, etc. This will lead to large > inaccuracy. > > It isn't trivial to fix. We'd need deep, long tracking of ownership > probably all the way up to the pagecache page. The same infrastructure > would be needed to make Sergey's "BSD acct: disk I/O accounting" vaguely > accurate. Other proposals need it, but I forget what they are. I'm working on this topic and I've posted patches once. http://lwn.net/Articles/273802/ The current linux kernel already has the memory subsystem of cgroup. You can determine which page is owned by which cgroup with it. I realized we could easily implement "tracking mechanism of block I/O" on the feature of this memory subsystem. When you have an I/O request, it requires data transfer between a certain page and certain sectors in a disk. This means every I/O requests has a target page, so you can find out the owner of the page using this feature. I think it will be okay to assume that the owner of the page is the owner of the I/O request to the page. I have a plan on porting the patch to the latest version of linux. I'm going to make it general, so not only dm-ioband but also OpenVz team and the NEC team, which are is working on having the CFQ scheduler control the bandwidth, will be able to make use of this feature. But it will take some time to port it since the code of the memory subsystem has been being modified a lot recently. Thank you, Hirokazu Takahashi.…
creator: Hirokazu Takahashi
date: 2008-04-28T06:49:15-00:00

Re: [PATCH 2/2] dm-ioband: I/O bandwidth controller v0.0.4: Document
type: item
description: Hi, > Most writes are performed by pdflush, kswapd, etc. This will lead to large > inaccuracy. > > It isn't trivial to fix. We'd need deep, long tracking of ownership > probably all the way up to the pagecache page. The same infrastructure > would be needed to make Sergey's "BSD acct: disk I/O accounting" vaguely > accurate. Other proposals need it, but I forget what they are. I also realize that some kernel threads such as pdflush perform actual writes instead of tasks which originally issued write requests. So, taka is developing a blocking I/O tacking down mechanism which is based on cgroup memory controller and posted it to LKML: http://lwn.net/Articles/273802/ However, the current implementation works well with Xen virtual machines, because virtual machine's I/Os are issued from its own kernel thread and can be tracked down. Please see a benchmark result of Xen virtual machine: http://people.valinux.co.jp/~ryov/dm-ioband/benchmark/xen-blktap.html As for KVM, dm-ioband was also able to track down block I/Os as I expected. When dm-ioband is used in virtual machine environment, I think even the current implementation will work fairly. But unfortunately I found KVM still had a performance problem that it couldn't handle I/Os efficiently yet, which should be improved. I already posted this problem to kvm-devel list: http://sourceforge.net/mailarchive/forum.php?thread_name=20080229.210531.226799765.ryov%40valinux.co.jp&forum_name=kvm-devel > Much more minor points: when merge-time comes, the patches should have the > LINUX_VERSION_CODE stuff removed. And probably all of the many `inline's > should be removed. Thank you for your advice. I'll have these fixes included in the next release. Ryo Tsuruta _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Ryo Tsuruta
date: 2008-04-28T08:06:27-00:00