Score:1

Ubuntu 22.04 Memory Leak

br flag
rwg

Over the course of a few days, I see the RAM Memory usage keeps going up and up. For example, I have 32 GB of RAM. System Monitor shows over 27 GB used, but when I look at Processes there is way less than 10 GB accounted for. Brave is about 3 GB. If I close Brave, System Monitor goes down about 100 MB, still showing about 27 GB being used. I let it go, eventually Ubuntu will crash.

John Greenfelder avatar
cn flag
what makes you say that eventually ubuntu will crash? what sort of crash info did you get out of the machine previously, if there was a previous crash? what do the monitoring tools report as memory using processes? I'd suggest digging into tools like 'vmstat' and 'free'; top can be useful, but it often masks what's really going on. I suspect your system is, like most linux based systems, trying to use all available memory as IO caching, disk or network buffering... something. as nature abhors a vacuum, linux abhors unused memory.
jmath1983 avatar
om flag
Could you please provide us a screenshot of your system monitor resources usage and the output of `free -h` in a terminal?
user535733 avatar
cn flag
If you can identify the cause of the leak, then please file an appropriate bug report. AskUbuntu is not the bug tracker.
rwg avatar
br flag
rwg
"Crash" means the system resets. It appears the problem is buff/cache. It doesn't seem to go down by itself. I found some links that pointed me to: # sync; echo 1 > /proc/sys/vm/drop_caches This clears the cache and all seems to be good.
WallyZ avatar
bd flag
I'm seeing the same issue on a 4GB SBC system, so I notice it immediately. The percentage of shared memory continues to raise while general memory percentage drops until applications begin to swap and at some point ground to halt. Only a reboot will free the shared memory!
rwg avatar
br flag
rwg
$ free -h total used free shared buff/cache available Mem: 31Gi 20Gi 470Mi 1.0Gi 10Gi 9.3Gi Swap: 0B 0B 0B
Joe avatar
cn flag
Joe
Believe I am seeing something similar. Thought it was a Firefox problem. But even when Firefox closed, swap memory still shows higher than expected usage on no user apps running. Ram has a couple of GB free at this time. See https://askubuntu.com/questions/1460651/why-is-firefox-eating-up-swap-on-ubuntu-22-04
Ryan avatar
es flag
I have this issue with Ubuntu Studio 22.04.2. Closing applications does release RAM, except when I fall asleep to videos (played in SMPlayer, if that heps). When the video ends, the screen shuts off (but it's not set to suspend session). When I wake up, another GB of RAM is in use, even after quitting applications. The next day, more RAM is in use, and the next, etc., until the computer slows to a crawl and I have to reboot. I don't have this problem with Kubuntu 20.04 on the same computer. Device is triple-boot and uses legacy BIOS. As with OP, System Monitor doesn't account for the used RAM.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.