375
unused is wasted (lemmy.world)

this is right after closing qemu-kvm

you are viewing a single comment's thread
view the rest of the comments
[-] ricecake@sh.itjust.works 8 points 1 year ago

So, swap is when the computer writes used memory to slow, long term storage because of memory pressure.
Cache is when the OS sticks random bits of files into unused memory to they can be used faster.

Using swap is a sign you need more ram. Using cache is harmless, and the OS will try to fill all free memory with cached files, because worst case scenario there's no cost.

[-] PrefersAwkward@lemmy.world 14 points 1 year ago* (last edited 1 year ago)

Using swap isn't always a sign you need more RAM. Typically, if you use a computer for a while or have a lot of IO operations going on, Linux will decide to swap some things to make more room for cache.

Sometimes Linux just finds that you have a bunch of inactive app memory and it can swap that out to cache way more stuff. That's just good memory management, but it's not worth buying more RAM over

[-] ricecake@sh.itjust.works 6 points 1 year ago

That's totally fair. Most of my "caring about swap" time is when I was managing servers, and so you wouldn't have inactive apps to get swapped out, thus swap usage was a sign that you needed to get a new server and put down the old one.

Turns out I don't monitor my home computer the way I monitor the work ones. :)

[-] ManniSturgis@lemmy.zip 5 points 1 year ago

This. Also most of what you read online about swap is just plain wrong. Tons of people will tell you to reduce swappiness to 1 or just to not use swap at all. It's crazy how many people have no idea about how it actually works. I do include myself here. I just use a large zram disk so systemd-oom won't get tripped when 3d rendering. That's all I need to know.

this post was submitted on 07 Apr 2024
375 points (97.2% liked)

linuxmemes

25686 readers
989 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. ๐Ÿ‡ฌ๐Ÿ‡ง Language/ัะทั‹ะบ/Sprache
  • This is primarily an English-speaking community. ๐Ÿ‡ฌ๐Ÿ‡ง๐Ÿ‡ฆ๐Ÿ‡บ๐Ÿ‡บ๐Ÿ‡ธ
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  • ย 

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 2 years ago
    MODERATORS