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 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


    • #82
      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


      • #83
        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


        • #84
          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


          • #85
            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


            • #86
              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


              • #87
                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


                • #88
                  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


                  • #89
                    Originally posted by k1e0x View Post

                    They don't know what they are talking about. A FreeBSD desktop does NOT suffer this problem. I was recently running 4GB of ram on a desktop and what would happen is the oom killer would just crash random programs. You can also tell it what programs you never want to kill so you can kill the query script killing a box but not the database for instance. The sluggish stuff is a Lunix only problem. Maybe they can look to see how BSD does it for guidence in how to do it right. Lol
                    It does crap out and crash, FreeBSD is crap compared to Linux in low memory situations

                    Comment


                    • #90
                      Why not use the excellent earlyoom project? It's a user-space highly configurable memory killer designed for the desktop use-case.
                      I've tested it and it's good.

                      meanwhile I run raspbian on a Pi 0 with 0.5GB ram, GUI & chrome and it shows little problems: it's on 24x7 (it shows constantly updating bus arrival and departure times for the stop nearest our house, via a web server and Chrome ... you can do that in 0.5 GB. 32 bit kernel is better maybe?
                      Last edited by timrichardson; 07 August 2019, 08:00 AM.

                      Comment

                      Working...
                      X