Linux and Process Scheduler Autogroups

Moderators: Site Moderators, PandeGroup

Linux and Process Scheduler Autogroups

Postby nburgin » Thu Sep 26, 2019 4:55 pm

Right now the Linux client attempts to de-prioritize itself by setting its nice level to 19.

However, this does not work if scheduler autogroups are enabled. What's more, I've asked around and it seems like at least 3 of the supported distributions (Ubuntu, Mint, and Fedora) enable this feature by default.

As described in the scheduler manual page, when it's turned on the standard nice levels are only effective relative to other processes in the group, not system-wide. When the client is run as a background service, it receives its own group, so setting everything to nice level 19 actually doesn't do anything.

While a CPU hungry background task that hasn't raised its nice level will have significantly less impact on foreground processes if autogroups are enabled (only being noticeable under very heavy foreground workloads), this is still more impact than a nice 19 process would normally have without autogroups, and increasing the nice level no longer has any effect. You can demonstrate the lack of efficacy of the nice level by renice'ing F@H to -20 (very high priority) on an affected system, and noting that the level of impact on foreground processes/overall responsiveness has not actually increased.

As described in the manual page, there is a workaround that can be achieved by setting the autogroup's own nice level, which apparently is not available through standard system calls but only through a virtual file located at /proc/self/autogroup or /proc/<PID-goes-here>/autogroup.

While I currently have a workaround in place on my own system, It would be nice if future releases of the client could be autogroup-aware when setting its priority, since the enabling of autogroups is default setting on at least 3 of the supported distributions.

If autogroup-aware priority setting won't be directly supported, then it would at least be nice to add some documentation to make sure Ubuntu, Mint and Fedora users are aware of the issue so they can take steps to resolve it themselves if it's affecting their foreground tasks.

This reddit thread may be relevant.

EDIT: Added the links I meant to earlier, now that I'm no longer a new user under heavy suspicion from the spam filter.
nburgin
 
Posts: 1
Joined: Sun Sep 22, 2019 10:54 pm

Return to V7.5.1 Public Release Windows/Linux/MacOS X

Who is online

Users browsing this forum: No registered users and 1 guest

cron