理解htop中系统和进程内存的区别

我对htop在我们的服务器上报告的内存统计信息感到困惑。 在顶部的栏上,它显示系统内存为:

Mem: 456 / 7950MB

所以,看起来使用率很低。

但是,我的主要过程是显示它的内存使用情况如下:

 VIRT RES SHR MEM% 13.3G 2388M 2239M 30% 

呃,高得多。

为什么系统统计数据只显示456MB,当进程报告使用2388MB?

更新这里是free的输出:

  total used free shared buffers cached Mem: 8141292 5425364 2715928 0 103560 4839368 -/+ buffers/cache: 482436 7658856 Swap: 2097148 0 2097148 

Htop显示记忆:MEN总计,使用,BUFFERS和CACHE。 如果你总结使用缓冲区和caching,你将有结果等于命令的结果免费。 Htop你需要考虑所有的结果,因为进程可以使用任何内存。 男人htop形容记忆是:

  M_SIZE (VIRT) Size in memory of the total program size. M_SHARE (SHR) The size of the process's shared pages PERCENT_MEM(MEN%) The percentage of memory the process is currently using (based on the process's resident memory size, see M_RESIDENT below). M_RESIDENT (RES) The resident set size, ie the size of the text and data sections, plus stack usage. 

我希望我能帮上忙

为什么系统统计数据只显示456MB,当进程报告使用2388MB?

你错误地解释了htop输出。

它报告总共有796MB的内存中有456MB是免费的。