All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Fabio Checconi <fchecconi@gmail.com>
Cc: Rik van Riel <riel@redhat.com>, Ryo Tsuruta <ryov@valinux.co.jp>,
	linux-kernel@vger.kernel.org, dm-devel@redhat.com,
	jens.axboe@oracle.com, agk@redhat.com, akpm@linux-foundation.org,
	nauman@google.com, guijianfeng@cn.fujitsu.com, jmoyer@redhat.com,
	balbir@linux.vnet.ibm.com
Subject: Re: Regarding dm-ioband tests
Date: Wed, 9 Sep 2009 13:30:03 -0400	[thread overview]
Message-ID: <20090909173003.GE8256@redhat.com> (raw)
In-Reply-To: <20090909154126.GG17468@gandalf.sssup.it>

On Wed, Sep 09, 2009 at 05:41:26PM +0200, Fabio Checconi wrote:
> > From: Vivek Goyal <vgoyal@redhat.com>
> > Date: Tue, Sep 08, 2009 10:06:20PM -0400
> >
> > On Wed, Sep 09, 2009 at 02:09:00AM +0200, Fabio Checconi wrote:
> > > Hi,
> > > 
> > > > From: Rik van Riel <riel@redhat.com>
> > > > Date: Tue, Sep 08, 2009 03:24:08PM -0400
> > > >
> > > > Ryo Tsuruta wrote:
> > > > >Rik van Riel <riel@redhat.com> wrote:
> > > > 
> > > > >>Are you saying that dm-ioband is purposely unfair,
> > > > >>until a certain load level is reached?
> > > > >
> > > > >Not unfair, dm-ioband(weight policy) is intentionally designed to
> > > > >use bandwidth efficiently, weight policy tries to give spare bandwidth
> > > > >of inactive groups to active groups.
> > > > 
> > > > This sounds good, except that the lack of anticipation
> > > > means that a group with just one task doing reads will
> > > > be considered "inactive" in-between reads.
> > > > 
> > > 
> > >   anticipation helps in achieving fairness, but CFQ currently disables
> > > idling for nonrot+NCQ media, to avoid the resulting throughput loss on
> > > some SSDs.  Are we really sure that we want to introduce anticipation
> > > everywhere, not only to improve throughput on rotational media, but to
> > > achieve fairness too?
> > 
> > That's a good point. Personally I think that fairness requirements for
> > individual queues and groups are little different. CFQ in general seems
> > to be focussing more on latency and throughput at the cost of fairness.
> > 
> > With groups, we probably need to put a greater amount of emphasis on group
> > fairness. So group will be a relatively a slower entity (with anticiaption
> > on and more idling), but it will also give you a greater amount of
> > isolation. So in practice, one will create groups carefully and they will
> > not proliferate like queues. This can mean overall reduced throughput on
> > SSD.
> > 
> 
> Ok, I personally agree on that, but I think it's something to be documented.
> 

Sure. I will document it in documentation file.

> 
> > Having said that, group idling is tunable and one can always reduce it to
> > achieve a balance between fairness vs throughput depending on his need.
> > 
> 
> This is good, however tuning will not be an easy task (at least, in my
> experience with BFQ it has been a problem): while for throughput usually
> there are tradeoffs, as soon as a queue/group idles and then timeouts,
> from the fairness perspective the results soon become almost random
> (i.e., depending on the rate of successful anticipations, but in the
> common case they are unpredictable)...

I am lost in last few lines. I guess you are suggesting that static tuning
is hard and dynamically adjusting idling has limitations that it might not
be accurate all the time?

I will explain how things are working in current set of io scheduler
patches.

Currently on top of queue idling, I have implemented group idling also.
Queue idling is dynamic and io scheduler like CFQ keeps track of
traffic pattern on the queue and disables/enables idling dynamically. So
in this case fairness depends on rate of successful anticipations by the
io scheduler.

Group idling currently is static in nature and purely implemented in
elevator fair queuing layer. Group idling kicks in only when a group is
empty at the time of queue expiration and underlying ioscheduler has not
chosen to enable idling on the queue. This provides us the gurantee that
group will keep on getting its fair share of disk as long as a new request
comes in the group with-in that idling period.

Implementing group idling ensures that it does not bog down the io scheduler
and with-in group queue switching can still be very fast (no idling on many of
the queues by cfq).

Now in case of SSD if group idling is really hurting somebody, I would
expect him to set it to either 1 or 0. You might get better throughput
but then expect fairness for the group only if the group is continuously
backlogged. (Something what dm-ioband guys seem to be doing).

So do you think that adjusting this "group_idling" tunable is too
complicated and there are better ways to handle it in case of SSD+NCQ?

Thanks
Vivek

WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@redhat.com>
To: Fabio Checconi <fchecconi@gmail.com>
Cc: Rik van Riel <riel@redhat.com>,
	guijianfeng@cn.fujitsu.com, linux-kernel@vger.kernel.org,
	jmoyer@redhat.com, dm-devel@redhat.com, nauman@google.com,
	jens.axboe@oracle.com, akpm@linux-foundation.org, agk@redhat.com,
	balbir@linux.vnet.ibm.com
