帮助我了解 Process Explorer 中的这些内存统计信息

发布于 2024-08-05 05:22:24 字数 380 浏览 6 评论 0原文

我正在尝试对我的大型财务计算运行所需的内存量进行非常粗略的测量。它是一个非常简单的命令行工具,可以对大量金融工具定价,然后打印结果。

我决定使用 Process Explorer 来查看程序的内存需求。有人可以解释一下屏幕截图中标记为a和b的两个字段之间的区别吗:

我目前认为:

标记为“a”的值(峰值专用字节)是最大的内存量(包括实际物理内存和磁盘上的虚拟内存) )在任何瞬时分配给进程。

标记为“b”的值(Pealworking Set)是进程生命周期中任何时刻分配的最大物理内存量。

替代文字

I'm trying to do a very rough measurement of the amount of memory my large financial calculation requires in order to run. Its a very simple command line tool which prices up a large number of financial instruments and then prints out a result.

I decided to use Process Explorer to view the memory requirements of the program. Can somebody kindly explain the difference between the two fields labeled a and b in the screenshot:

I currently believe that:

The value labeled "a" (Peak Private Bytes) is the largest amount of memory (both actual physical memory and virtual memory on disk) which was allocated to the process at any instantaneous moment.

The value labeled "b" (Peal Working Set) is the largest amount of physical memory allocated at any instant during the life of the process.

alt text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

堇年纸鸢 2024-08-12 05:22:24

来自此处

工作集是进程中的线程最近接触的内存页面集。如果计算机中的可用内存高于阈值,页面将保留在进程的工作集中,即使它们未被使用。当可用内存低于阈值时,将从工作集中修剪页面。如果需要这些页面,它们将在离开主内存之前软故障回到工作集中。

[私有字节是]此进程已分配且不能与其他进程共享的字节。

在这种情况下“峰值”的含义应该是显而易见的。

From here:

The working set is the set of memory pages that were touched recently by the threads in the process. If free memory in the computer is above a threshold, pages are left in the working set of a process, even if they are not in use. When free memory falls below a threshold, pages are trimmed from working sets. If the pages are needed, they will be soft-faulted back into the working set before leaving main memory.

[Private bytes are] bytes, that this process has allocated that cannot be shared with other processes.

What "peak" means in that context should be obvious.

-黛色若梦 2024-08-12 05:22:24

来自观察的随机想法以及过程浏览器的显示内容。
工作集位于显示器的物理内存部分,因此任何说它是虚拟内存的人都会感到困惑。由于 RAM 使用情况通常会发生变化,因此它会以奇数变化,因此看起来工作集是物理内存。
另一方面,专用字节被列为虚拟内存。看着它的变化似乎变化了 16K 的倍数,因为虚拟内存通常会随着内存页面的交换而变化,而不仅仅是随机位。出于某种原因,我认为这应该是 64 k 页,但我认为这取决于计算机和 Windows 版本。

Random thoughts from observations and what the display of Process explorer says.
Working set is in Physical Memory section of the display so anyone saying it is virtual memory is confused. And it changes by odd numbers as RAM usage would normally change so it looks like working set is physical memory.
Private Bytes on the other hand is listed as Virtual memory. And watching it change seems to change is multiples of 16K, as Virtual memory normally changes as it swaps out pages of memory and not just random bits. For some reason I thought this should be 64 k pages but depends on the machine and version of Windows I suppose.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文