Open jart opened 2 months ago
Okay, something seems off here …
Can you provide a copy of /proc/meminfo
with what htop reports alongside? Shared memory should be handled already.
Also, which htop version/release?
Hi, I might experience the same issue with htop version 3.3.0-2 on ArchLinux where the swap memory usage statistics of htop differs from those shown by top and /proc/meminfo. Please find the following screenshot for more detailed information. I tested Line 213-215 in linux/LinuxMachine.c
and found these variables match with the correct memory consumption listed in meminfo
. I suppose these variables were incorrectly changed during the whole htop workflow although I have not investigated the root cause in depth.
PTAL, thank you :)
@fish98 your observed behavior is probably due to the zswap handling, see https://github.com/htop-dev/htop/commit/71f5a80d9e312375eff28d2fbb7d8add81f6793c and https://github.com/htop-dev/htop/commit/71f2e66126286540ca88d8c36f81008ba5181f89
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!