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

  • #81
    Originally posted by sarmad View Post
    I don't understand how people think this is normal. What I would expect from a system running out of memory is for that system to simply show you a dialog box telling you "Out of Memory". Then the user can close apps and free memory and try again. Why is that hard to do? What am I missing?
    Well,
    You are missing the biggest companies that contribute to the Linux Kernel.. Intel and so on..
    They need to sell hardware

    So the Memory management, in Linux was always( or almost always ), a plague, there are no substantial effort, to just do it..
    Also some features that existed in the 2.4.X series disappeared, I think that in 2.6.14( is memory doesn't fail-me..), in relation to swappiness control..

    Also exists the Idea that the community reports upstream, of memory problems, are a myth..
    This is a long war journey fought at least since the 2.4 series..

    Comment


    • #82
      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.
      Highly accurate. It is better to try a lower swappiness value, like 20, or 10.


      I thought the RAM thing was just my perception, funny, I installed Linux (Mandrake) for the firs time a couple of years ago in a 512MB RAM Desktop computer, because Windows XP was running too slow (half of the RAM was for the antivirus). Times change.

      I'm currently having this issue with a new laptop that has only 4GB RAM, I intend to buy 4GB more (if US Dollar calms), but at the moment the best thing I could come up with, was to set swappiness to 1 instead of 60. I avoid at all cost to hibernate or suspend with more than 2GB being used, unless I want to wait for a 3 min boot, and an awful performance in general (after the S3, S4 state, what I do it's to disable,and reenable the swap, so important stuff doesn't get accumulated there, which makes everything slow and horrible). I can reproduce the same behavior in my oldest laptop which has 3GB.

      Comment


      • #83
        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.
        Swap just delays the issue. If you have enough swap and it's slow enough to not fill up and give you time to react because you're there at that point in time(I've left a machine to do work and come back and it's too late), then maybe that works for you. The slower the media though, the more I/O pressure to disk, and this can impact your responsiveness, depends on scheduler in use.

        Swap was disabled to better demonstrate the issue. I have 20GB+ RAM easily, if I was on a 4GB RAM system swap isn't really a proper answer. It's intended for cold memory/pages that isn't accessed much, not as "free" memory.

        Comment


        • #84
          Originally posted by slavko321 View Post
          The disk trashing behaviour makes NO sense and I really wonder what is being read/written - there is NO swap enabled.
          Apart from other reasons given that could cause it and make perfect sense. Another in this situation might very well be error logs? The browsers also frequently write to disk to sync their profile/session or cache(JS running and changing up the ads being served etc).Other background processes could also be trying to use disk.

          Comment


          • #85
            Originally posted by Marc Driftmeyer View Post

            OS X is king with memory performance wrt small ram footprints. It was designed for the desktop first.
            Disagree. I've experienced a mac at work misbehave, kernel process kext or whatever it is was using GBs of RAM for some reason, and some other system process. Heavy swap was going on but input was now stuttery, it could take up to 10 seconds for a key press to be received/responded to, similar with mouse movement.

            But it did behave as expected with what Apple is known for. The beachball spun at a buttery smooth framerate, as did the bouncing app icon on the dock trying to get my attention. UI aesthetics were prioritized over actual system functionality/responsiveness. Took about 30 mins or so before I was able to close some applications to get some responsiveness back, save my work and reboot.

            Comment


            • #86
              Originally posted by Danny3 View Post
              lots of free memory (90 -95%), but KDE Plasma can't or doesn't want to use it.
              KDE uses the memory, it just doesn't report it as used in the system monitor app. Use `free` on terminal, look at buffer/cache, this is for caching stuff in memory. Not sure how else you're wanting the memory to be used?

              Flash drive as in not an SSD but a usb stick? Those can be notoriously slow(especially if not over USB3). Remember that performance for running an OS is typically random I/O not sequential, which is what flash sticks are generally used for(transferring data).

              Comment


              • #87
                I'd like to see few things done..
                1. have GUI and other critical processes priority for memory usage - their memory should not be moved to swap (this should solve unresponsiveness) - selectively disable swap
                2. display warning dialog with option to kill the application when memory usage gets too high
                3. instead of killing, there should be option to deny any further allocation - applications should have a checks and exit gracefully
                4. ability to easily set memory limits for applications - I would limit Firefox, because that is usually the culprit that gradually steals all memory (restarting it helps a lot though)

                Comment


                • #88
                  If it helps, I'm currently using a laptop with 2gb memory and web surf with tabs open, youtube playing, chat program in background and as much as I use the available ram, it never stalls or crashes or slows down to a crawl... The only changes to my lubuntu install are that I add 'vm.swappiness = 10' to the /etc/sysctl.conf file and also add 'noatime' flag to my drives in /etc/fstab

                  Comment


                  • #89
                    Originally posted by polarathene View Post
                    Swap just delays the issue. If you have enough swap and it's slow enough to not fill up and give you time to react because you're there at that point in time(I've left a machine to do work and come back and it's too late), then maybe that works for you. The slower the media though, the more I/O pressure to disk, and this can impact your responsiveness, depends on scheduler in use.

                    Swap was disabled to better demonstrate the issue. I have 20GB+ RAM easily, if I was on a 4GB RAM system swap isn't really a proper answer. It's intended for cold memory/pages that isn't accessed much, not as "free" memory.
                    Nothing about being horrible and dangerously wrong.

                    Swap disable brings another bug into play. How the Linux kernel defragments particular structures in memory is push copy of the structure to swap then modify it. No swap particular structures in the Linux kernel cannot defragment so you system can stall out due to structure fragmentation instead of memory pressure.

                    Swap need to exist even if it ramfs until the Linux kenrel structure defragmentation system is fixed up fully. Swap is being used in a hack method to cover up some of these problems. Of course that does not mean swap cannot be insanely small like 16 megs. Yes that is enough swap that the kernel structures can defragment.

                    Basically disable swap demos a completely different issue to the issue that happens with swap enabled.
                    memory.swap.max exists in cgroupv2 this is nice if you set a cgroup to have this value set to 0 even if a swap partition is mounted nothing in that cgroup will be put into swap. So you can have swap and have you application not use it. This is great so you can have a small swap for you Linux kernel to use to defrag its memory structures and your applications not coming swap bound.

                    Comment


                    • #90
                      Originally posted by tuxd3v
                      That would be your greatest headache, and in a company it could be the point to trigger an "automatically open front-door for you".. The Algorithm of OOM Killer, tries to kill the bigger consuming processes..
                      Not at all - which would you rather debug?
                      "The production DB server became super slow and caused everything else to fail strangely for several hours until someone manually rebooted the VM", or
                      "The production DB server died, there is an easy to understand OOM message in the logs, and since it stopped completely it was immediately restarted by a monitoring service".

                      Comment

                      Working...
                      X