如何衡量应用程序或进程的实际内存使用状况? - How to measure actual memory usage of an application or process?

问题:

This question is covered here in great detail. 这个问题在这里详细介绍。 html

How do you measure the memory usage of an application or process in Linux? 您如何衡量Linux中应用程序或进程的内存使用状况? linux

From the blog article of Understanding memory usage on Linux , ps is not an accurate tool to use for this intent. 了解Linux上的内存使用的博客文章中, ps不是用于此目的的准确工具。 app

Why ps is "wrong" 为何ps是“错误的” 工具

Depending on how you look at it, ps is not reporting the real memory usage of processes. 根据您的见解, ps不会报告进程的实际内存使用状况。 What it is really doing is showing how much real memory each process would take up if it were the only process running . 它的真正做用是显示若是每一个进程是惟一运行的进程每一个进程将占用多少实际内存。 Of course, a typical Linux machine has several dozen processes running at any given time, which means that the VSZ and RSS numbers reported by ps are almost definitely wrong . 固然,一台典型的Linux计算机在任何给定时间都运行着几十个进程,这意味着ps报告的VSZ和RSS编号几乎确定是错误的 this


解决方案:

参考一: https://stackoom.com/question/Y9n/如何衡量应用程序或进程的实际内存使用状况
参考二: https://oldbug.net/q/Y9n/How-to-measure-actual-memory-usage-of-an-application-or-process
相关文章
相关标签/搜索