pop-os / system76-scheduler Goto Github PK
View Code? Open in Web Editor NEWAuto-configure CFS and process priorities for improved desktop responsiveness
License: Mozilla Public License 2.0
Auto-configure CFS and process priorities for improved desktop responsiveness
License: Mozilla Public License 2.0
After the latest update system76-scheduler 1.1.0~1651696814~22.04~cbccc2e
my /var/log/syslog
is being flooded with ansi-escaped (!) log messages every time I switch focus to a different window:
May 5 17:43:06 amperama system76-scheduler[1415]: #033[32m INFO#033[0m #033[2msystem76_scheduler#033[0m#033[2m:#033[0m setting foreground process 15065
Is there a way to lower the log level?
Running Pop OS 22.04 LTS.
TIA
Synaptic provides a link to home page for packages. In case of packages related to system76, it ends on github.
The link for system76-scheduler is broken and give an 404 error.
It is https://github.com/pop-os/scheduler instead of https://github.com/pop-os/system76-scheduler
(Not sure it is the correct place to report it, but I've no idea of where this should be updated)
Not so long ago I started using Wayland and sway WM, anyway, while running Overwatch 2, I noticed one of my CPU cores maxing out. That's unusual. With a quick trip into gnome-system-monitor, I found that the 76 manager was using 10% of my Ryzen 5 3600. That's abnormally high, and I don't really know what's up with it. But that event made me close it out for a while, and sometimes it'll rocket itself back up to that level.
Hi,
to build and install on mey Gentoo, I did the followng;
It seem to work, but I will appeciate if you could add official install instructions.
Iade
I'm using wayland
instead of xorg
in my pop 20.04, do I need to modify my /usr/share/system76-scheduler/assignments/default.ron
like this ?
{
// High priority
-5: [
"gnome-shell",
"kwin",
"Xorg",
"Xwayland" <<<===============
],
// Absolute lowest priority
19: [
"c++",
"cargo",
"clang",
"cpp",
"g++",
"gcc",
"lld",
"make",
"rustc",
]}
Also, is there any reason Wayland
is disabled from the cog wheel from pop 20.04 (need to edit /etc/gdm3/custom.conf
file to enable), curious if it's disabled because of any regressions or conflicts with pop os.
Finally, thank you for your such great contributions to the linux community <3
For terminals in focus, all their descendants acquire the same priority values when changed, however this makes using nice
for a command completely useless.
Two commands being tested: stress -c 8
and nice stress -c 8
both end up with foreground priority/niceness -5
, while obviously the nice
d command should not be given priority.
Demo, foreground window name in top left:
Hi, I've created a minimal extension to support using system76-scheduler without pop-shell (as pop-shell is not available on extensions.gnome.org). It can be found here: https://github.com/mjakeman/s76-scheduler-plugin/
As part of the GNOME Extensions review guidelines:
Extensions MUST NOT include copyrighted or trademarked content without proof of express permission from the owner. Examples include: Brand Names and Phrases, Logos and Artwork, Audio, Video or Multimedia
Given that the project is called system76-scheduler
, I'd just like to check that it's fine to use "System76 Scheduler" in the name of my extension? I've provided a disclaimer that it is unofficial/not affiliated in the description.
sched_min_granularity_ns=sched_latency_ns/sched_nr_latency
Following #20 being merged, I've noticed that reading min_granularity_ns
and wakeup_granularity_ns
with cat
shows their values as 0.
[root@81x2 ~]# cat /proc/sys/kernel/sched_cfs_bandwidth_slice_us /sys/kernel/debug/sched/latency_ns /sys/kernel/debug/sched/min_granularity_ns /sys/kernel/debug/sched/wakeup_granularity_ns
3000
12000000
0
0
[root@81x2 ~]#
This was tested on Fedora 35 with secure boot disabled, which permits writing to the values. I do have it installed to /usr/local as opposed to /usr while also installing to sbin over bin following previous issues with a utility that set zen-kernel's CFS values, but I'm decently confident that this is not a contributing factor as the values read correctly prior to #20 with this same setup.
I'm not entirely sure something is wrong beyond those values showing as 0 as I do not seem to have had peformance regressions or otherwise.
In readme file I see
These changes result in a noticeable improvement in the experienced smoothness
and performance of applications and games.
but how big is improvement on older/newer machines? 0.05, 0.5, 5 or 50%
Adding benchmark like https://flightlessmango.com/benchmarks/rM7Rfu4swVQ would let users know what kind of increase (or decrease) in performance they can expect
In
system76-scheduler/src/main.rs
Line 178 in 4b77ff4
debug!
call using the log crate, or simply removed, as it spams the systemd journal.The version of Rust given by 'cargo' on current Ubuntu 21.10 is 1.57.0 so the compilation fails. I found that installing via the curl script on their website rust-lang.org gets the most recent version of Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
and this allowed system76-scheduler to compile.
Just wanted to make a note of this for others who come through trying to figure out why it won't compile (the errors do not make this clear). This dependency should probably be noted somewhere officially associated with the 1.0.0 release.
For the last couple of days, my laptop has seen a huge increase in temperatures, and the cause seems to be the high cpu usage of system76-scheduler, killing it immediately reduces cpu usage dramatically and lowers temperatures
system76-scheduler:
Installed: 2.0.0~1682509199~22.04~97a8617
Candidate: 2.0.0~1682509199~22.04~97a8617
Version table:
*** 2.0.0~1682509199~22.04~97a8617 1001
1001 http://apt.pop-os.org/release jammy/main amd64 Packages
100 /var/lib/dpkg/status
Basically I use linux-xanmod-edge and when I type system76-scheduler daemon
the result is Error: kernel does not support tweaking the scheduler
.
As far as I understand, so far it's useless for now with xanmod, right?
When I try to change the profile or start the daemon I get the following error:
$ system76-scheduler daemon
INFO system76_scheduler: starting daemon service
Error: kernel does not support tweaking the scheduler
I did not try to install a custom kernel or anything like that. This is a fresh install getting regular updates through apt upgrade
.
NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os
Linux version 6.2.6-76060206-generic ([email protected])
(x86_64-linux-gnu-gcc-12 (Ubuntu 12.1.0-2ubuntu1~22.04)
12.1.0, GNU ld (GNU Binutils for Ubuntu) 2.38)
#202303130630~1679424972~22.04~4a8cde1
SMP PREEMPT_DYNAMIC Tue M
I've read in #18 that I need access to /sys/kernel/debug/sched/
but I am not sure how I can enable access. I looks like the files are there and they have values in them.
total 0
-r--r--r-- 1 root root 0 Mar 26 11:09 debug
drwxr-xr-x 18 root root 0 Mar 26 11:09 domains
-rw-r--r-- 1 root root 0 Mar 26 11:09 features
-rw-r--r-- 1 root root 0 Mar 26 11:09 idle_min_granularity_ns
-rw-r--r-- 1 root root 0 Mar 26 11:09 latency_ns
-rw-r--r-- 1 root root 0 Mar 26 11:09 latency_warn_ms
-rw-r--r-- 1 root root 0 Mar 26 11:09 latency_warn_once
-rw-r--r-- 1 root root 0 Mar 26 11:09 migration_cost_ns
-rw-r--r-- 1 root root 0 Mar 26 11:09 min_granularity_ns
-rw-r--r-- 1 root root 0 Mar 26 11:09 nr_migrate
drwxr-xr-x 2 root root 0 Mar 26 11:09 numa_balancing
-rw-r--r-- 1 root root 0 Mar 26 11:09 preempt
-rw-r--r-- 1 root root 0 Mar 26 11:09 tunable_scaling
-rw-r--r-- 1 root root 0 Mar 26 11:09 verbose
-rw-r--r-- 1 root root 0 Mar 26 11:09 wakeup_granularity_ns
Setting your config.ron to have
{
background: None,
foreground: None,
}
Causes any explicit process assignments (assignments.ron
and others) to be not applied.
Seems to be a regression of #12, in which it was stated the desired behavior was to still allow per-process assignments to apply even with None
.
If only background
is None
, then per-process mappings are only applied when a process goes into the foreground.
The opposite for foreground
.
Print out a warning about Configuration issues to stderr (probably add --silent
option too for the CLI for those that don't even want that printed)
Configuration issues such as:
.ron
file that doesn't parse as a valid Rust syntax datatype (syntax errors, etc).ron
file that had unexpected types (like an assignments/foo.ron whose contents is something like ["a", "b"]
, aka an Array literal instead of a Map literalThe daemon should probably keep track of which .ron
files it has printed such a warning about in the past, and not warn about those again unless the modification time of the file has been updated since the last printed warning.
That way it doesn't repeat this warning every time system76-scheduler "runs a renice cycle".
Reproduction:
Create a file /etc/system76-scheduler/assignments/invalid.ron
And populate it with something with a blatantly invalid syntax like
{
f:
}
(no quotes around f
and no symbol f
is currently defined, no value listed)
Restart the com.system76.Scheduler.service
service.
Note how nothing shows up in journalctl
(journalctl -eu com.system76.Scheduler.service
)
Also, running RUST_LOG=system76-scheduler=warn system76-scheduler daemon
manually, no warnings print out.
Fedora is thinking about making the switch to full
by default to get lower latency scheduling on desktops and workstations. This might be worth adding to the responsive profile.
echo full | sudo tee /sys/kernel/debug/sched/preempt
Why is /usr/bin/system76-scheduler
installed as a setuid binary (chmod 04755)? It runs as a system service under root, doesn’t it?
Is it possible to run it as a non-privileged user (without setuid ofc)? Also, what linux capabilities does it actually need?
Noticed that a few things (mostly games) were running slightly poorer than they used to, like minor stutters or vastly higher minimum/99% frame times. Tried to apply gamemoderun
but quickly found that their priority was getting lowered after the fact.
Gamemode keeps track of every process it's active for, and it can be asked over DBUS about which processes it has registered, e.g.
# dbus-send --session --print-reply --dest=com.feralinteractive.GameMode --type=method_call /com/feralinteractive/GameMode com.feralinteractive.GameMode.QueryStatusByPID int32:$PPID int32:1155695
method return time=1654503762.757012 sender=:1.393 -> destination=:1.12203 serial=11575 reply_serial=2
int32 2
(send own PID, pid of process to check if gamemode is active for, returns 1
when gamemode is active, but not for that PID, 2
when that proc is registered under gamemode, and -1
if not active)
I think S76-scheduler should avoid setting priorities on processes already managed by gamemode.
I am not sure why, but even while an application/game is in focus, S76-scheduler assigns it a background nice 5
even though it's the foreground application. This is 100% reproducible using a steam game with Proton configured to use gamemode. In this sense, I would consider having the foreground application/game's priority lowered a bug.
A potentially easier workaround would be to just disable the S76-scheduler while gamemode is active, but that seems like a somewhat poorer solution if DBUS communication is possible. (Though it's what I will recommend to fellow gamers until a better option is available)
I would rather install it on my regular Ubuntu distro.
On Linux distros with Secure Boot enabled Kernel Lockdown can prevent access to /sys/kernel/debug/*, rendering system76-scheduler unable to tune the scheduler:
May 24 09:59:37 daedalus system76-scheduler[240248]: failed to set value in /sys/kernel/debug/sched/latency_ns: Operation not permitted (os error 1)
May 24 09:59:37 daedalus system76-scheduler[240248]: failed to set value in /sys/kernel/debug/sched/min_granularity_ns: Operation not permitted (os error 1)
May 24 09:59:37 daedalus system76-scheduler[240248]: failed to set value in /sys/kernel/debug/sched/wakeup_granularity_ns: Operation not permitted (os error 1)
May 24 09:59:37 daedalus system76-scheduler[240248]: failed to set value in /sys/kernel/debug/sched/preempt: Operation not permitted (os error 1)
Outside of a kernel patch to add new params outside of debug there may not be a way around this as those params can only be tweaked at boot in this scenario from what I can tell. Might just need to update documentation to warn the user about this.
Hi,
Just updated the OS and restarted my Lemur Pro and the daemon uses 100% of one of the CPU threads.
I let it run 15 minutes then stopped the service.
Our company owns 5 identical machines, they all had the same issue with execsnoop-bpfcc
/usr/bin/system76-scheduler daemon
_ [execsnoop-bpfcc] < defunct >
System76 Lemur Pro/Lemur Pro, BIOS 2021-07-20_93c2809 07/20/2021
NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os
Do the CFS features work with the CacULE scheduler as it's a modified version of CFS
The issue seems to be related to there being no conffiles
file under debian/
. Without this, dpkg thinks it is safe to overwrite wholesale, as if they were a binary file.
There are legitimate reasons to edit these config (for example, the top level config.ron
file, which doesn't seem to have an equivalent potential location under /etc
)
According to my observations the boost-foreground-deboost-background logic takes precedence over the pipewire-client-boost logic, which does not seem terribly useful.
I wonder if there is a way to work around this? I mean I can just disable the fg/bg logic altogether, thankfully, but that's a sledgehammer.
SystemD allows configuration of services with a Nice
property. Which, to little surprise, adjusts the process(es) niceness on launch.
For services that have such a Nice=
explicitly given, system76-scheduler shouldn't subject them to the default background priority adjustments. Since in that case the service probably is lower or higher priority for good reason.
(I'm classifying this as a feature request, not a bug, due to the sheer scope of work needed just to "fix" this bug)
For a bit more nuance, we could have
Nice
of <0 should never have their niceness raised above the configured value.Nice
of >0 should never have their niceness lowered below the configured value (unless it becomes the foreground process...somehow).IMO, per-process assignments in assignments
should override systemd configured niceness by default.
Maybe introduce a new config option (false by default) to have systemd managed services still take priority over process assignments.
I don't know of a current (efficient) way to tell the difference between an explicitly set Nice=0
vs the Nice=0
coming from the default of that property (either case shows Nice=0
)
I'd be fine with treating Nice=0
the same as unset though.
There is a libsystemd
crate you can probably use to avoid the pitfalls of parsing command line output.
(If you ever want support for other distros that don't mandate SystemD init, you will probably want to introduce a build configuration option to build without systemd support)
After wrangling with PopOS for several months, I finally figured out that it was this daemon that was causing issues. Don't get me wrong - I like the concept. The execution, however, causes me major pain. In no particular order:
nice
/ renice
just flat-out doesn't work. Oh, it seems to work... for a few seconds. Then reverts back to the old priority.
renice
'd task.nice
/renice
, having the default foreground priority (-5
) be lower than the minimum user-accessible priority (0
) results in a lot of pain.
-5
. However, see point 1, above.15
/ 5
instead of 5
/ -5
. That way a user can launch a process at a higher priority than the default priority.vm.swappiness=0
? If you do this, make sure that if the process is already in a cgroup you make a nested cgroup, not clobber the existing one.)java
or python
or lua
. Should java
be prioritized even if in the background? Answer: it depends entirely on what it's actually running.All told, on my system, with the sorts of workloads I run (as I type this I've got the cpu pegged with two separate 8-core bsat solver instances, for instance, both set to nice=19 and in a 24GB-max cgroup), system76-scheduler actually makes responsiveness significantly worse than default.
(For reference: this is a Oryx Pro (9, not 10) with 32GB RAM.)
For now, I've systemctl stop com.system76.Scheduler.service
/ systemctl disable com.system76.Scheduler.service
/ sudo apt remove system76-scheduler
'd it (and will continue to do so on all machines I control as necessary); I will revisit this in future if the worst of the warts are removed.
I figured you might like feedback as to why I disabled it, as opposed to just 'one less user; why? ¯\_(ツ)_/¯'.
Hi!
I'm planning to add a build recipe for this package in the Arch User Repository (unless someone beat me to it), so it'd be really helpful if you added tags to releases.
Thank you very much!
What you specify this way is the nice value, not SCHED_FIFO
/SCHED_RR
priority.
But actually it would be neat to have the ability to venture beyond the SCHED_OTHER
policy: like, say, assign SCHED_IDLE
to compilers etc. instead of assuming niceness 19 plus idle i/o is low enough for everybody. Not sure about SCHED_RR
/SCHED_FIFO
, since those come with foot-guns attached, but maybe allow even those (not in the default config though). I wonder if this direction has ever been explored in this project?
system76-scheduler/daemon/src/main.rs
Line 310 in 0fe4d8d
tokio::time::sleep(Duration::from_secs(60)).await;
I often hangon with my mates on call and use easyeffects for my mic. It's not agile enough to manage priorities before i join the call. So i'd prefer to have this value down to 1sec configurable.
When setting in the config.ron
background: None
system76-scheduler now interprets that as a niceness of 0, instead of leaving it unchanged for background processes.
foreground: None
still seems to work as intended (configures it not to change priorities)
I see a 1.2.2
tag, but the latest GitHub release points to 1.2.1
instead.
Is that on purpose?
Thanks.
Currently, if the kernel is built without SCHED_DEBUG
, then the entire functionality of the scheduler is prevented - even if the CFS tweaking functionality is never used, especially seeing as cfs-profiles are set as disabled in the default configuration.
I ended up writing a small - and mediocre - patch to be able to get a binary that I can deploy on systems both with and without CFS tuning paths; (Not a rust developer, and not going to submit it as a PR as it should really handle the error properly on startup if cfs-profiles are enabled)
diff --git a/daemon/src/main.rs b/daemon/src/main.rs
index 9823dcb..d9d7bb1 100644
--- a/daemon/src/main.rs
+++ b/daemon/src/main.rs
@@ -158,7 +158,7 @@ async fn daemon(
return reload(connection).await;
}
- let service = &mut service::Service::new(owner, SchedPaths::new()?);
+ let service = &mut service::Service::new(owner, SchedPaths::new().ok());
service.reload_configuration();
let (tx, mut rx) = tokio::sync::mpsc::channel(4);
diff --git a/daemon/src/service.rs b/daemon/src/service.rs
index a252f68..8f0df58 100644
--- a/daemon/src/service.rs
+++ b/daemon/src/service.rs
@@ -12,7 +12,7 @@ use system76_scheduler_config::scheduler::Condition;
pub struct Service<'owner> {
pub config: crate::config::Config,
- cfs_paths: SchedPaths,
+ cfs_paths: Option<SchedPaths>,
foreground_processes: Vec<u32>,
foreground: Option<u32>,
pipewire_processes: Vec<u32>,
@@ -21,7 +21,7 @@ pub struct Service<'owner> {
}
impl<'owner> Service<'owner> {
- pub fn new(owner: LCellOwner<'owner>, cfs_paths: SchedPaths) -> Self {
+ pub fn new(owner: LCellOwner<'owner>, cfs_paths: Option<SchedPaths>) -> Self {
Self {
config: crate::config::Config::default(),
cfs_paths,
@@ -273,7 +273,7 @@ impl<'owner> Service<'owner> {
return;
}
- crate::cfs::tweak(&self.cfs_paths, config);
+ crate::cfs::tweak(&self.cfs_paths.as_ref().unwrap(), config);
}
pub fn cfs_on_battery(&self, on_battery: bool) {
Currently, the CFS tuning happens when the option is enabled and what it does is switching between the two profiles when the power source is either battery or ac. However, there's no place in the config file where that information is stated:
// Latency profiles the kernel's Completely Fair Scheduler
cfs-profiles enable=true {
// The kernel-default values which are ideal for battery life and servers
default latency=6 nr-latency=8 wakeup-granularity=1.0 bandwidth-size=5 preempt="voluntary"
// Zen CFS parameters that make the desktop more responsive
responsive latency=4 nr-latency=10 wakeup-granularity=0.5 bandwidth-size=3 preempt="full"
}
Ideally, I'd swap the profile names default
and responsive
to battery
and ac
respectively, so they reflect better what the scheduler is actually doing. An alternative would be to simply add a comment making that clearer.
Would you be willing to accept patches for either?
Was there a reason this project was named system76-scheduler instead of pop-scheduler? Is anything about the project specific to System76 hardware? (This question just occurred to me while reading a news article about the release, and thinking about the relation between this and pop-shell, pop-launcher, etc.)
Hi,
I'm using Fedora 36 and how I cannot find execsnoop-bpfcc
, so I installed bcc
which contains execsnoop
. I'm not fully understand what are the difference they are.
I checked this PR #41, but I still don't understand how to config EXECSNOOP_PATH
.
EXECSNOOP_PATH=/usr/share/bcc/tools/execsnoop
before running just
does not work for me, see these errors:
error: must set EXECSNOOP_PATH env to execsnoop-bpfcc path
--> execsnoop/src/lib.rs:42:18
|
42 | Command::new(std::env!(
| __________________^
43 | | "EXECSNOOP_PATH",
44 | | "must set EXECSNOOP_PATH env to execsnoop-bpfcc path"
45 | | ))
| |_____^
|
= note: this error originates in the macro `std::env` (in Nightly builds, run with -Z macro-backtrace for more info)
error: could not compile `execsnoop` due to previous error
error: Recipe `all` failed on line 24 with exit code 101
And advice?
In auto.ron
provided by system76-scheduler v1.1.0 FAHClient
is listed first in low (9):
9: [
...
"fwupd",
"FAHClient",
...
And then in absolutely low (19):
19: [
"boinc",
"FAHClient",
"FAHCoreWrapper",
...
May we have some basic build instructions for building this? I'm using openSUSE and I had sucessfully installed it. However I had a disk failure and now I'm somehow unable to find out how I did it, or my notes either. I'd like to contribute back afterwards.
It would be great to allow disabling CFS tweaks, as it would help when it's already handled manually, or more simply when one doesn't want to change the default which comes with its kernel.
A use_cfstweaks: true|false
in the config.ron
would be perfect
Hi,
Running Pop!_OS 22.04 to try out the scheduler on lower end hardware (Haswell ultrabook i7 processor, 2C/4T). Providing some feedback:
In both cases, you get video/audio hitches when interacting with an application on a second screen, which detracts from the experience.
I'd offer a PR but my experience with Rust and dbus is minimal.
Hope this helps!
I do development on my system that uses the system76-scheduler daemon. The problem is that every so often - I want to do benchmark tests - and due to the way that the scheduler works - it will re-nice the processes. When I am not doing a benchmark - this is fine - since it gets changed on demand.
This would be nicer than trying to prevent the daemon from running.
Would it be possible to add a few dbus messages with the ability to make the scheduler suspend and resume changing priorities? This would allow me to use something like dbus-send during benchmarking and testing software.
The are some update on the branch your are pointing to including an update the version and deps
When I try to start the systemd service, the following error appears:
Error: kernel does not support tweaking the scheduler
I'm using the Vanilla 5.15.x kernel. I'd like to know what kernel options systemd76-scheduler need.
Hi! I'm writing a tiny daemon to make this scheduler work with swaywm. That is, when the currently focused window changes, call SetForeground(u32)
.
Regrettably, it seems that non-root users cannot access the com.system76.Scheduler
bus. I used d-feet to try and use it interactively, and get:
org.freedesktop.DBus.Error.AccessDenied: Sender is not authorized to send message (9)
Isn't this method intended to be called by the desktop user? Am I missing something?
Steps to reproduce:
top
, open Firefox and Nautilustop
that the foreground/background nicenesses work when switching between Firefox and Nautilusstress -c 1
stress
(and sometimes top
) have the background niceness of 6
, even though the terminal with stress
is focused.stress
switches to 0
.This may occur more often if stress
is run very quickly after switching focus to the terminal(s). However, it's not just a delay before the foreground niceness is applied; it's never applied until another focus switch when this issue occurs.
This is not caused by or fixed by #92.
Say a program foo
starts and then spawns 3 more threads.
And in /etc/system76-scheduler/assignments/foo.ron
{
3: [
"foo",
],
}
Then unless system76-scheduler happened to renice before the threads spawned, only main thread of foo
is assured to be reniced to 3.
The other threads would be left at the original niceness (typically 0, or 5 if it matched the background process renicing and that is enabled as well)
Reproduction
Add to some assignment .ron
file
{
-4: [
"gnome-system-monitor",
],
}
Start gnome-system-monitor
Look at the niceness of the threads. The command ps -L -o pid,comm,lwp,nice --pid $(pidof gnome-system-monitor)
should do it.
See how most likely only the main thread is at niceness -4
, and the others remain at 0
niceness.
On my machine, the output was
PID COMMAND LWP NI
370993 gnome-system-mo 370993 -4
370993 gmain 370995 0
370993 dconf worker 370996 0
370993 gdbus 370997 0
For my machine, I don't want system76-scheduler to mess with my niceness by default. Only when it explicitly matches a command name in some file in system76-schedule/assignments
.
So to do this, I used /etc/system76-schedule/assignments/my_assignments.ron
, and set my /etc/system76-schedule/config.ron
to:
(
background: None,
foreground: None,
)
system76-schedule correctly interpreted this a not touching background or foreground process niceness by default.
Unfortunately, is also tells it to not touch background or foreground process niceness at all.
The behavior I expected was "Does not touch background or foreground process, unless there is a match in the assignments."
So can that be a thing?
If people are relying on the old behavior (None
telling system76-scheduler to skip that category entirely), then perhaps some new value we can assign that it will know "Don't touch it, but still look at the assignments and take action if found there". Like
(
background: Some<AssignmentsOnly>,
// Where AssignmentsOnly is an i8 constant that is way outside the valid nice range, or some other type,
// that system76-scheduler will give this treatment to if it sees it.
foreground: Some<AssignmentsOnly>,
)
or something.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.