-
-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
memory[bar] should display used+shared as the used memory #906
Comments
Issue is misdescribed - it should be requesting htop 2.2.0 as packaged in my Ubuntu is working well, at least w.r.t tmpfs - it has But since shared memory has been separated, the basic |
Here's the history of the readout, as I figured it out:
|
@kjbracey2 Maybe there is something wrong in my |
Yes, that's the issue being discussed. Since 3.1.1 the purple bar (shared) has not been included in the "used", despite it definitely being in use and not being reclaimable. Note that the blue and orange (buffers + cache) are not counted either, but that makes sense as they are reclaimable, and will just occupy any unclaimed memory until someone claims it. PR #913 would address this, and reorder the bars to put the green+purple (claimed) memory together, and show "claimed/total". |
That PR has not been merged yet, because there was a related change scheduled that touched quite a bit of the same code. Also some details on the UI/UX will likely still need to be worked out. |
Shared memory accounts for memory in
tmpfs
among other things. Iftmpfs
is mounted in/tmp
then adding a 1GB file will occupy 1GB of ram that is neitherbuffer
orcache
and cannot be freed by kernel on demand. However, htop'smemory[bar]
will only display the shared memory as purple bars but only writeused/total
in numbers at the end of the bar.In case of a system running out of memory, the bar will look full but the number indicating the memory usage might be very low.
memory[text]
does not have this problem because it will displayavailable
memory, which will immediately show that the system is low on memory.I think
memory[bar]
should displayused+shared/total
at the end of the bar to truly reflect the system state. An alternative would be to add an option to displayavailable/total
or to displayused/used+shared/total
.(running htop 3.1.2 on Arch Linux)
Edit: corrected some confusion where I wrote
free
instead of `used' as pointed out by @kjbraceyThe text was updated successfully, but these errors were encountered: