The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* EEVDF regression still exists
@ 2025-04-29 21:38 Cristian Prundeanu
  2025-04-29 21:56 ` Peter Zijlstra
  2025-04-30 10:02 ` Peter Zijlstra
  0 siblings, 2 replies; 18+ messages in thread
From: Cristian Prundeanu @ 2025-04-29 21:38 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Cristian Prundeanu, K Prateek Nayak, Hazem Mohamed Abuelfotoh,
	Ali Saidi, Benjamin Herrenschmidt, Geoff Blake, Csaba Csoma,
	Bjoern Doebel, Gautham Shenoy, Swapnil Sapkal, Joseph Salisbury,
	Dietmar Eggemann, Ingo Molnar, Linus Torvalds, Borislav Petkov,
	linux-arm-kernel, linux-kernel, linux-tip-commits, x86

Peter,

Here are the latest results for the EEVDF impact on database workloads. 
The regression introduced in kernel 6.6 still persists and doesn't look 
like it is improving.

This time I've compared apples to apples - default 6.5 vs default 6.12+ 
and SCHED_BATCH on 6.5 vs SCHED_BATCH on 6.12+. The results are below.

Kernel   | Runtime     | Throughput | P50 latency
aarm64   | parameters  | (NOPM)     | (larger is worse)
---------+-------------+------------+------------------
6.5.13   | default     |  baseline  |  baseline
---------+-------------+------------+------------------
6.12.25  | default     |  -5.1%     |  +7.8%
---------+-------------+------------+------------------
6.14.4   | default     |  -7.4%     |  +9.6%
---------+-------------+------------+------------------
6.15-rc4 | default     |  -7.4%     |  +10.2%
======================================================
6.5.13   | SCHED_BATCH |  baseline  |  baseline
---------+-------------+------------+------------------
6.12.25  | SCHED_BATCH |  -8.1%     |  +8.7%
---------+-------------+------------+------------------
6.14.4   | SCHED_BATCH |  -7.9%     |  +8.3%
---------+-------------+------------+------------------
6.15-rc4 | SCHED_BATCH |  -10.6%    |  +11.8%
---------+-------------+------------+------------------

The tests were run with the mysql reproducer published before (link and 
instructions below), using two networked machines running hammerdb and 
mysql respectively. The full test details and reports from "perf sched 
stats" are also posted [1], not included here for brevity.

[1] https://github.com/aws/repro-collection/blob/main/repros/repro-mysql-EEVDF-regression/results/20250428/README.md


At this time, we have accumulated numerous data points and many hours of 
testing exhibiting this regression. The only counter arguments I've seen 
are relying on either synthetic test cases or unrealistic simplified tests 
(e.g. SUT and loadgen on the same machine, or severely limited thread 
count). It's becoming painfully obvious that EEVDF replaced CFS before it 
was ready to be released; yet most of what we've been debating is whether 
SCHED_BATCH is a good enough workaround.

Please let's take a fresh approach at what's happening, and find out why 
the scheduler is underperforming. I'm happy to provide additional data if 
it helps debug this. I've backported and forward ported Swapnil's "perf 
sched stats" command [2] so it is ready to run on any kernel from 6.5 up 
to 6.15, and the reproducer already runs it automatically for convenience.

[2] https://lore.kernel.org/lkml/20250311120230.61774-1-swapnil.sapkal@amd.com/


Instructions for reproducing the above tests (same as before):

1. Code: The reproducer scenario and framework can be found here: 
https://github.com/aws/repro-collection

2. Setup: I used a 16 vCPU / 32G RAM / 1TB RAID0 SSD instance as SUT, 
running Ubuntu 22.04 with the latest updates. All kernels were compiled 
from source, preserving the same config across versions (as much as 
possible) to minimize noise - in particular, CONFIG_HZ=250 was used 
everywhere.

3. Running: To run the repro, set up a SUT machine and a LDG (loadgen) 
machine on the same network, clone the git repo on both, and run:

(on the SUT) ./repro.sh repro-mysql-EEVDF-regression SUT --ldg=<loadgen_IP> 

(on the LDG) ./repro.sh repro-mysql-EEVDF-regression LDG --sut=<SUT_IP>

The repro will build and test multiple combinations of kernel versions and 
scheduler settings, and will prompt you when to reboot the SUT and rerun 
the same above command to continue the process.

More instructions can be found both in the repo's README and by running 
'repro.sh --help'.

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: EEVDF regression still exists
@ 2025-05-20 18:14 Cristian Prundeanu
  0 siblings, 0 replies; 18+ messages in thread
From: Cristian Prundeanu @ 2025-05-20 18:14 UTC (permalink / raw)
  To: K Prateek Nayak
  Cc: Cristian Prundeanu, Hazem Mohamed Abuelfotoh, Ali Saidi,
	Benjamin Herrenschmidt, Geoff Blake, Borislav Petkov, Csaba Csoma,
	Dietmar Eggemann, Bjoern Doebel, Gautham Shenoy, Joseph Salisbury,
	Chris Redpath, linux-arm-kernel, linux-kernel, linux-tip-commits,
	x86, Ingo Molnar, Peter Zijlstra, Swapnil Sapkal, Linus Torvalds

