qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Shivam Kumar <shivam.kumar1@nutanix.com>
To: Hyman Huang <huangy81@chinatelecom.cn>, Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, pbonzini@redhat.com, david@redhat.com,
	quintela@redhat.com, dgilbert@redhat.com, kvm@vger.kernel.org
Subject: Re: [RFC PATCH 0/1] QEMU: Dirty quota-based throttling of vcpus
Date: Mon, 19 Dec 2022 00:42:27 +0530	[thread overview]
Message-ID: <53735f4b-a2fb-8fd3-3103-e96350867e40@nutanix.com> (raw)
In-Reply-To: <8d245f68-e830-2566-2a33-b99f206c6773@chinatelecom.cn>



On 06/12/22 10:59 pm, Hyman Huang wrote:
> 
> 
> 在 2022/12/7 0:00, Peter Xu 写道:
>> Hi, Shivam,
>>
>> On Tue, Dec 06, 2022 at 11:18:52AM +0530, Shivam Kumar wrote:
>>
>> [...]
>>
>>>> Note
>>>> ----------
>>>> ----------
>>>>
>>>> We understand that there is a good scope of improvement in the current
>>>> implementation. Here is a list of things we are working on:
>>>> 1) Adding dirty quota as a migration capability so that it can be 
>>>> toggled
>>>> through QMP command.
>>>> 2) Adding support for throttling guest DMAs.
>>>> 3) Not enabling dirty quota for the first migration iteration.
>>
>> Agreed.
>>
>>>> 4) Falling back to current auto-converge based throttling in cases 
>>>> where dirty
>>>> quota throttling can overthrottle.
>>
>> If overthrottle happens, would auto-converge always be better?
>>
>>>>
>>>> Please stay tuned for the next patchset.
>>>>
>>>> Shivam Kumar (1):
>>>>     Dirty quota-based throttling of vcpus
>>>>
>>>>    accel/kvm/kvm-all.c       | 91 
>>>> +++++++++++++++++++++++++++++++++++++++
>>>>    include/exec/memory.h     |  3 ++
>>>>    include/hw/core/cpu.h     |  5 +++
>>>>    include/sysemu/kvm_int.h  |  1 +
>>>>    linux-headers/linux/kvm.h |  9 ++++
>>>>    migration/migration.c     | 22 ++++++++++
>>>>    migration/migration.h     | 31 +++++++++++++
>>>>    softmmu/memory.c          | 64 +++++++++++++++++++++++++++
>>>>    8 files changed, 226 insertions(+)
>>>>
>>>
>>> It'd be great if I could get some more feedback before I send v2. 
>>> Thanks.
>>
>> Sorry to respond late.
>>
>> What's the status of the kernel patchset?
>>
>>  From high level the approach looks good at least to me.  It's just 
>> that (as
>> I used to mention) we have two similar approaches now on throttling the
>> guest for precopy.  I'm not sure what's the best way to move forward if
>> without doing a comparison of the two.
>>
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_all_cover.1669047366.git.huangy81-40chinatelecom.cn_&d=DwIDaQ&c=s883GpUCOChKOHiocYtGcg&r=4hVFP4-J13xyn-OcN0apTCh8iKZRosf5OJTQePXBMB8&m=CuJmsk4azThm0mAIiykxHz3F9q4xRCxjXeS5Q00YL6-FSnPF_BKSyW1y8LIiXqRA&s=QjAcViWNO5THFQvljhrWbDX30yTipTb7KEKWKkc2kDU&e=
>> Sorry to say so, and no intention to create a contention, but merging the
>> two without any thought will definitely confuse everybody.  We need to
>> figure out a way.
>>
>>  From what I can tell..
>>
>> One way is we choose one of them which will be superior to the other and
>> all of us stick with it (for either higher possibility of migrate, less
>> interference to the workloads, and so on).
>>
>> The other way is we take both, when each of them may be suitable for
>> different scenarios.  However in this latter case, we'd better at 
>> least be
>> aware of the differences (which suites what), then that'll be part of
>> documentation we need for each of the features when the user wants to use
>> them.
>>
>> Add Yong into the loop.
>>
>> Any thoughts?
>>
> This is quite different from "dirtylimit capability of migration". IMHO, 
> quota-based implementation seems a little complicated, because it 
> depends on correctness of dirty quota and the measured data, which 
> involves the patchset both in qemu and kernel. It seems that dirtylimit 
> and quota-based are not mutually exclusive, at least we can figure out
> which suites what firstly depending on the test results as Peter said.
> 
Thank you for sharing the link to this alternate approach towards 
throttling - "dirtylimit capability of migration". I am sharing key 
points from my understanding and some questions below:

1) The alternate approach is exclusively for the dirty ring interface. 
The dirty quota approach is orthogonal to the dirty logging interface. 
It works both with the dirty ring and the dirty bitmap interface.

2) Can we achieve micro-stunning with the alternate approach? Can we say 
with good confidence that for most of the time, we stun the vcpu only 
when it is dirtying the memory? Last time when I checked, dirty ring 
size could be a multiple of 512 which makes it difficult to stun the 
vcpu in microscopic intervals.

3) Also, are we relying on the system administrator to select a limit on 
the dirty rate for "dirtylimit capability of migration"?

4) Also, does "dirtylimit capability of migration" play with the dirty 
ring size in a way that it uses a larger ring size for higher dirty rate 
limits and smaller ring size for smaller dirty rate limits? I think the 
dirty rate limit is good information to choose a good-enough dirty ring 
size.


Thanks,
Shivam


  reply	other threads:[~2022-12-18 19:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-20 22:54 [RFC PATCH 0/1] QEMU: Dirty quota-based throttling of vcpus Shivam Kumar
2022-11-20 22:54 ` [RFC PATCH 1/1] " Shivam Kumar
2022-11-21 11:35   ` Philippe Mathieu-Daudé
2022-11-22  4:00     ` Shivam Kumar
2023-02-13  9:17       ` Shivam Kumar
2022-12-06  5:48 ` [RFC PATCH 0/1] QEMU: " Shivam Kumar
2022-12-06 16:00   ` Peter Xu
2022-12-06 17:29     ` Hyman Huang
2022-12-18 19:12       ` Shivam Kumar [this message]
2022-12-19 14:19         ` Hyman Huang

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=53735f4b-a2fb-8fd3-3103-e96350867e40@nutanix.com \
    --to=shivam.kumar1@nutanix.com \
    --cc=david@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=huangy81@chinatelecom.cn \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).