You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I just spent a good while trying to figure out why I was missing ~700MB+ of RAM and wasn't having any luck. Annoyingly almost every forum post or StackOverflow post would scream "it's buffers+cache!" or point users to this website, even when the user posting had clearly taken those figures into account. None of these posts were useful, it was just the same comments parroted over and over.
My situation was this: The RSS field of "ps aux" summed came to around 230MB at worst. Free completely disagreed with this:
free -m
total used free shared buff/cache available
Mem: 7746 323 6686 647 737 6598
Swap: 8165 24 8141
Even adding up the fields in TOP came nowhere close to what free was claiming. The "323 used" in free was close, but why are free and available showing a deficit of over 1GB?
The answer, was tmpfs. For anyone unfamiliar, tmpfs is used to making RAM disks. Virtual media where the data is stored in RAM. On most distros, the /tmp folder of the system is a RAM disk.
Anyway, sure enough, there was a nearly 650MB file in the /tmp folder which accounted for most of this missing RAM. Once deleted, I now see...
free -m
total used free shared buff/cache available
Mem: 7746 323 7331 9 92 7239
Swap: 8165 12 8153
(ignore the buff/cache change, I dropped caches between runs which is why that suddenly changed)
The 323MB used reported by free still doesn't match up with the 220MB used I'm seeing by summing the RSS field of "ps aux", but at least it's a lot closer now.
TL;DR: Missing RAM? Check your RAM disk(s).
The text was updated successfully, but these errors were encountered:
This confused me for a while. My old package manager used to build everything in /tmp, which caused almost all of my memory to be used by the tmpfs and kept getting OutOfMemory errors everywhere, but htop only showed ~1.5 GB used total. I was very confused.
After changing my package manager's build directory to ~/Temporary/build, I no-longer had any issues. 😸
So I just spent a good while trying to figure out why I was missing ~700MB+ of RAM and wasn't having any luck. Annoyingly almost every forum post or StackOverflow post would scream "it's buffers+cache!" or point users to this website, even when the user posting had clearly taken those figures into account. None of these posts were useful, it was just the same comments parroted over and over.
My situation was this: The RSS field of "ps aux" summed came to around 230MB at worst. Free completely disagreed with this:
Even adding up the fields in TOP came nowhere close to what free was claiming. The "323 used" in free was close, but why are free and available showing a deficit of over 1GB?
The answer, was tmpfs. For anyone unfamiliar, tmpfs is used to making RAM disks. Virtual media where the data is stored in RAM. On most distros, the /tmp folder of the system is a RAM disk.
Anyway, sure enough, there was a nearly 650MB file in the /tmp folder which accounted for most of this missing RAM. Once deleted, I now see...
(ignore the buff/cache change, I dropped caches between runs which is why that suddenly changed)
The 323MB used reported by free still doesn't match up with the 220MB used I'm seeing by summing the RSS field of "ps aux", but at least it's a lot closer now.
TL;DR: Missing RAM? Check your RAM disk(s).
The text was updated successfully, but these errors were encountered: