Announcement

Collapse
No announcement yet.

Systemd 247 Still Aiming To Integrate systemd-oomd

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Systemd 247 Still Aiming To Integrate systemd-oomd

    Phoronix: Systemd 247 Still Aiming To Integrate systemd-oomd

    Systemd developers are still hoping to introduce systemd-oomd as part of the next release...

    http://www.phoronix.com/scan.php?pag...d-247-OOMD-Aim

  • #2
    systemd-oof coming soon

    Comment


    • #3
      On the one hand, I could really use something like this, as my 4GB Raspberry Pi 4 slows down to practically locked up for a long time whenever I have an out of memory condition occur.

      On the other hand, systemd...

      Comment


      • #4
        Originally posted by ed31337 View Post
        On the one hand, I could really use something like this, as my 4GB Raspberry Pi 4 slows down to practically locked up for a long time whenever I have an out of memory condition occur.

        On the other hand, systemd...
        earlyoom works very nicely and doesn't require systemd.

        Comment


        • #5
          Cool, but it's there any standard interface to signal a program that it will be killed if it doesn't reduces its memory usage ?
          Or for a program to signal systemd that the user has chosen a higher memory usage ?
          For example, for a long time I have always set at least 2 GB of memory cache for reads and writes in qBittorrent settings so that the HDD or SSD is not used so often to maintain a good transfer speed while keeping the drive healthy for as long as possible.
          I would not want systemd to stupidly kill qBittorrent for using such a high memory usage when I have told it to do so for my own reasons.

          Comment


          • #6
            Originally posted by Danny3 View Post
            Cool, but it's there any standard interface to signal a program that it will be killed if it doesn't reduces its memory usage ?
            Or for a program to signal systemd that the user has chosen a higher memory usage ?
            For example, for a long time I have always set at least 2 GB of memory cache for reads and writes in qBittorrent settings so that the HDD or SSD is not used so often to maintain a good transfer speed while keeping the drive healthy for as long as possible.
            I would not want systemd to stupidly kill qBittorrent for using such a high memory usage when I have told it to do so for my own reasons.
            You are looking for cgroups integration which already exists. systemd exposes a number of knobs to manage it easily

            https://www.freedesktop.org/software...e-control.html

            Here is what Fedora is planning to do by default in the next release for the workstation which might give you some ideas on how you can configure your torrent client

            https://fedoraproject.org/wiki/Chang...active_user_WS

            Comment


            • #7
              Originally posted by Danny3 View Post
              Cool, but it's there any standard interface to signal a program that it will be killed if it doesn't reduces its memory usage ?
              No standard defines a signal for this. This is a on going horrible. oomd is based around plugin model
              https://github.com/facebookincubator...nfiguration.md
              So it would be possible to add plugin to do the signal if a standard signal is ever decided on.

              Originally posted by Danny3 View Post
              Or for a program to signal systemd that the user has chosen a higher memory usage ?
              Generally no you don't want to-do this. User alter rules of oomd or equal yes. Program itself signal and change the rules not a good idea because you can bet a few applications will do this when its really not the user intention.

              oomd was designed for servers and services so you configure it by file and you are done. Its not really designed for the desktop case where user says X applications are currently critical and 15 min latter changes their mind.


              Comment


              • #8
                Originally posted by Danny3 View Post
                Cool, but it's there any standard interface to signal a program that it will be killed if it doesn't reduces its memory usage ?
                Or for a program to signal systemd that the user has chosen a higher memory usage ?
                For example, for a long time I have always set at least 2 GB of memory cache for reads and writes in qBittorrent settings so that the HDD or SSD is not used so often to maintain a good transfer speed while keeping the drive healthy for as long as possible.
                I would not want systemd to stupidly kill qBittorrent for using such a high memory usage when I have told it to do so for my own reasons.
                If your process is not a member of a gcroup you can try something like:

                echo -17 > /proc/XXXXX/oom_adj

                (Negative values are supposed to bias it away from being killed, -17 is supposed to stop it entirely)

                If its inside a cgroup with a memory controller you can echo a high enough value to its memory.low setting in the hierarchy such that if it stays within that limit, it is protected.

                Take this with a grain of salt, as I think some of these interfaces are being worked on, and I am not sure about the difference between cgroups v1 and v2. This has definitely been an area of contention, partly because different users can have very different needs or expectations. (ie. servers vs desktop) I am not familiar with how systemds oom works; hope springs eternal that it improves the situation for those that require it.

                Comment


                • #9
                  Originally posted by Danny3 View Post
                  Cool, but it's there any standard interface to signal a program that it will be killed if it doesn't reduces its memory usage ?
                  Or for a program to signal systemd that the user has chosen a higher memory usage ?
                  For example, for a long time I have always set at least 2 GB of memory cache for reads and writes in qBittorrent settings so that the HDD or SSD is not used so often to maintain a good transfer speed while keeping the drive healthy for as long as possible.
                  I would not want systemd to stupidly kill qBittorrent for using such a high memory usage when I have told it to do so for my own reasons.
                  As I understand it, the oom killer would only kill anything once you are in a low ram situation anyhow. So what is better, killing qBittorrent to free the 2GB of ram or to restart the machine because it has become unresponsive due to massive swapping etc?

                  Comment


                  • #10
                    This is interesting
                    If the bittorrent client runs as a daemon you might ask the oom to kill the graphical user session. This could be a funny way to deal with this, especially on raspberry (which might use SD card and no swap). It just kills everything! except your daemons, sshds, things on tty1-4 (not sure that exists on raspi) and things you ran in screen hopefully.

                    Comment

                    Working...
                    X