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

  • #51
    I guess this is why linux was never an alternative back then when XP died. Linux needed way more resources even on lxde

    Comment


    • #52
      Originally posted by Saverios View Post
      Okay, I'll bite. What should happen when you have no more memory and no swap file and an application asks for more memory? Isn't it up to the application to handle memory unavailability gracefully?
      It is actually impossible for the applications on linux to handle out of memory situations gracefully.
      Malloc will basically always succeed; even in low memory conditions. It can fail, but that is extremely rare.
      Now when your app actually tried to use the memory that you just allocated, the kernel goes into a frenzy because there are not enough memory.
      It now has no option but to swap or let the oom-killer throw out passengers from the plane...

      This over commit can be switched off, but that is generally a bad idea.
      Last time I checked, the over commit was working on the size of the address space of the process and not on the RSS size.(Probably an artifact from a time when sbrk was used to allocate memory).
      So all processes that use address space randomization or map memory at arbitrary addresses, will most likely break when over commit is off. Or at least fool the the kernel about the actual memory usage.

      I wish people will stop writing slow and bloated software. But today programmer convenience trumps everything else ...
      This is what you get in a world with automatic memory management.
      Last edited by Raka555; 06 August 2019, 05:35 PM.

      Comment


      • #53
        Though, what I'd REALLY like to see is something that triggers SIGSTOP to a process whenever it:
        A. Is consuming the majority of the total used RAM.
        B. The total available RAM and SWAP has exceeded 95%.
        By doing this, it's a win-win: your system remains stable and usable, and you still get a chance to recover and/or SIGCONT the process. There could be a single file in the /etc folder that controls the behavior of this (so for example, maybe you want to increase the limit to 99%, or use SIGKILL instead of SIGSTOP, or ignore SWAP percentages).
        I think M@yeulC and elatllat are on to something. There should be a signal that tells the application to release some of its memory when the system is low on memory. The application knows what it needs to have on memory and what it can get rid of.

        Comment


        • #54
          Originally posted by Saverios View Post
          Okay, I'll bite. What should happen when you have no more memory and no swap file and an application asks for more memory? Isn't it up to the application to handle memory unavailability gracefully?
          Indeed,
          But the kernel needs to provide that information back, when you are trying to reserve more memory..
          In that situation, your application, should handle it... but it needs to know first that there are a problem..

          Also in that Situation,
          All other applications should continue to work.. and of-course the mouse too..events and so on..

          Comment


          • #55
            Firefox extensions can be the devil indeed - I ran into one like that myself; took resources per tab, and I had a lot of tabs.

            But worse, web apps such as Discord and (especially) Twitter, which soaks huge amounts of session store in subframes which keep changing. If you have a non-trivial number of tabs, I'd wager a large amount of the writing to disk in Firefox is for the session.

            Comment


            • #56
              Originally posted by tildearrow View Post
              Sadly, this happened to me even with swap on.
              Indeed,
              Linux kernel doesn't recover very well when swapping...I would even go further and say that it never recover completly, without external help.. sometimes, you can solve, sometimes ...you don't..
              Too much bloatware, too much memory consumption..

              When you look into windows XP, and you remember running it in 96MB Ram... you start to question a lot of things..

              Comment


              • #57
                Originally posted by edoantonioco View Post
                I guess this is why linux was never an alternative back then when XP died. Linux needed way more resources even on lxde
                Code:
                [latalante@myvoid ~]>  free -m
                              total        used        free      shared  buff/cache   available
                Mem:            935         188         386          28         361         589
                Swap:          4095           0        4095
                Linux 5.2 (32-bit), agetty, haveged, dbus, dhcpcd, wpa_supplicant, udevd, Xorg, urxvtd, notion, tmux, mksh, bash, vim, chromium 76.0.3809.87 with open phoronix forum.

                Windows XP with the latest version of google chrome (48) working, it's about 470MB RAM (2x more than used memory).
                Terrible crap, eyes hurt from just looking at fonts, action is better left unsaid.

                Comment


                • #58
                  Originally posted by dimko View Post
                  He switches off swap, FIRST LINE OF DEFENCE against low memory situation and THEN complains shit doesn't work.
                  In a desktop with a bootup of less than 400MB or so,with 4GB of RAM, should run every traditional tool, without any problem..

                  Comment


                  • #59
                    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?

                    Comment


                    • #60
                      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?
                      In the time it takes for you to read the message a program may have took the remaining memory, it now may be impossible to gracefully exit any program as it may need more memory to exit gracefully, and you can't load the task manager because that requires... memory.

                      Comment

                      Working...
                      X