htop doesn't report shared memory usage on Linux
Author: jartCreated Apr 11, 2024Updated Jul 1, 2026
Labelsbug :bug:Linux :penguin:
In the screenshot below, you'll see that one of my processes is using 139GB of memory, but htop reports the system using 6GB of RAM.
It's because htop hides mmap(MAP_SHARED) memory. This has caused a great deal of confusion in the machine learning community over the past year. For example https://twitter.com/JustineTunney/status/1778420352504512774 one Twitter user got snagged by poor performance because his system was swapping, but according to htop everything was fine.
Could htop start reporting this information? Thanks!
Source: htop-dev/htop