this post was submitted on 04 Dec 2024
49 points (96.2% liked)
Linux
48624 readers
1645 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
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Yes, this is normal and it's a good thing (unless you've come across a bug). I don't know exactly what app the screenshot is showing, but I'm guessing that the caching shown is referring to the filesystem cache. The kernel is keeping a cache of files you are likely to access again so that it doesn't have to read them from storage again. So what you're seeing here is that some memory contents were moved to swap to make room for filesystem cache. This is because the kernel believes you're more likely to access those files again rather than the memory contents. If it's right, then this a performance improvement despite the fear surrounding swap usage.
Setting a low non-zero swappiness value is telling the kernel that memory contents have priority over filesystem cache for remaining in RAM, or conversely that file cache is more likely to be evicted from the RAM. A value of 100 would mean that they have equal priority. So that memory content must have been very stale to be evicted despite having a significantly higher priority to reside in RAM.
So:
Source: https://chrisdown.name/2018/01/02/in-defence-of-swap.html