htop icon indicating copy to clipboard operation
htop copied to clipboard

htop doesn't report shared memory usage on Linux

Open jart opened this issue 10 months ago • 4 comments

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.

image

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!

jart avatar Apr 11 '24 13:04 jart