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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1439239/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 13:09:13  来源:igfitidea点击:

Help me understand these memory statistics from Process Explorer

windowsmemory-managementprocess-explorer

提问by Salim Fadhley

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:

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

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.

标记为“a”(Peak Private Bytes)的值是在任何瞬间分配给进程的最大内存量(实际物理内存和磁盘上的虚拟内存)。

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

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

alt text

替代文字

回答by Joey

From here:

这里

The working setis 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 bytesare] bytes, that this process has allocated that cannot be shared with other processes.

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

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

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

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

回答by mike

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.

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