Understanding FreeBSD RAM reporting: Why htop, btop, and fastfetch show different memory usage
By
Bruno Croci
4d ago· 14 min readenInsight
Summary
A deep technical investigation into why different system monitoring tools (htop, btop, fastfetch) report different RAM usage statistics on FreeBSD. The author spent a month researching FreeBSD's kernel virtual memory system to understand the discrepancies, and ultimately submitted patches to all three projects to improve accuracy. The article explains the complexity of memory reporting in modern operating systems, covering concepts like active vs inactive memory, wired pages, cache, and how different tools interpret kernel data differently.
Source
Key quotes
· 4 pulledSome people on Hacker News noticed that, when I showed the fastfetch result, I said I was confused with the RAM usage compared to btop and commented that fastfetch is probably more correct.
I decided to enter that rabbit hole and try to understand why reporting free or used memory in a modern operating system is more complicated than it seems.
I spent a whole month researching FreeBSD's kernel's virtual memory system to understand why tools like htop, btop and fastfetch report different information about RAM usage.
I ended up submitting patches to all of these projects.
I spent a whole month researching FreeBSD's kernel's virtual memory system to understand why tools like htop, btop and fastfetch report different information about RAM usage. I ended up submitting patches to all of these projects.

Comments
Sign in to join the conversation.
No comments yet. Be the first.