linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Segall <bsegall@google.com>
To: shrikanth hegde <sshegde@linux.vnet.ibm.com>
Cc: mingo@redhat.com, peterz@infradead.org,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	tglx@linutronix.de, srikar@linux.vnet.ibm.com,
	arjan@linux.intel.com, svaidy@linux.ibm.com,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] sched/fair: Interleave cfs bandwidth timers for improved single thread performance at low utilization
Date: Wed, 15 Feb 2023 13:32:12 -0800	[thread overview]
Message-ID: <xm26bklu4ntv.fsf@google.com> (raw)
In-Reply-To: <cd37483e-bf11-ec74-c240-74935bb44809@linux.vnet.ibm.com> (shrikanth hegde's message of "Wed, 15 Feb 2023 16:31:29 +0530")

shrikanth hegde <sshegde@linux.vnet.ibm.com> writes:

>>>
>>>              6.2.rc5                           with patch
>>>         1CG    power   2CG    power   | 1CG  power     2CG        power
>>> 1Core   218     44     315      46    | 219    45    277(+12%)    47(-2%)
>>>         219     43     315      45    | 219    44    244(+22%)    48(-6%)
>>> 	                              |
>>> 2Core   108     48     158      52    | 109    50    114(+26%)    59(-13%)
>>>         109     49     157      52    | 109    49    136(+13%)    56(-7%)
>>>                                       |
>>> 4Core    60     59      89      65    |  62    58     72(+19%)    68(-5%)
>>>          61     61      90      65    |  62    60     68(+24%)    73(-12%)
>>>                                       |
>>> 8Core    33     77      48      83    |  33    77     37(+23%)    91(-10%)
>>>          33     77      48      84    |  33    77     38(+21%)    90(-7%)
>>>
>>> There is no benefit at higher utilization of 50% or more. There is no
>>> degradation also.
>>>
>>> This is RFC PATCH V2, where the code has been shifted from hrtimer to
>>> sched. This patch sets an initial value as multiple of period/10.
>>> Here timers can still align if the time started the cgroup is within the
>>> period/10 interval. On a real life workload, time gives sufficient
>>> randomness. There can be a better interleaving by being more
>>> deterministic. For example, when there are 2 cgroups, they should
>>> have initial value of 0/50ms or 10/60ms so on. When there are 3 cgroups,
>>> 0/3/6ms or 1/4/7ms etc. That is more complicated as it has to account
>>> for cgroup addition/deletion and accuracy w.r.t to period/quota.
>>> If that approach is better here, then will come up with that patch.
>> 
>> This does seem vaguely reasonable, though the power argument of
>> consolidating wakeups and such is something that we intentionally do in
>> other situations.
>> 
> Thank you Benjamin for taking a look and spending time in reviewing this.
>> How reasonable do you think it is to just say (and what do the
>> equivalent numbers look like on your particular benchmark) "put some
>> variance on your period config if you want variance"?
>>Run to run variance is expected with this patch as the patch depends
> on time upto last period/10 as the basis for interleaving. 
> What i could infer from this comment about variance. Please correct if not.

My question is what the numbers look like if you instead prepare the
cgroups with periods that are something like 97 ms and 103ms instead of
both 100ms (keeping the quota as the same proportion as the original).

  reply	other threads:[~2023-02-15 21:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230214120502.934324-1-sshegde@linux.vnet.ibm.com>
2023-02-14 21:37 ` [RFC PATCH] sched/fair: Interleave cfs bandwidth timers for improved single thread performance at low utilization Benjamin Segall
2023-02-15 11:01   ` shrikanth hegde
2023-02-15 21:32     ` Benjamin Segall [this message]
2023-02-16 19:57       ` shrikanth hegde
2023-02-14 15:24 shrikanth hegde
2023-02-20 17:38 ` Peter Zijlstra
2023-02-21 18:53   ` shrikanth hegde
2023-02-21 21:43     ` Benjamin Segall
2023-02-22  9:36       ` Peter Zijlstra

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=xm26bklu4ntv.fsf@google.com \
    --to=bsegall@google.com \
    --cc=arjan@linux.intel.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=srikar@linux.vnet.ibm.com \
    --cc=sshegde@linux.vnet.ibm.com \
    --cc=svaidy@linux.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=vincent.guittot@linaro.org \
    /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).