Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Operating Systems Linux

System76-Scheduler Is a New Pop!_OS Rust Effort To Improve Desktop Responsiveness (phoronix.com) 43

slack_justyb writes: "Quietly making its v1.0 debut yesterday was system76-scheduler as a Rust-written daemon aiming to improve Linux desktop responsiveness and catering to their Pop!_OS distribution," reports Phoronix.

The daemon will work with the kernel's CFS scheduler to give priority to components that System76 deems important for its distro. Out of the box, the scheduler will assign priority to the X.Org Server and desktop window managers/compositors, while pushing compilers and other background tasks lower. However, the scheduler will be configurable via Rusty Object Notation (RON) files found in /etc/system76-scheduler/assignments/ and /usr/share/system76-scheduler/assignments/.

Over on the GitHub page for the project, the team indicates that they are indeed making a trade-off from the default CFS to benefit Desktop configurations over the typical load a server might see.

This discussion has been archived. No new comments can be posted.

System76-Scheduler Is a New Pop!_OS Rust Effort To Improve Desktop Responsiveness

Comments Filter:
  • Equity (Score:3, Funny)

    by rswillergun ( 8956369 ) on Friday February 04, 2022 @08:32PM (#62238895)
    A Rust based scheduler should be promoting equity, not giving special privileges.
    • scheduler should be promoting equity, not giving special privileges.

      You get a cookie, that is how any good scheduler works, but this one suffers Linux desktop-itis and isn't suited for a server, that does real work.

  • I wonder if they ever heard of ionice and nice while at it. It would be intresting to know what they propose does better.

    • You still need program to automate the nice setting to prioritize in-focus-windows process / thread / task, and then de-prioritize when something is out of focus or minimized.
    • by DamnOregonian ( 963763 ) on Saturday February 05, 2022 @07:02AM (#62239689)
      LOL.
      Ya, I'm sure these guys have never heard of nice and ionice. Which are great tools for kids, amateur sysadmins, or neckbeards who earned their chops on AT&T UNIX back in the day with Ken Thompson et al.

      The linux schedular is massively more complex than setting the nice attribute on a process. cgroups [man7.org], scheduling classes [man7.org] (SCHED_*) for starters.
    • Nice is just a command that applies a priority to a process. This is a system service that systematically applies priorities to processes across the entire OS based on inputs from the window manager informing it about the foreground process, and pre-defined priorities assigned by configuration file(s). When coupled with some supporting software for that specific window manager, such as pop-shell in Pop, it sets the focused window and its sub-processes to a higher priority than background processes.
  • Not another format (Score:4, Insightful)

    by DraconPern ( 521756 ) on Friday February 04, 2022 @10:36PM (#62239107) Homepage
    Yet another configuration text format.
    • by drolli ( 522659 )

      That was exactly what i thought.

      Sometimes i hear people mocking the windows registry and claiming how much simpler the linux configuration storage is....

      I wonder when the number of json files in /etc/ will start to grow.

      • As bad as some obscene number of text configuration files jammed into /etc and /usr are, and despite the existence of a perfectly functional KV storage system like a registry (dconf) the "improvement" to text file configuration madness seems to be creating an unending amount of binaries that manage magical configs you can't touch without breaking, which is frankly infinitely fucking worse.
        • by Anonymous Coward

          As bad as some obscene number of text configuration files jammed into /etc and /usr are, and despite the existence of a perfectly functional KV storage system like a registry (dconf)

          Even dconf is a reinvention of a reinvention. I'd mention X resources but I'm sure something must've come before.

          Just like putting enormous effort into reinventing build systems (because writing a compiler from scratch is too much?) and not actually managing surpass POSIX make in utility (as opposed to dressing the utility up to your liking for your convenience, and every package builder's despair), as crippled as that is, so is reinventing formats a pastime that ends up being more about NIH than about imp

        • The improvement is unrelated to text vs binaries. It's related to centralisation. Providing the binaries are openly defined and easily configurable that is just a distraction from the core issue: the system should be resistant to breakage and easier to manage, not more difficult.

          The biggest problem with the windows registry for example is its insane complexity and size. It's actually a good example of how being a binary format doesn't actually make it fragile. It's big problem is it's not actually simple.

          • by Anonymous Coward

            The improvement is unrelated to text vs binaries. It's related to centralisation. Providing the binaries are openly defined and easily configurable that is just a distraction from the core issue: the system should be resistant to breakage and easier to manage, not more difficult.

            I wouldn't say it's entirely unrelated. For a binary format to be easily configurable puts a requirement up front for editing tools. Like, something that can read and write the format without being the daemon itself. But even ready availability of a high quality tool (and thus of some code maturity) already brings complexity.

            You can't just fire up your favourite editor to whip up a config. You have to fiddle with commands and stick them in batchfiles. If the tools are even amendable to that (how long did i

          • The improvement is unrelated to text vs binaries. It's related to centralisation. Providing the binaries are openly defined and easily configurable that is just a distraction from the core issue: the system should be resistant to breakage and easier to manage, not more difficult.

            The problem is that some things require complexity.
            You can't have a configurator that lets you toy around with packaged configurations come up with every possible permutation you may need.
            So what you get is a binary that is constantly in flux to add whatever person X's need for it is. Person X having wasted 85 hours out of his life ripping your configurator out of the system so that he could manage things directly.

            So, to the contrary, I think your way of thinking is the problem.
            The assumption that yo

            • The assumption that your binary can do everything, or that people shouldn't want to do anything else is hubris.

              The alternative is literally a bunch of text files. Yes, a binary can do everything, it has that power. That's not hubris, that's fact. Hubris would come into play if I said this is somehow trivial. I made no such claim, the solution would be complex to design, but doesn't necessarily need to be complex to administer (that's is what my complexity of the windows registry was referring to, the general way that configurations are stored in it and the garbage tool we use to manipulate it).

              Do you know what the #1 request is? How to get the old network configuration scripts back, because like nmcli will never be able to replace a script.

              And binaries aren't th

    • I'm the author of the project. The format that I chose for system76-scheduler shouldn't matter to anyone. system76-scheduler is the only consumer of its own configuration files. The whole point of choosing RON is because it can succinctly express maps with arrays better than TOML and JSON. Implementation-wise it's just importing serde, adding attributes to your config struct, and typing `ron::from_str(&buffer)` to deserialize the buffered file.

      { -5: [ "high-priority-task" ], 5: [ "low-priority-task"]

  • It will never be The Year of Linux On The Desktop.

    Sorry.

    • Year of Linux On The Desktop came for me back in ~2007. Never looked back. Not even once.
      Sorry you didn't get the memo.
      • Year of Linux On The Desktop came for me back in ~2007.

        I was off and on between 1993 and 1999,which is when I couldn't stand Windows as a desktop anymore. It was horrendously pathetic, and I realized that nothing was going to make it better. I had just gotten my last Windows virus, which wiped out everything I had done for the last five years. I had no backups since I was a college student without money for such luxuries, so I was starting from scratch again. Might as well start over by replacing Windows with Linux.

        Even with all its quirks, Linux treated me ver

        • Out of the box, Kubuntu needs some tweaking to not suck:

          1) Ditch KDEPIM like the plague it is. Replace it with something else (I chose Thunderbird and Lightning).
          2) Configure Konqueror as the file manager, as Dolphin sucks, Sucks, SUcks, SUCks, SUCKs, SUCKS, SUCKS!

          That's pretty much all.

          Despite all that, I have come to the conclusion that the KDE devs are actively trying to destroy KDE from the inside. The catastrophe that is Nepomuk (and the whole fantastically ill-conceived semantic desktop) was the first salvo (which is what destroyed KDEPIM), followed by the monumentally brain-damaged decision to replace the stellar Konqueror with the minimally functional, almost entirely useless, Dolphin. Then, they started systematically removing Konqueror's most useful features in an attempt to drag it down to Dolphin's level.

          And in spite of all that, it's STILL heads and shoulders better than Windows for me

          and there it is.

          If you spend half your life Tweaking, Replacing and Configuring, you can sorta-kinda get Linux to "not suck".

          Life's too short for that, thanks!

          So, please believe me that I am really not Trolling when I ask: Why not OS X/macOS? It just seems like a no-brainer for people who are sick to death with Windows (which, having used and admin-ed it in every single Dev. and other job for 4 decades, I am well familiar with!); but want to work with their computer, rather than work on their computer.

          So wh

  • Sounds Reasonable (Score:5, Interesting)

    by KeithIrwin ( 243301 ) on Saturday February 05, 2022 @01:49AM (#62239333)

    As a desktop Linux user and a professor who is right now teaching scheduling to my Operating System class, this sounds really reasonable. The fact of the matter is that the desktop seems to still periodically become unresponsive in situations where it seems like it shouldn't. And part of the blame may fall on trusting CFS too much. Any modern scheduler is making guesses about what to prioritize based on process behavior. But, honestly, in many cases, we know what we want to prioritize for a responsive desktop environment, so why not build something which tells it?

    Also, being in a situation where I taught the CFS algorithm in an Operating Systems course, I did a bunch of reading about it. I found that there were a lot of conflicting descriptions of how it works. I wound up having to go read the source code to be sure, and what I found is that a lot of the descriptions of how it works are inaccurate. Usually when we talk about modern desktop and server schedulers, we say that they're trying to prioritize I/O-bound processes and deprioritize CPU-bound processes. And a lot of the descriptions of CFS says that it does this because threads which are using the CPU have a charge against their vruntime, but threads which are waiting do not. But this turns out not to be necessarily true, as threads which enter an I/O wait are actually effectively removed from the queue and then later reinserted. And due to how the math works, if all the other I/O-bound threads on a given core are in an I/O wait state, they'll wind up with the same vruntime as a CPU-bound thread (or worse in some cases). Once you add in process groups and moving between cores, it's complex enough that it's hard to reason about exactly what happens on average without collecting some real data, but there's no clear reason to believe (at least not from looking at the code) that threads which do user interaction will automatically get any priority. So having a process which adjusts the priority numbers instead sounds like a very reasonable idea to me.

    • Spot on. Linux on desktop still regularly freezes completely, for minutes in a row, sometimes tens of minutes, while the CPU is on 100% doing nothing but seemingly pointless disk I/O. I do not know what amateurs programmed that shit, but they should hang themselves out of pure shame.
      A desktop OS scheduler has one top priority that should never, NEVER, EVER be broken: allow instant responsiveness to user input, 100% of the time, forever.
      If no normal scheduler can achieve that, then even reserving every sec

      • > freezes completely, for minutes in a row, sometimes tens of minutes, while the CPU is on 100% doing nothing but seemingly pointless disk I/O

        Hey, when my NFS server reboots I WANTED to not be able to type for half an hour.

        Oh, no, wait, that's insane.

        I only have a 4GHz Ryzen with 32GB here, but it still stalls on typing input for dozens of seconds in many apps, which a Mac Plus with 1MB RAM and an 8MHz 68000 never did. Because nobody would find that acceptable.

        I remember both OS/2 in 1992 and BeOS in 19

    • by juancn ( 596002 )
      It does make sense. Windows has been doing temporary boosts for a long time [microsoft.com], to summarize it typically boosts:
      • - foreground processes (as a whole, i.e. all threads)
      • - threads receiving input (keyboard, mouse, timers, etc.)
      • - threads waking up from wait conditions (e.g. I/O finishing, etc.)

      There's also some tweaks around sound and media processing, but I cannot find the articles.

  • "making a trade-off from the default CFS to benefit Desktop configurations over the typical load a server might see"

    That's only a decade or two late. Too bad that insane Linus keeps blocking proper desktop scheduling and with that keeps blocking Linux desktop advance.

Arithmetic is being able to count up to twenty without taking off your shoes. -- Mickey Mouse

Working...