Public bug reported:

There seems to be an issue in Ubuntu 26.04 (kernel 7.0) in regard to
kernel process scheduler that wasn't there in 25.10 (6.17).
Specifically, there seems to be a significant lag. This has been tested
on 26.04 with both kernels, so everything is the same except for the
kernel used. Issue is 100% repeatable and reproducible by simply booting
the system with one kernel or the other. 7.0 is the standard on 26.04
and 6.17 was taken from 25.10.

It should be pointed out that this issue is not present using kernel
version 6.17 - both on 25.10 as well as 26.04, with or without CPU load.
I can't test 7.0 on 25.10 because the system has been upgraded, however
the issue was completely absent on 25.10 and other prior versions.

That being said, the issue is manifest most prominently with a high
(100%) CPU load using SCHED_IDLE class, but is also visible on a
completely idle system (except for a music player), though to a lesser
extent due to the fact that the machine is idle hence not much for the
scheduler to do. It can be observed in gaming (unusable in 26.04 under
load) as well as just by playing audio (in pw-top).

How to observe. There are a few ways.

A) Using an otherwise idle system:
1. start pw-top
2. start some music playback (via ie. Audacious)
3. observe output in column "WAIT" in pw-top.

B) Using a high CPU load (SCHED_IDLE class)
1. start a high-CPU-load process (ie. xmrig etc) and put it in SCHED_IDLE class 
with a low priority, ie:
   schedtool -D -n20 -e program
2. repeat steps outlined under A

C) Using a high CPU load and a resource-intensive application (such as a video 
game)
1. repeat steps outlined under B (and A, obviously)
2. start a video game
3. observe loading times and gaming performance

The expected result is that (given a sufficiently powerful CPU; using
AMD 5950x here and 32 threads for high-CPU-load processes) the high CPU
load from B is not even noticed. By "not even noticed" I mean exactly
that - user can't tell whether there's any load on the CPU except by
listening to CPU fans and/or by looking at ie. top. This is the result
of SCHED_IDLE, which only schedules a process/thread to run if there's
nothing else in the queue. The high-CPU-load process does have some
invariable secondary effects on the system regardless of SCHED_IDLE
(cache thrashing, memory bandwidth etc), however for normal desktop use
this is literally not visible. By "normal desktop use" I mean browsing
(dozens of tabs in multiple browsers), watching videos (online,
offline), recording videos, gaming, virtual machines etc.

The actual result is that:
- using kernel 6.17 the actual result is as the expected result
- using kernel 7.0, gaming (scenario C above) is unusable (sound thrashing, 
severe input lag, video skipping etc. even initial game loading time is 
severely affected); looking at pw-top, "WAIT" goes from 10s and 100s of usec to 
1-2ms, which is an order of magnitude difference (lag in pw-top is actually 
lower under load (B) in 6.17 than on an idle system in 7.0); various other apps 
(ie. Virtualbox UI) have significant lag.

This is all 100% repeatable and reproducible by simply rebooting with
one kernel or the other, ceteris paribus.

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2156415

Title:
  scheduler issues

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2156415/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to