Linux will run out of memory after a few days running?

Jonds

New Member
Joined
Jul 25, 2023
Messages
6
Reaction score
1
Credits
52
For the past year or so I've been running on this issue on my desktop PC and now on my laptop, where it will freeze or hang really heavily, and It happened in a few distros and two different computers using Fedora with cinnamon , Linux Mint and Kubuntu.

I generally keep the computer running for daily use, with all the stuff opened, IDE's, database managers, shells and specially browsers (with lots of tabs) ... I know my usage is pretty heavy on memory, but I have 12gb on the laptop and 16gb on the desktop, it shouldn't just freeze and become unusable in the middle of the day.

I installed oompd, which helps to recover without rebooting, but doesn't really solve the issue.

Any suggestions on how can I fix or at least debug this are welcome.
 


If you have the disc space, you could always try a 20gb swap file
 
@Jonds :-

Just out of curiosity, when you say "browser(s)" AND "lots of tabs".......how many browsers are open at the same time, and just HOW many tabs?

Modern browsers are RAM hogs.....the Chromium-based ones especially. Every single tab runs its own process, and each and every tab can use up anywhere from perhaps 90MB up to around 300+ MB, depending on how "heavy" the specific web-site is.

16GB sounds like a lot of RAM, but when running multiple browsers, and making heavy use of them, it can soon get sucked-up, believe me.

I run with 32GB RAM, yet because I often have multiple browsers open - I re-package a whole bunch of 'em into 'portable' format for the Puppy Linux community - I've often got down to around half my available RAM without really trying.....

I also run a 64GB swap partition on this HP Pavilion desktop rig; I often suspend overnight, and the HP insists on saving the whole of my RAM to a single location, whether it's in use or not; it doesn't like you splitting this up between smaller swap areas.


Mike. ;)
 
Last edited:
@KGIII has an extension he uses....basically it "frees" memory when there are 'lots and lots ' of tabs open

He will be alerted to the fact that i have mentioned his name here.
 
basically it "frees" memory when there are 'lots and lots ' of tabs open

Auto Tab Discard.

I literally have hundreds (plural) tabs open across Chrome and Chromium (and another dozen in Pale Moon, but that's all lightweight stuff).


You technically don't need it. They made an update to Chrome/Chromium not long after that article was published. You can just follow the directions here:


I still use the extension. I prefer the granularity and the easy ability to put a tab to sleep until I need it again.

I have gobs of RAM, no less than 32 GB on my devices. I still do this, 'cause all those tabs chew through memory like a puppy chews through toys.

But, you can click the 2nd link and Google now has some options (in the performance settings) that basically do the same thing that Auto Tab Discard does. If you deal with a lot of open tabs, even if you have gobs of RAM, I highly recommend taking advantage of one of these two choices.

Seriously, it will save you (literally) gigabytes of RAM being held by your Chrome/Chromium/Chromium-based browser. It can make a huge difference. It'll also reduce some CPU usage, as those tabs are idle rather than updating or the likes - but the big difference will be with RAM consumption.
 
I have gobs of RAM, no less than 32 GB on my devices. I still do this, 'cause all those tabs chew through memory like a puppy chews through toys.

Planned obsolescence. Just imagine the profits for all those replaced devices.
Can't browse the internet on our unupgradable device? Ka..Ching.
Can't stand the poor battery life after a few years? Ka..Ching.
Not near an Apple Center? Ka..Ching.
 
Last edited by a moderator:
Just imagine the profits for all those replaced devices.

I'm pretty used to it and generally okay with it. Though it's not as true now, upgrading brings new features, greater speed, more space, etc... This used to be especially true with CPUs, but not so much anymore. I'm still okay with moving to new hardware on a regular basis. The stuff I discard still has a useful lifespan and I give them away to folks who can use them. Otherwise, I send it out for responsible disposal and recycling.

I'm not sure that Moore's Law has any validity today.
 
Moore's law may be dead, but corporate greed is insatiable.

It's not enough to run a responsible sustainable business that makes a lot of money. Because it's not all the money. And apparently you need all the money for shareholders to be happy.

Upgrades? Cellphones these days no longer come with SD card slot or 3.5mm jacks or user replaceable batteries. We're talking downgrades.

We've reached peak tech, and apparently from this point the only idea left is nickel and dime the customer until they leave.
 
but corporate greed is insatiable.

That is what they do, generally speaking.

There are exceptions of course, as all sorts of non-profits are incorporated entities.
 
Moore's law may be dead, but corporate greed is insatiable.

It's not enough to run a responsible sustainable business that makes a lot of money. Because it's not all the money. And apparently you need all the money for shareholders to be happy.

Upgrades? Cellphones these days no longer come with SD card slot or 3.5mm jacks or user replaceable batteries. We're talking downgrades.

We've reached peak tech, and apparently from this point the only idea left is nickel and dime the customer until they leave.
I'll stick to my old Huawei P8lite if that is the case.
 
Take this job and shove it.


Also watch the movie Office Space you heathens.
 
Don't have so many things running at once or add more Ram...simple.
m0110.gif
 
For the past year or so I've been running on this issue on my desktop PC and now on my laptop, where it will freeze or hang really heavily, and It happened in a few distros and two different computers using Fedora with cinnamon , Linux Mint and Kubuntu.

I generally keep the computer running for daily use, with all the stuff opened, IDE's, database managers, shells and specially browsers (with lots of tabs) ... I know my usage is pretty heavy on memory, but I have 12gb on the laptop and 16gb on the desktop, it shouldn't just freeze and become unusable in the middle of the day.

I installed oompd, which helps to recover without rebooting, but doesn't really solve the issue.

Any suggestions on how can I fix or at least debug this are welcome.
It seems odd that a similar freeze condition should occur on two separate computers in a number of different installed distros on those machines.

The reference to "oompd" appears to refer to the systemd-oomd.service, so it sounds like you have enabled that service to monitor the out-of-memory situation, and it's helped, so it sounds like it's a memory problem.

It's worth checking the memory health by running: memtest86+, either by installing it and then selecting it to run at the menu in the next boot, or, or by running it from a live disk on an unmounted system.

An initial way of checking what's using the memory is to watch, or log, the output of a command that shows memory usage over a period of time to see whether any program that is in use is increasing its usage unexpectedly, which may suggest a memory leak. Something like:
Code:
[flip@flop ~]$ ps  -eo pid,user,cmd,%mem,rss --sort=-%mem | head
    PID USER     CMD       %MEM   RSS
   1532 flip      firefox   7.9 644192
   7816 flip      librewolf 5.5 447084
  44491 flip      firefox   2.8 233552
   2182 flip      firefox   2.8 231640
   7999 flip      wolflibre 2.6 213836
 106821 flip      firefox   2.2 185668
  85376 flip      firefox   2.2 181712
  96603 flip      wolflibr  2.1 173576
 105987 flip      firefox   2.1 173228

This outputs the top 10 users of memory, with the usage in the RSS column in kilobytes in this case on a machine with 8 gigs of RAM.

For a greater number of programs, add the number to the head command with the -n option, e.g. head -n 20.

To check over time if there's increasing memory usage by a program, this command could be run over a time interval, say every few minutes, and logged into a log file for a day, or however long it takes for the computer to slow down. The log file may end up rather large, but the info may be conclusive one way or another, and what's using the memory should become clear.
 
Sound more like a memory leak in one of the programs you are using, Linux does memory management and if you are running out of memory the oom killer will start killing programs so that the rest of the system doesn't go down. Are any of the database managers or IDE's you are using written in java, from my experience java programs are more likely to have memory leaks?
 
Auto Tab Discard.
Just installed this in FF on one of my (many) Puppy VMs and for that purpose this is really useful and increases the functionality of said VMs.
It does the job really well in saving (freeing) RAM so there are enough resources left to do other things without having to close browser tabs and recovering them later from history.

This is a keeper in my VMs. Also recommended for regular Puppy users who run machines with less than 4GB of RAM.

Link with info and instructions and stuff.

:cool:
 
Last edited:
It does the job really well in saving (freeing) RAM so there are enough resources left to do other things without having to close browser tabs and recovering them later from history.

Yup. In my case, it literally saves GBs of RAM, plural. I have an abnormal number of tabs open at any one time and they're there when I need them quickly, but not consuming RAM. It's a great plugin, though it's now also a feature in Chrome and Chromium (though I continue using the plugin).

If it hasn't done so already, I suspect the feature will trickle down to the other Chromium-based browsers. It's good that Firefox also has that extension available. It's one of my favorites.
 
Also might want to check your power settings, might have Power Saving Mode on and that is causing the screen to stop responding until you wake it

In September 2022 Nvidia CEO Jensen Huang considered Moore's law dead, while Intel CEO Pat Gelsinger was of the opposite view.
 
It's not enough to run a responsible sustainable business that makes a lot of money. Because it's not all the money. And apparently you need all the money for shareholders to be happy.
Oh, yah.

The corporate world today is apparently run purely FOR the benefit of the shareholders. Businesses are only there to generate the necessary funds to stuff nice fat 'divvys' in their bill-folds.....and if a group of shareholders get together, and decide that a particular CEO is not doing enough to keep THEM in the lifestyle to which they wish to become accustomed (!!), they have the clout to get 'em fired these days.

Everything is topsy-turvy now, compared to the way the world was even 50 years ago.


Mike. :rolleyes:
 

Members online


Latest posts

Top