Excessive memory usage UB 20.04 after recent updates

I don’t know if anyone else has noticed memory-leak type behaviour in UB 20.04 after some updates last week, but I’m seeing rapidly increasing memory usage on three different machines, to the extent that the machines freeze with the disk access light permanently on. The only solution is a hard reset, because the machines are not responsive.
The machines are not high-end, but have been running UB quite happily for well over a year. I can’t isolate a specif culprit, but it does seem desktop-related rather than an application(s).
I know this is all a bit vague, but I’m trying to find a direction to look in, rather than just waiting for fresh updates. I installed the new kernel from -Proposed yesterday, which has helped a bit, but that hasn’t solved the problem

1 Like

suggest use htop and look to see what process/processes have a growing % mem usage

2 Likes

…or cpu usage.

Do you use some Qt or KDE app’s ? Some of these may bring as dependencies a file indexer service ( baloo ) which is often the cause of such slow downs ( ie. gwenview, maybe also calibre ).

Funny you should mention that @Coeur-Noir… I’ve had that happen before, but not this time. Also, I haven’t seen high CPU usage, just ever-increasing memory usage.
@fossfreedom, i haven’t been able to pick up one culprit in htop… it seems that it is a Gnome desktop issue, though. I’ve switched over to KDE plasma in the meantime, and memory usage is now under control again.
I am still seeing quite a bit of memory associated with gnome-software, though… can’t yet figure out what this is…

Are you using many different Desktop Environments on your system(s), under one and same user ?

If yes, then it’s not the best idea ( some shared config’ files may not be accurate from one DE to another ). That may not fully explain the memory usage though.

Next time you’re close to freeze, try to htop again.

Or. Any chance you have something mounted in /tmpfs at start ?
cat /etc/fstab

Up to now, I was only running with UB and just my user… fresh install of 20.04. Everything was fine until sometime last week. A set of updates ran… nothing out of the ordinary, but I noticed the change after that. Unfortunately, I can’t pin the change down to one event :frowning_face:, but I didn’t install anything new, or change my configuration. I have also seen it on three different PCs, none of which were changed from the installs I did around the end of April (when 20.04 was released). All three machines have been rock-solid stable up to last week
Nothing mounted in /etc/fstab… I use autofs for NFS4 exports, and again, that has not changed.
I was watching htop yesterday, and all I could see was the used memory increasing, but no one culprit. The increases I saw also did not correlate with the way the used memory was increasing. At this time, I can only say I am really puzzled :face_with_raised_eyebrow: and a bit sad, because I like Budgie very much

Well, I still want to see what’s inside your fstab.

Usual pieces of advice here :

sudo apt update
sudo apt full-upgrade
sudo apt install -f
sudo apt autoremove --purge
sudo apt autoclean
sudo apt clean

…just to be sure your system is up-to-date, dependencies complete, without obsolete or unused packages and archive.

If any error message or warning, please post them here.

cat /etc/fstab:


all apt commands ran without error
As I said earlier, nothing in my configurations changed, but I’ve been seeing the same behaviour on 3 different systems…

 top -b -o +%MEM |head -17

That will display the top 10 processes running order by memory high-low

Use that occasionally to monitor all processes - you should see the culprit process.

1 Like

I can’t say if it’s related to memory usage but it looks like you have no swapfile ( its line is commented ) neither swap partition.

So your system when RAM gets full, has no exit for it. Is this configuration intended for any reason ?

Did you run the commands I suggest ?

By the way you may only copy the text output from your terminal and paste it here between like this :

3xaltgr7
here the output text
from your terminal
that will get formatted.
3xaltgr7

Use [ shift ] + [ ctrl ] + [ C ] to copy what’s selected in terminal.
Or right-click, copy

Anyway, best catch indeed would be to narrow down the culprit in memory usage.

1 Like

You’re correct… I don’t have a swapfile by intention. I have 8GB of RAM, and generally my usage has hovered around the 3GB mark, so I don’t see a need, and I haven’t generally noticed any performance issues. A few years ago, I had an issue where Chrome was sucking up all the memory, and even with a swapfile (actually, a swap partition at that time), it didn’t help and the machine locked solid. Since then, I’ve been running with no swapfile, with no issues. My clean UB install in April was done the same way, and it had been running stably with no issues up until recently.
I ran all the apt commands you suggested, and they all came back with no errors. I run them very regularly in normal use.
Here’s the output again from cat /etc/fstab apologies for the previous formatting… I’m still learning how to format the posts here


# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=6e50b062-5924-4fe5-b4ff-66e55b2fa01a /               ext4    errors=remount-ro 0       1
## /swapfile                                 none            swap    sw              0       0

Sorry, still haven’t got the formatting right… will have to try later again :roll_eyes:

Thank you… I’ll try this with the Budgie desktop as soon as I have a gap, and see if I can find anything