Score:0

htop does not show the real memory usage

eh flag

I'm having a server running around 250 docker containers. Once they are all up and running, htop shows a 32-33% RAM usage as shown below: enter image description here

I've also installed netdata for a more granular monitoring, but then I get the following (after a restart and ramp up of the containers): enter image description here

From what I see in netdata there are about 20Gb of RAM which are marked as cached, however htop does not show them?

I had several errors in which my node process monitoring the containers is running out of heap space (you can actually see that moment in the netdata graph when the measurements are not recorded for a small period).

What is this cached memory and why is it taking 20Gb? I would believe that my node process heap space is limited to 1Gb.

free -g confirms what netdata sees: enter image description here

Is there a way to know which process is using that memory?

berndbausch avatar
us flag
Please post text, not screenshots. Not everybody can see images, text from images can't be copied, search engines can't process them, and there may be other reasons why this practice is frowned upon. Having said that, `htop` seems to report the `used` figure from `free`. It also seems to show `cached` memory in yellow. `cached` is RAM used for caching disk blocks, with the purpose of speeding up disk accesses. Cached memory is not associated with a single process, and sometimes with no process at all.
Michael Hampton avatar
cz flag
https://linuxatemyram.com/
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.