>> The only _scheduler_ change that looks relevant is commit bbce3de72be5
>> ("sched/eevdf: Fix se->slice being set to U64_MAX and resulting
>> crash"). Which does affect the slice calculation, although supposedly
>> only under special circumstances.> 
>> Of course, it could be something else.
>
> Since it is the only !SCHED_EXT change in kernel/sched, Cristian can
> perhaps try reverting it on top of v6.15-rc4 and checking if the
> benchmark results jump back to v6.15-rc3 level to rule that single
> change out. Very likely it could be something else.

I have tested reverting this commit, and the performance indeed jumped back
to rc3 levels.

> The VU count should really be based on the SUT core count, and be at least
> 8 * SUT vCPUs to ensure a full load. 

I've modified the reproducer to more accurately configure the VU count
based on the SUT's vCPU count, and use the above multiplier going forward.

Retesting the entire kernel range with the resulting 128 VUs shows a
slightly higher performance everywhere compared to the previous 256 VUs.
The regression is even more visible now, with a few notable points:
- There is a performance inversion from before (6.15-rc3 now underperforms
  6.15-rc4). This may be useful data for characterizing the regression.
- Kernel 6.14.7 is about the same as 6.14.6 in default mode, but slower in
  SCHED_BATCH mode (-7.1% vs -6.4%).
- Kernel 6.15-rc5 is faster than all other 6.15-rcX builds, especially in
  default mode.
- Kernel 6.15-rc7 is worse than 6.15-rc6 everywhere except for the default
  mode throughput.
- With either VU value, disabling PLACE_LAG and RUN_TO_PARITY no longer
  improves performance significantly on up to date kernels 6.12 and above.

Summary below, full details in the reproducer repo [1].


* All without SCHED_BATCH:

Kernel   | Throughput | P50 latency       | NOPL+NORTP
aarm64   | (NOPM)     | (larger is worse) | (NOPM)
=========+============+===================+============
6.5.13   |  baseline  |  baseline         | N/A
---------+------------+-------------------+------------
6.6.91   |  -5.7%     |  +9.9%            | -2.6%
---------+------------+-------------------+------------
6.8.12   |  -6.0%     |  +10.7%           | -3.4%
---------+------------+-------------------+------------
6.12.29  |  -6.8%     |  +9.5%            | -8.0%
---------+------------+-------------------+------------
6.13.12  |  -7.6%     |  +10.5%           | -8.5%
---------+------------+-------------------+------------
6.14.7   |  -7.0%     |  +9.8%            | -9.8%
---------+------------+-------------------+------------
6.15-rc3 |  -8.5%     |  +11.7%           |
---------+------------+-------------------+------------
6.15-rc4 |  -7.5%     |  +10.2%           |
---------+------------+-------------------+------------
6.15-rc5 |  -6.4%     |  +8.6 %           |
---------+------------+-------------------+------------
6.15-rc6 |  -7.5%     |  +10.4%           | -9.0%
---------+------------+-------------------+------------
6.15-rc7 |  -7.8%     |  +11.1%           | -8.5%
=========+============+===================+============


* All with SCHED_BATCH:

Kernel   | Throughput | P50 latency
aarm64   | (NOPM)     | (larger is worse)
=========+============+==================
6.5.13   |  baseline  |  baseline
---------+------------+------------------
6.6.91   |  -5.1%     |  +7.4%
---------+------------+------------------
6.8.12   |  -6.0%     |  +8.6%
---------+------------+------------------
6.12.29  |  -6.6%     |  +8.4%
---------+------------+------------------
6.13.12  |  -6.9%     |  +8.9%
---------+------------+------------------
6.14.7   |  -7.1%     |  +8.7%
---------+------------+------------------
6.15-rc3 |  -9.6%     |  +11.8%
---------+------------+------------------
6.15-rc4 |  -7.0%     |  +8.6%
---------+------------+------------------
6.15-rc5 |  -6.6%     |  +7.9%
---------+------------+------------------
6.15-rc6 |  -6.6%     |  +8.4%
---------+------------+------------------
6.15-rc7 |  -7.7%     |  +9.7%
=========+============+==================

[1] https://github.com/aws/repro-collection/blob/main/repros/repro-mysql-EEVDF-regression/results/20250519/README.md

-Cristian

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-05-21 13:31 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-29 21:38 EEVDF regression still exists Cristian Prundeanu
2025-04-29 21:56 ` Peter Zijlstra
2025-04-29 22:06   ` Prundeanu, Cristian
2025-04-30  3:33     ` K Prateek Nayak
2025-05-01 16:16       ` Prundeanu, Cristian
2025-05-02  5:56         ` K Prateek Nayak
2025-05-02  6:33           ` K Prateek Nayak
2025-05-02 18:06             ` Prundeanu, Cristian
2025-05-02  8:48         ` Peter Zijlstra
2025-05-02 16:52           ` Prundeanu, Cristian
2025-05-14 21:26             ` Dietmar Eggemann
2025-04-30 10:02 ` Peter Zijlstra
2025-05-02  7:08   ` Sapkal, Swapnil
2025-05-02 17:25   ` Prundeanu, Cristian
2025-05-02 17:52     ` Linus Torvalds
2025-05-03  3:34       ` K Prateek Nayak
2025-05-21 13:30         ` Cristian Prundeanu
  -- strict thread matches above, loose matches on Subject: below --
2025-05-20 18:14 Cristian Prundeanu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox