this post was submitted on 04 Sep 2023
29 points (100.0% liked)

Linux

48212 readers
1991 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
 

My computer over the last week has (after using the computer for a few hours) shown very high ram usage, around 50 - 60% out of 32GB, even though nothing in htop appears to be the culprit with the highest consumer being Firefox at 1.6% ram, even in a tty, around half of my ram is being used up even though no process shows over 0.1% ram. Rebooting does seem to work, but I'd prefer not to every few hours. Do you think it might be an issue with hardware? I did build my pc so perhaps something's broken?

top 15 comments
sorted by: hot top controversial new old
[–] Chewy7324@discuss.tchncs.de 13 points 1 year ago (1 children)
[–] Krtek@feddit.de 2 points 1 year ago (1 children)

I hate that this is the default answer to these questions, most tools by which less tech savy have detrmined that something is using a lot of ram are accounting for buffers and don't subtract it from the free space. Every time when I clicked on someones post (well on Reddit, here its the first one) regarding their ram usage being high and this website was posted, it was not the buffer/cache. So while it is obviosly important to get to know how OP determined that something was using a lot of ram, directly assuming that they read it wrong is imo simply not helpful and in most cases just more confusing

[–] Chewy7324@discuss.tchncs.de 3 points 1 year ago

You're right. In this comment they specified that games crash when the RAM fills, so it most probably isn't just buffer/cache.

I assumed that it was buffer/cache since they mentioned that it doesn't show any process using that much RAM. Next time I'll ask if the high RAM usage has any negative effect, to make sure.

[–] mkwt@lemmy.world 4 points 1 year ago (1 children)

Compared to Windows NT, Linux is famous for using spare pages for cache, and reporting relatively high RAM usage, which is not directly related to the working sets used by processes. It also (I think NT also does this) pre-zeroes unused pages during idle CPU time, so they can be allocated to processes faster on demand.

There's probably no problem. And as the other commenter mentions, if you dig down into the reporting, you can figure out how much is actually going to processes.

[–] DeaDvey@lemmy.ml 2 points 1 year ago (1 children)

It just that games sometimes crash my computer if 100% ram is being used

[–] n2burns@lemmy.ca 0 points 1 year ago

Do you not have a swap partition/file?

[–] cmnybo@discuss.tchncs.de 4 points 1 year ago (1 children)

Does that include the buffer/cache memory usage?

[–] DeaDvey@lemmy.ml 3 points 1 year ago (1 children)

How would I find this out?

[–] cmnybo@discuss.tchncs.de 5 points 1 year ago (1 children)

Run free -m and look at the output. That will tell you how much memory is used by programs, how much is being used as cache, and how much is available. The memory used as cache will be freed if a program needs it.

[–] DeaDvey@lemmy.ml 8 points 1 year ago (2 children)
               total        used        free      shared  buff/cache   available
Mem:           32032       20961        2048         464        9022       10152
Swap:           2048         138        1909

Here's the output

[–] cmnybo@discuss.tchncs.de 13 points 1 year ago (1 children)

Something's using a lot of memory. It's not just buffer/cache memory. That's definitely not normal.

Did it just recently start using that much memory? I would suspect that something has a memory leak.

[–] DeaDvey@lemmy.ml 1 points 1 year ago

Ah ok, thanks.

[–] exi@feddit.de 1 points 1 year ago

Are you using zfs?

[–] mvirts@lemmy.world 2 points 1 year ago

What filesystems are you using?

[–] Atemu@lemmy.ml 1 points 1 year ago* (last edited 1 year ago)

Could you create a pie graph using smem?

Are you using ZFS?

If you close firefox, how much RAM is used?