pop-os / system76-scheduler

Auto-configure CFS and process priorities for improved desktop responsiveness
Mozilla Public License 2.0
539 stars 32 forks source link

Internal restart of service with same PID resets nice value and never gets updated again #112

Open PVermeer opened 6 months ago

PVermeer commented 6 months ago

I'm testing out bazzite with System76 scheduler and sunshine game streaming. Sunshine is added to to the recording assignment that get's set with recording nice=-9 io=(best-effort)0. This works well with sunshine manual start / restart and via a systemd unit start / restart. gnome-system-monitor Reports very high.

However, sunshine has an internal restart function: https://github.com/LizardByte/Sunshine/blob/69a3edd9b01c76aa44fd5c2a29de1c3b3722cb41/src/platform/linux/misc.cpp#L233-L261

and: https://github.com/LizardByte/Sunshine/blob/69a3edd9b01c76aa44fd5c2a29de1c3b3722cb41/src/entry_handler.cpp#L148-L167

Using this restart results in a restart of sunshine with the same PID and a reset of the nice value (low normal, high when stream start). System76 scheduler never sets this back to very high as monitored in gnome-system-monitor.

Using bazzite Gnome Desktop edition.

KyleGospo commented 6 months ago

@PVermeer Unrelated to fixing this, I would instead ignore sunshine and then set the nice value in the systemd service.