Announcement

Collapse
No announcement yet.

Yes, Linux Does Bad In Low RAM / Memory Pressure Situations On The Desktop

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

  • #11
    But, but, Windows is a resource hog and everyone should just switch to Ubuntu and breathe new life into their Pentium 1's laying around!

    Comment


    • #12
      Originally posted by Danny3 View Post
      This seems to be similar to my experience with Kubuntu on a flash drive.
      Very slow, lots of stalls, almost unusable.
      But of course, the case is the opposite, lots of free memory (90 -95%), but KDE Plasma can't or doesn't want to use it.
      I dare say it isn't KDE, but the Ubuntu base. I have some old hardware, and the UI runs literally triple the responsiveness on KDE or Manjaro versus Kubuntu.

      Modern Ubuntu even has lag when in the console (as in no X) on an Atom system. I don't know what they are doing to make it that slow...

      Comment


      • #13
        Originally posted by skeevy420 View Post

        It's exactly how I'd expect it to behave.

        A system with the memory all used up and no swap space available runs like shit...you don't say...
        The problem is that it doesn't work correctly. Having no swap, when running out of RAM the system TRASHES the hard drive with IO, with NO reason in what is obviously a bug.

        What should happen is:
        - swap, if enabled and available
        - call OOM immediately

        The disk trashing behaviour makes NO sense and I really wonder what is being read/written - there is NO swap enabled.

        Comment


        • #14
          Originally posted by atomsymbol

          This is interpreting serious unsolved operating system deficiencies as positive features of the operating system.
          I consider it user error and not a deficiency of the OS. The user pushing something too hard isn't necessarily a computer problem for that matter. No matter how many safe guards are in place, it doesn't help it if a user pushes something beyond its limits. In this case they removed a safe guard and pushed it beyond its limit.

          How is the kernel supposed to know if it needs to halt Plasma, Firefox, Mplayer, LibreOffice, KSP, Kate, Yakuake, makepkg or what to keep the system in a usable manner? All it can do is juggle stuff with what little resources it has available.

          IMHO, this is really a problem that should be solved by a daemon that a user can configure it to kill/halt/suspend-to-disk programs in a specific order because the kernel can't read my mind to know what I consider to be the more important task. It would also need a blacklist of things to not kill ever like the actual desktop environment.

          Comment


          • #15
            Originally posted by latalante View Post
            Never but never disable swap. Without a swap, as you can clearly see the system is not faster. It is much, much slower.
            1. Always but always use a swap file in zRAM.
            echo 2G > /sys/block/zram0/disksize && mkswap --label zram0 /dev/zram0 && swapon --priority 100 /dev/zram0

            2. If you made this mistake and turned off swap, run resource-consuming programs with a memory limit.
            systemd-run --user -p MemoryLimit=3G google-chrome

            3. You can always press the emergency key combination alt-sysrq-f
            An open tab in chrome will end with "Aw Snap!"

            Linux works on billions of different devices, there is no one right solution how to behave in such extreme conditions, satisfying everyone.
            If you run out of RAM, the OOM killer should be called immediately. Right now there is a long period of disk trashing even if you have NO swap enabled.

            This is obviously a bug.

            And alt-sysrq-f is a lifesaver

            Comment


            • #16
              Originally posted by anarki2 View Post
              But, but, Windows is a resource hog and everyone should just switch to Ubuntu and breathe new life into their Pentium 1's laying around!
              It actually did the job for me with my 4GB Gemini Lake notebook. Maybe not only for me, which wouldn't make it a surprise why this hasn't been tackled yet?

              Anyhow, egregious advice: Buy a better system if the old one is overburdened for your purposes, memory pressure always sucks.

              Comment


              • #17
                Originally posted by Saverios View Post
                Isn't it up to the application to handle memory unavailability gracefully?
                Mostly no, since the introduction of virtual memory it's been standard procedure to simply assume memory will allocate (outside of special situations). Best you can hope for is a friendly error message and a crash.

                I am interested in what it's actually doing, without swap I would have just assumed it would be killed (that's what windows does).
                Last edited by down1; 06 August 2019, 03:10 PM.

                Comment


                • #18
                  Originally posted by skeevy420 View Post
                  It's exactly how I'd expect it to behave.
                  You'd expect to not be able to close currently running applications? How would you expect to free up memory then?

                  Comment


                  • #19
                    Haven't used swap for the last 10 years and all my kernels during these years have had swap functionality disabled.
                    Usually my system never goes above 4G userspace RSS. My previous machines were limited to 4G. Never had an OOM-kill or a severe pressure stall.
                    Seems to me that my system does better without swap up until it crashes than swapping itself to bits up until it's unusable.

                    Most gobbling of RAM during these years has been done by the excessive bloat of addon-libs that keep piling up with every new install or major upgrade.
                    My desktop usage profile is simple and limited. Browse, mail, code, movies etc.
                    I build a new kernel and reboot every new minor release.. Usually every other month.

                    Comment


                    • #20
                      this has been an issue with linux desktop for the past several years. it use to be that you could run linux on a quarter gig of ram with no risk of issue for most average tasks.

                      the problem is the browsers. firefox or chrome, take your pick, have all but given up on trying to keep resources under control. i use firefox regularly and it can eat up 4 gigs or so with almost no effort.

                      to be fair, i do think that the problem isn't really firefox's codebase, its the extensions or websites that firefox is running, i have had a firefox extension that if it was active, all memory would eventually be consumed and the system would lock up. and websites don't concern themselves with making sure your system has enough resources to run 250 other tabs at the same time. i know firefox can be tuned to reduce the amount of pages that are cached in memory and such, but i think there needs to be better and more restrictive default settings and more confinement of the extensions

                      with that said, i would expect linux to not let the system lock up so hard as it does. if a browser is consuming 7.5 out of 8 gigs and hasn't touched 7 of those GB for a long time, those pages should have been slowly trickled to swap. or at least just the browser would have its memory swapped out all at once and only the browser would slow to a crawl. the rest of the system should stay usable.

                      Comment

                      Working...
                      X