this post was submitted on 28 Feb 2026
29 points (96.8% liked)
Linux
63886 readers
930 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 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Are we talking about this preload?
https://manpages.ubuntu.com/manpages/jammy/man8/preload.8.html
Cause if so, it doesn't actually let you manually add specific files to RAM. It's an adaptive daemon that automatically learns which files your applications use frequently over time and prefetches them. So when you launch it and then play games, it's observing patterns and making predictions.
This also explains why there's no "remove files" command. The files preload loads into RAM aren't locked there; they're in the page cache, which the kernel manages freely. If something else needs that memory, the kernel will evict those cached files automatically. Killing preload via htop should not really do anything, except it not doing it's thing anymore.
When I used preload, it let me manually add files to ram. I used
sudo preload filenamefor each file (the game I tried it with only had two) and it seemed to add them to ram. I know this because the game had hitching issues even after just adding the main executable but the hitching went away when I added the second file.When you open and read files from a program the OS (kernel) will typically cache part or all of those files in memory. This is to speed up subsequent reads of that file since disk access is slow.
"preload" seems to be making use of that feature.
The kernel maintains this cache and evicts (unloads) things from it as needed. You don't need to worry about it.
After doing some more "extreme" tests, it seems like I was wrong about how preload works. In fact, it didn't seem to actually preload the files at all, so I'm not sure what it actually does. I ran
sudo sysctl vm.drop_caches=1to make sure that none of the game's files were loaded and then used preload like I did yesterday, but the game still has hitching issues. This means that the game's files were probably still loaded in RAM when I was trying it yesterday.