Subject: Re: Regarding dm-ioband tests
Date: Wed, 9 Sep 2009 13:30:03 -0400	[thread overview]
Message-ID: <20090909173003.GE8256@redhat.com> (raw)
In-Reply-To: <20090909154126.GG17468@gandalf.sssup.it>

On Wed, Sep 09, 2009 at 05:41:26PM +0200, Fabio Checconi wrote:
> > From: Vivek Goyal <vgoyal@redhat.com>
> > Date: Tue, Sep 08, 2009 10:06:20PM -0400
> >
> > On Wed, Sep 09, 2009 at 02:09:00AM +0200, Fabio Checconi wrote:
> > > Hi,
> > > 
> > > > From: Rik van Riel <riel@redhat.com>
> > > > Date: Tue, Sep 08, 2009 03:24:08PM -0400
> > > >
> > > > Ryo Tsuruta wrote:
> > > > >Rik van Riel <riel@redhat.com> wrote:
> > > > 
> > > > >>Are you saying that dm-ioband is purposely unfair,
> > > > >>until a certain load level is reached?
> > > > >
> > > > >Not unfair, dm-ioband(weight policy) is intentionally designed to
> > > > >use bandwidth efficiently, weight policy tries to give spare bandwidth
> > > > >of inactive groups to active groups.
> > > > 
> > > > This sounds good, except that the lack of anticipation
> > > > means that a group with just one task doing reads will
> > > > be considered "inactive" in-between reads.
> > > > 
> > > 
> > >   anticipation helps in achieving fairness, but CFQ currently disables
> > > idling for nonrot+NCQ media, to avoid the resulting throughput loss on
> > > some SSDs.  Are we really sure that we want to introduce anticipation
> > > everywhere, not only to improve throughput on rotational media, but to
> > > achieve fairness too?
> > 
> > That's a good point. Personally I think that fairness requirements for
> > individual queues and groups are little different. CFQ in general seems
> > to be focussing more on latency and throughput at the cost of fairness.
> > 
> > With groups, we probably need to put a greater amount of emphasis on group
> > fairness. So group will be a relatively a slower entity (with anticiaption
> > on and more idling), but it will also give you a greater amount of
> > isolation. So in practice, one will create groups carefully and they will
> > not proliferate like queues. This can mean overall reduced throughput on
> > SSD.
> > 
> 
> Ok, I personally agree on that, but I think it's something to be documented.
> 

Sure. I will document it in documentation file.

> 
> > Having said that, group idling is tunable and one can always reduce it to
> > achieve a balance between fairness vs throughput depending on his need.
> > 
> 
> This is good, however tuning will not be an easy task (at least, in my
> experience with BFQ it has been a problem): while for throughput usually
> there are tradeoffs, as soon as a queue/group idles and then timeouts,
> from the fairness perspective the results soon become almost random
> (i.e., depending on the rate of successful anticipations, but in the
> common case they are unpredictable)...

I am lost in last few lines. I guess you are suggesting that static tuning
is hard and dynamically adjusting idling has limitations that it might not
be accurate all the time?

I will explain how things are working in current set of io scheduler
patches.

Currently on top of queue idling, I have implemented group idling also.
Queue idling is dynamic and io scheduler like CFQ keeps track of
traffic pattern on the queue and disables/enables idling dynamically. So
in this case fairness depends on rate of successful anticipations by the
io scheduler.

Group idling currently is static in nature and purely implemented in
elevator fair queuing layer. Group idling kicks in only when a group is
empty at the time of queue expiration and underlying ioscheduler has not
chosen to enable idling on the queue. This provides us the gurantee that
group will keep on getting its fair share of disk as long as a new request
comes in the group with-in that idling period.

Implementing group idling ensures that it does not bog down the io scheduler
and with-in group queue switching can still be very fast (no idling on many of
the queues by cfq).

Now in case of SSD if group idling is really hurting somebody, I would
expect him to set it to either 1 or 0. You might get better throughput
but then expect fairness for the group only if the group is continuously
backlogged. (Something what dm-ioband guys seem to be doing).

So do you think that adjusting this "group_idling" tunable is too
complicated and there are better ways to handle it in case of SSD+NCQ?

