All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: FelixYao <felix.yzg@gmail.com>,
	kwolf@redhat.com, yaozhenguo@jd.com, qemu-devel@nongnu.org,
	armbru@redhat.com, mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/1] util/thread-pool: add parameter to limit maximum threads in thread pool
Date: Fri, 27 Jul 2018 13:49:46 +0100	[thread overview]
Message-ID: <20180727124946.GF17836@redhat.com> (raw)
In-Reply-To: <20180727101826.GA28555@stefanha-x1.localdomain>

On Fri, Jul 27, 2018 at 11:18:26AM +0100, Stefan Hajnoczi wrote:
> On Fri, Jul 13, 2018 at 03:48:27PM +0800, FelixYao wrote:
> > Hi all:
> > 
> > Max threads in thread pool is fixed at 64 before which is not
> > propriate in some situations. For public cloud environment,
> > there are lots of VMs in one host machine. We should limit the worker thread
> > numbers for each machine alone based on its ability to prevent impacting
> > each other. Although we can use iotune to limit bandwidth or IOPS of block
> > device. That is not enough. Lots of worker threads still impact other VMs.
> > I think the ability to limit maximum threads in thread pool is necessary.
> > 
> > What's your opinion about this patch? please review it.
> 
> I haven't seen any discussion so here are some thoughts:
> 
> It sounds like you are trying to control I/O resources so that guests do
> not affect each other.  The threads are an implementation detail and not
> the root of the problem.
> 
> For example, if you use -drive aio=native then reads and writes will not
> use the thread pool and you will setting the thread pool size won't
> solve the problem.
> 
> Have you tried QEMU's I/O throttling feature?  You can set bandwidth
> (bps) and IOPS limits, including bursts if you wish to allow temporary
> spikes.  The basic parameters are -drive bps=BYTES_PER_SECOND,iops=IOPS.
> See the QEMU or libvirt documentation for details.

Correct me if I'm wrong, but would using the iothreads feature already
enable us to put a cap on the number of threads used for I/o operations,
but assigning dedicated threads to each device ?

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

  reply	other threads:[~2018-07-27 12:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-13  7:48 [Qemu-devel] [PATCH 1/1] util/thread-pool: add parameter to limit maximum threads in thread pool FelixYao
2018-07-27 10:18 ` Stefan Hajnoczi
2018-07-27 12:49   ` Daniel P. Berrangé [this message]
2018-07-30  8:25   ` felix yao

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=20180727124946.GF17836@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=felix.yzg@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=yaozhenguo@jd.com \
    /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.