High idle cpu usage amd context switching

Hello all!

So i just upgraded to and it fixed a lot of things for me, except for the issue i had after upgrading to 24.04 then back to 23.x.x, the problems mentioned in the title:

The system that TN Scale runs on:
Mobo: MS-7A33 (x370)
CPU: 5950X
RAM: 64 GB
Disk used as OS drive: Sandisk Corp IX SN530 NVMe SSD
HBA: Broadcom / LSI SAS2308 PCI-Express Fusion-MPT SAS-2 (rev 05)

Dont really know what could be causing it…

Out of curiosity, where is your dataset located? It’s a crazy thing but for some reason, in the back of my mind someone recently had a similar issue and I thought they solved the problem by moving the system dataset. I very well could be remembering something completely different. I have not found it with my searches. I’m old and my mind is giving way to time.

Also, have you disabled all your applications and services to see which might be causing it, or which have no impact?

Its on a smaller ssd pool (4x500GB raidz1).

I dont think its application/vm related. If i revert to 23.10.2 (without changing anything else) context switches go down significantly and average usage falls bellow 1(or its sitting near it sometimes) at idle.
From what i can see in htop the 2 main culprits in terms of context switches are the dbus-daemon and middlewared.
In terms of CPU usage from what i see the k3s server spikes to 30-40% periodically (few seconds apart usually).