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

  • Originally posted by down1 View Post
    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).
    Speaking as a SW Engineer, we pretty much assume the OS will allocate a chunk of memory when we request it. I've never seen a program actually handle the case where it doesn't get a block of RAM, since it's basically assumed the OS will crash at that point. It's the job of the OS to find a memory block, and there's really nothing developers can do if one can't be provided.

    Comment


    • Speaking as a SW Engineer, if the OS can't honor a request for RAM, I would fully expect things to break. Best case, a program crashes. Worst case, the OS crashes.

      The behavior being described here sounds like a bug that is being exposed in a low RAM condition; if both main memory and the swap file is full/disabled, why is the OS locking up performing I/O to the HDD? That sounds like a separate problem then what most people are talking about here right now. I think the obvious thing to check is what the OS is attempting to do in this condition, because it doesn't sound correct to me.

      Comment


      • Originally posted by gamerk2 View Post

        Speaking as a SW Engineer, we pretty much assume the OS will allocate a chunk of memory when we request it. I've never seen a program actually handle the case where it doesn't get a block of RAM, since it's basically assumed the OS will crash at that point. It's the job of the OS to find a memory block, and there's really nothing developers can do if one can't be provided.
        As a scientific programmer I have seen it happen in situations where artificial memory limits are imposed in batch systems. Basically c++ throws a malloc exception and I believe c returns a null ptr. Of course no one is going to write error handling for every string allocation. But for certain things it is possible.

        Comment


        • Create the file /etc/sysctl.d/local.conf :
          vm.overcommit_memory=2
          vm.overcommit_ratio=100
          Reboot. Voila, Linux memory management works without swap fine. Be sure to disable CONFIG_NUMA ,HMM_MIRROR and use TRANSPARENT_HUGEPAGE_MADVISE to fix current mess in the 5.x kernels made by Vmware, redhat, nvidia, oracle and facebook. 8-16GB RAM is enough for a gaming computer to run this way.


          Last edited by debiangamer; 08-19-2019, 05:48 AM.

          Comment


          • Originally posted by debiangamer View Post
            Create the file /etc/sysctl.d/local.conf :
            vm.overcommit_memory=2
            vm.overcommit_ratio=100
            Reboot. Voila, Linux memory management works without swap fine. Be sure to disable HMM_MIRROR and use TRANSPARENT_HUGEPAGE_MADVISE to fix current mess in the 5.x kernels made by Vmware, redhat and nvidia. 8-16GB RAM is enough for a gaming computer to run this way.

            The return of debianxfce!!!

            Comment


            • Originally posted by loganj View Post
              well windows if is running out of ram will start to close applications. of course you'll be asked to close some applications but if you don't respond than windows will make a choice for you.
              but if you have swap on (i forgot the name of it) than you'll be safe but still will have a lot of hdd writes
              Windows starts using "swap" when it runs low on actual memory. If you had it's virtual memory manually disabled and some program then runs out of RAM, that program gets closed with an error message. Windows itself stays up nicely. Most often seen with resource hungry video games.

              Comment


              • Originally posted by skeevy420 View Post

                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.
                Maybe the kernel could be told about pages which contain irreplicable user data, and dump those to a core, in a predictable location for recovery.

                Comment


                • Originally posted by tildearrow View Post

                  The return of debianxfce!!!
                  Well fsck me running.

                  Comment


                  • Originally posted by microcode View Post

                    Maybe the kernel could be told about pages which contain irreplicable user data, and dump those to a core, in a predictable location for recovery.
                    What about automatic recovery?

                    Comment


                    • This doesn't make any sense. If you run out of memory and don't have a swap file I'm surprised the system runs at all. I sincerely don't understand the complaint.

                      For goodness sake, just create a swap file and you'll be fine. Of course it won't run as fast as it would with more memory, but I know from many years of experience with low memory systems in the old days that the performance is more than acceptable.

                      Comment

                      Working...
                      X