this post was submitted on 05 Aug 2023
1 points (100.0% liked)

Linux

48181 readers
1084 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

tl;dr question: How do I get the Handbrake Flatpak to operate at a high niceless level in its own cgroup by default? I'm using Fedora Linux.


So if I understand things correctly, niceness in Linux affects how willing the process scheduler is to preempt a process. However, with cgroups, niceness only affects this scheduling relative to other processes within a cgroup. This means a process running with a high niceness in its own cgroup has the same priority as other processes in equivalent cgroups, and it will not in fact be preempted in a way one would expect.

So why does this matter to me at all? I have a copy of Handbrake installed from Flatpak. And sometimes I want to encode a video in the background while still having a decently responsive desktop experience so I can do other things, and basically let Handbrake occupy the cpu cycles I'm not using. Handbrake and the video encoding process should be at the bottom priority of everything to the maximum extent possible.

But it does not appear to be enough to just go into htop and set the handbrake process's niceness level to 19 and then start an encode, because of the cgroup business I mentioned above.

Furthermore, in my opinion Handbrake should always be the lowest priority process without my having to intervene. I would like to be able to launch it without having to set its niceness. Does anybody have suggestions on this? Is my understanding of the overall picture even correct?

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here