I guess this is why linux was never an alternative back then when XP died. Linux needed way more resources even on lxde
Announcement
Collapse
No announcement yet.
Yes, Linux Does Bad In Low RAM / Memory Pressure Situations On The Desktop
Collapse
X
-
Originally posted by Saverios View PostOkay, 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?
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.
- Likes 1
Comment
-
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).
- Likes 1
Comment
-
Originally posted by Saverios View PostOkay, 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?
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
-
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.
- Likes 1
Comment
-
Originally posted by tildearrow View PostSadly, this happened to me even with swap on.
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
-
Originally posted by edoantonioco View PostI guess this is why linux was never an alternative back then when XP died. Linux needed way more resources even on lxdeCode:[latalante@myvoid ~]> free -m total used free shared buff/cache available Mem: 935 188 386 28 361 589 Swap: 4095 0 4095
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.
- Likes 5
Comment
-
-
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?
- Likes 8
Comment
-
Originally posted by sarmad View PostI 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?
- Likes 1
Comment
Comment