Thanks
Vivek

  reply	other threads:[~2009-09-09 17:30 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-01 16:50 Regarding dm-ioband tests Vivek Goyal
2009-09-01 16:50 ` Vivek Goyal
2009-09-01 17:47 ` Vivek Goyal
2009-09-01 17:47   ` Vivek Goyal
2009-09-03 13:11   ` Vivek Goyal
2009-09-03 13:11     ` Vivek Goyal
2009-09-04  1:12     ` Ryo Tsuruta
2009-09-15 21:40       ` dm-ioband fairness in terms of sectors seems to be killing disk (Was: Re: Regarding dm-ioband tests) Vivek Goyal
2009-09-15 21:40         ` Vivek Goyal
2009-09-16 11:10         ` dm-ioband fairness in terms of sectors seems to be killing disk Ryo Tsuruta
2009-09-16 11:10           ` Ryo Tsuruta
2009-09-04  4:02 ` Regarding dm-ioband tests Ryo Tsuruta
2009-09-04  4:02   ` Ryo Tsuruta
2009-09-04 23:11   ` Vivek Goyal
2009-09-04 23:11     ` Vivek Goyal
2009-09-07 11:02     ` Ryo Tsuruta
2009-09-07 11:02       ` Ryo Tsuruta
2009-09-07 13:53       ` Rik van Riel
2009-09-07 13:53         ` Rik van Riel
2009-09-08  3:01         ` Ryo Tsuruta
2009-09-08  3:01           ` Ryo Tsuruta
2009-09-08  3:22           ` Balbir Singh
2009-09-08  3:22             ` Balbir Singh
2009-09-08  5:05             ` Ryo Tsuruta
2009-09-08  5:05               ` Ryo Tsuruta
2009-09-08 13:49               ` Vivek Goyal
2009-09-08 13:49                 ` Vivek Goyal
2009-09-09  5:17                 ` Ryo Tsuruta
2009-09-09  5:17                   ` Ryo Tsuruta
2009-09-09 13:34                   ` Vivek Goyal
2009-09-09 13:34                     ` Vivek Goyal
2009-09-08 13:42           ` Vivek Goyal
2009-09-08 13:42             ` Vivek Goyal
2009-09-08 16:30             ` Nauman Rafique
2009-09-08 16:30               ` Nauman Rafique
2009-09-08 16:47               ` Rik van Riel
2009-09-08 16:47                 ` Rik van Riel
2009-09-08 17:54                 ` Vivek Goyal
2009-09-08 17:54                   ` Vivek Goyal
2009-09-15 23:37                   ` ioband: Writer starves reader even without competitors (Re: Regarding dm-ioband tests) Vivek Goyal
2009-09-15 23:37                     ` Vivek Goyal
2009-09-16 12:08                     ` ioband: Writer starves reader even without competitors Ryo Tsuruta
2009-09-08 17:06             ` Regarding dm-ioband tests Dhaval Giani
2009-09-09  6:05               ` Ryo Tsuruta
2009-09-09  6:05                 ` Ryo Tsuruta
2009-09-09 10:51                 ` Dhaval Giani
2009-09-10  7:58                   ` Ryo Tsuruta
2009-09-10  7:58                     ` Ryo Tsuruta
2009-09-11  9:53                     ` Dhaval Giani
2009-09-15 15:12                       ` Ryo Tsuruta
2009-09-15 15:12                         ` Ryo Tsuruta
2009-09-15 15:19                         ` Balbir Singh
2009-09-15 15:19                           ` Balbir Singh
2009-09-15 15:58                           ` Rik van Riel
2009-09-15 15:58                             ` Rik van Riel
2009-09-15 16:21                           ` Ryo Tsuruta
2009-09-15 16:21                             ` Ryo Tsuruta
2009-09-09 13:57                 ` Vivek Goyal
2009-09-09 13:57                   ` Vivek Goyal
2009-09-10  3:06                   ` Ryo Tsuruta
2009-09-09 10:01             ` Ryo Tsuruta
2009-09-09 14:31               ` Vivek Goyal
2009-09-09 14:31                 ` Vivek Goyal
2009-09-10  3:45                 ` Ryo Tsuruta
2009-09-10 13:25                   ` Vivek Goyal
2009-09-10 13:25                     ` Vivek Goyal
2009-09-08 19:24           ` Rik van Riel
2009-09-08 19:24             ` Rik van Riel
2009-09-09  0:09             ` Fabio Checconi
2009-09-09  2:06               ` Vivek Goyal
2009-09-09  2:06                 ` Vivek Goyal
2009-09-09 15:41                 ` Fabio Checconi
2009-09-09 17:30                   ` Vivek Goyal [this message]
2009-09-09 17:30                     ` Vivek Goyal
2009-09-09 19:01                     ` Fabio Checconi
2009-09-09  9:24               ` Ryo Tsuruta
2009-09-09  9:24                 ` Ryo Tsuruta
2009-09-16  4:45       ` ioband: Limited fairness and weak isolation between groups (Was: Re: Regarding dm-ioband tests) Vivek Goyal
2009-09-16  4:45         ` Vivek Goyal
2009-09-18  7:33         ` ioband: Limited fairness and weak isolation between groups Ryo Tsuruta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090909173003.GE8256@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=agk@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=dm-devel@redhat.com \
    --cc=fchecconi@gmail.com \
    --cc=guijianfeng@cn.fujitsu.com \
    --cc=jens.axboe@oracle.com \
    --cc=jmoyer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nauman@google.com \
    --cc=riel@redhat.com \
    --cc=ryov@valinux.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.