I was wondering if I it is possible to limit the CPU utilisation of a flatpak application, or restrict it to fewer number of CPU cores? I keep getting these random periods of high CPU utilisation for no reason for some applications like MS Teams, and Zoom. If I could limit them to a core (I am on a quad-core Ryzen), maybe then my desktop wouldn’t freeze due to these buggy applications.
I haven’t used it, but it sounds like it is what you are looking for. You could probably add it to the Exec line of your launchers. So, for the example programs you mention, something like the following might work (untested):
Interesting, since I use both Teams and Zoom as flatpak, I can’t really change the Exec command. But I think I can write a small script to “limit by PID” when the resource utilisation starts spiking. Something like: