this post was submitted on 12 Jan 2025
21 points (92.0% liked)

Linux

48982 readers
1524 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I've been running into an issue recently where my system will start to stutter and freeze. Going into my task manager (Resources), I can see my using is using roughly 18/32GB of RAM despite closing all apps. Normally I should be at around 2GB on a fresh boot.

I've only noticed this issue appearing when first interacting with an app called Newsflash, but the issue persists even after closing the app. I even tried using systemd's soft-reboot feature and even that did not clear the memory leak. So it seems the memory leak must be in the kernel itself.

And please don't link linuxatemyram. This is not related to cached data.

all 20 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 20 hours ago

does echo 3 | sudo touch /proc/sys/vm/drop_caches change the available RAM at all when this happens?

[–] [email protected] 1 points 21 hours ago

Do you use ZFS? It uses half your RAM for cache by default, which matches with 2GB used by user apps + 16GB = 18GB total.

[–] solrize 5 points 1 day ago

If you had something hog memory and a lot of other stuff got paged out of ram as a result, that can slow things down. Try running "top" and see how much swap space is in use. If it's more than a little bit, once you have enough memory available by shutting off whatever was hogging it, try "swapoff" (pages the stuff back in, which can take a little while) followed by "swapon" to re-enable swap.

[–] [email protected] 7 points 1 day ago* (last edited 1 day ago) (1 children)

I don't know what this tool is or how it gets its "memory" metric. If you want to continue to use it, please ascertain that these values correspond to RSS by cross checking with i.e. ps aux. RSS is the memory exclusively held by a given process which is typically what mean by the "memory usage" of any given process. Note however that this does not count anonymous pages of a process that are swapped or shared with other processes.

Going into my task manager (Resources), I can see my using is using roughly 18/32GB of RAM despite closing all apps.

This does not tell you (or us for that matter) anything without defining what "using" means here. My system is "using" 77% of RAM right now but 45% of memory is available for use because it's cached.

Please post the output of free -h aswell as swapon.

Next, please post the contents of /proc/meminfo.

Do you use ZFS?

[–] that_leaflet 1 points 1 day ago* (last edited 1 day ago) (1 children)

Resources reports the same memory usage as btop. free tells me only 6GB is being used for cache.

On a fresh boot, Resources and btop report less than 2GB RAM usage, obviously not including cached stuff. So for both tools to report 18GB with no apps open, it’s strange.

ps aux looks all normal, nothing in the background using more than 1% of RAM.

Using Fedora Silverblue 41 with btrfs.

[–] [email protected] 4 points 1 day ago

If you're not going to post what I asked for, nobody can help you.

[–] [email protected] 5 points 1 day ago (1 children)

Are you by chance using an integrated GPU?

Noticed that my AMD Radeon 680M uses quite a lot of RAM as shared memory.

Using something like amdgpu_top will show how much RAM your iGPU is using, metric is 'GTT'

[–] that_leaflet 4 points 1 day ago

No integrated GPU.

[–] akash_rawal 4 points 1 day ago (2 children)

Check if there's any large file in /tmp and /run/user/*?

[–] [email protected] 3 points 1 day ago (1 children)

Or just generally df -h | grep tmpfs and look for any significant usage.

[–] that_leaflet 1 points 1 day ago
[–] that_leaflet 1 points 1 day ago

No large files.

[–] [email protected] 2 points 1 day ago
[–] [email protected] 1 points 1 day ago (1 children)

Stop using Newsflash or submit a bug report?

[–] that_leaflet 3 points 1 day ago (1 children)

I'm not sure if it is related to Newsflash is the problem. Besides, I've been using the same version for months, but this has only recently become a problem. And the problem persists after Newsflash is closed.

[–] [email protected] 1 points 1 day ago (1 children)

Got it, but it seems like Newsflash may have a memory leak issue?

[–] that_leaflet 3 points 1 day ago

To my understanding, the kernel should clean up any memory leaks an app has when you close it.