I’ve experienced stuttering issues with my desktop environment, specificly when running Docker containers or performing Maven builds (that use Docker test-containers in tests), on three different UBlue-based operating systems (Aurora, Bluefin-DX, and a custom Sway image) on two separate machines.
Background Information:
I had been using Fedora i3-spin for a year on my workstation without any issues when running similar workloads (many Docker containers or Maven builds).
Initially installed Aurora in late March and encountered the stuttering issue.
After switching back to a previous Fedora i3-spin installation, the problem resolved itself.
In June, I created a Sway image with BlueBuild on top of UBlue OS’s Sway Atomic Image on my workstation, and the same stuttering issue recurred.
Created a test custom Docker Compose file that produced stuttering issues on both my workstation and laptop. I shared it in the BlueBuild channel, and another user reported not experiencing the issue on their system (custom Bazzite).
As a test, I wiped my laptop and installed Bluefin-DX. Running the same Docker Compose file resulted in no stuttering issues.
Installed Bluefin-DX on my workstation but still experienced stuttering issues when running my real workload.
Adding more load (e.g., browser, IntelliJ) and containers triggered the issue again on my laptop.
On my laptop (Intel 6-core, 10th gen), it was harder to reproduce the issue consistently.
You can see the stutter also clearly in pw-top, where busy and wait go to milliseconds or xxx instead of microseconds
Key Finding:
During further investigation, I discovered that systemd-udevd service was consuming a significant amount of CPU when starting Docker containers. This can be seen with systemd-cgtop. Disabling the service (sudo systemctl stop systemd-udevd systemd-udevd-kernel.socket systemd-udevd-control.socket) resolved the stuttering issues completely and significantly improved container startup time on my laptop (up to 3 times faster consistently)!
Why does it appear that the more cores you have the heavier the stutter is?
When dynamic hardware detection is needed, this udevd service should be left on. So I would prefer to leave it on.
Can anyone else reproduce this issue on their systems? Is it a UBlue OS or even Fedora Atomic issue?
I don’t have direct advice for this without digging into the compose and I don’t have time to do that unfortunately. But the latest tag is using kernel-fsync, which uses a different linux scheduler (BORE), might be worth checking out to see if it runs better:
Not sure if this will help though, but it would be interesting!
It is not really about compose it self , it is about docker, run, build, … as long as it is heavy. I just use docker compose to be able to easier reproduce it.
To try to reproduce on your or any system should not take a lot of time.
download the docker-compose.yml
play some music(youtube,spotify,…)
go to the dir where the docker-compose.yml is located, and execute the docker-compose up -d command.
You should have some stutters…
In the mean time I will try to switch to latest with the different kernel. I post back with results
The Stutter remains with a rebase to latest (and thus the other kernel)
Again I want emphasize I did no have this on the same machine with fedora 40 i3 spin. which is also using the normal kernel I suppose.
It would be good that some could confirm they have it as well, and it is not me
I haven’t done as much troubleshooting as you did, but I was seeing some stutter when starting multiple docker containers at the same time.
It’s not something I would usually do so I wasn’t overly concerned.
However, at the moment this seems to be gone, or at least I cannot notice any mouse stutter anymore.
I did rebase to aurora-dx-stable, not sure if that had an impact.
Nullunit user in discord #aurora might have a found a culprit based on similar or same issues he had when running docker.
Could /lib/udev/rules.d/30-linksys-ae1200.rules be the culprit.
and could it be solved by simply doing sudo touch /etc/udev/rules.d/30-linksys-ae1200.rules
I will investigate in coming days
My issue seem to have been solved by adding the /etc/udev/rules.d/30-linksys-ae1200.rules empty file.
There another user daycompacted on discord who had the same issue, I pointed him/her also to her. @j0rge is this something that can be fixed in the image itself. Can the linksys file be removed or fixed? For what is it needed? Seems rules for a router. this will never be installed on a router, or am I missing something?
I have actually done some further testing and I am still seeing the stutter when starting the multiple docker containers, so this wasn’t fixed as I thought.
Will give your fix a try and report back.
Edit:
Yeah I don’t understand why or how this works, but a docker compose that previously pushed my CPU to 98% when bringing up now only went as high as 54%, and therefore no stuttering or audio breaking.
This is with a Ryzen 7 7840HS Processor, 8 Cores/16 Threads, so not lack of CPU.