Linux的top命令内存占用问题

top命令,M按内存占用排序后,显示最大占用为mongod进程,只有4.2g,所有进程加起来也只有5,6个g左右,但是used显示为15g.

其他的已用内存是什么?

Keep in mind that there is a distinction between 'active' and 'consumed' memory. Linux tends to store large volumes of data in memory in case it's needed in the future. But processes may not actively be using this memory - in which case they report a lower volume of 'used' memory.
...
You should familiarize yourself with the free command. I also like using htop instead of top, as it displays these differences.

https://serverfault.com/quest...

简单来说就是系统会事先多申请一些内存,所以used中的量是系统申请了的内存,包括已经分配给进程的和没有分配给进程的。你可以试试htop命名,看看是否符合你的预期。