【原创】Windows系统理解解析_备忘录_51Testing软件测试网

来源:百度文库 编辑:神马文学网 时间:2024/04/25 21:10:05

【原创】Windows系统内存计数器理解解析

2008-05-13 11:42:23/ 个人分类:性能测试

说明:本文的计数器以Windows2003为准。

序言
;F9n)\%V1a6Z C)?ZV0内存的使用情况是系统性能中重要的因素之一,频繁的页交换及内存泄露都会影响到系统的性能。本文主要是描述内存的一些概念、计数器含义,以及可能存在的性能瓶颈。
4Cd%l3r(T&zy051Testing软件测试网xi[8VP?r?Q?a
一些概念
f2c(qDw-y&{l0
1Vu7t|%D}r5eGx0
① “页交换”是使用称为“页面”的单位,将固定大小的代码和数据块从 RAM 移动到磁盘的过程,其目的是为了释放内存空间。51Testing软件测试网3tp8d!h!Te1Z*Y
② 每个Windows进程都拥有4G的虚拟地址空间,在多任务环境下,所有进程使用的内存总和可以超过物理内存。51Testing软件测试网i6sOT9l3g ]q)l`
③进程的一部分可能会从物理内存中删除而被暂存在硬盘的文件里(pagefile)。当进程试图访问这些被交换到pagefile里的内存的时候,系统会产生一个缺页中断(page fault),这时候Windows内存管理器会负责把对应的内存页重新从硬盘调入物理内存。51Testing软件测试网F+k0TQX4|GD@-h
④ 用于描述物理内存中虚拟页面子集的术语称为一个工作集(Working Set),也叫驻留集。一共有三种工作集:进程工作集、系统工作集、会话工作集。(具体概念看后面的计数器)
A3C` EB:P,l K0⑤ 非换页池:它是由一些“可保证总是驻留在物理内存中”的虚拟地址范围构成的,由于这些地址范围总是驻留在内存中,因此任何时候都可以访问它们,而不会招致页面错误。
4aDJ1W U{\0⑥ 换页池:系统空间中的一段虚拟内存区域,它可以被换入和换出系统。这两种内存池都位于系统地址空间部分,并且被映射到每个进程的虚拟地址空间中。51Testing软件测试网&vx9j(yji;lm
⑦ 共享内存:对于多个进程可见的内存,或者出现在多个进程虚拟地址空间中的内存。例如:如果两个进程使用了同样的DLL,那么只需将引用该DLL的代码页面加载到物理内存一次,然后所有映射了该DLL的进程之间共享这些页面。51Testing软件测试网5TNXb8@ xeT-M
⑧ MDL(Memory Descrīptor List)是一个结构体,用于描述一片内存区域中的所有物理内存页。51Testing软件测试网f`+\o?oy%s
51Testing软件测试网BN"|!vty
可能存在的性能问题
n*R&cX#Q%V1h4ce051Testing软件测试网#I6UA%l8xnE]S9oG
1、Memory\\Page Reads/sec过高,持续大于5。
;| v3Uy @e)zh0 
过多的页交换要使用大量的硬盘空间,很容易将导致将页交换内存不足与导致页交换的磁盘瓶径混淆。这就需要我们在研究内存不足不太明显的页交换的原因时,必须跟踪如下的磁盘使用情况计数器和内存计数器:Physical Disk\\ % Disk Time、Physical Disk\\ Avg.Disk Queue Length、Memory\\Page Reads/sec51Testing软件测试网8ohw NB7G\T
  ①如果Memory\\Page Reads/sec比较低,但Physical Disk\\% Disk Time and Physical Disk\\Avg. Disk Queue Length计数器很高,表明磁盘有瓶颈。
F2_[a,[0  ②如果随着Physical Disk\\Avg. Disk Queue Length的增加,而Memory\Page Reads/sec并没有减少,表明有内存的瓶颈。51Testing软件测试网?8@gI+sN1Mxo
51Testing软件测试网Y,Omb u%i[
2、内存泄露
Q*ktz"C^(i6i"cD?6X!P`0
 如果怀疑内存泄露,监视 Memory\\ Available Bytes 和 Memory\\ CommittedBytes,以观察内存行为,并监视可能存在泄露内存的进程的 Process\\Private Bytes、Process\\WorkingSet和Process\\Handle Count(Handle泄漏)。
vZU.Qp6P@zp4m0 如果怀疑是内核模式进程导致了泄露,则还应该监视 Memory\\Pool Paged Bytes、Process\\ Pool PagedBytes。(Memory\\Pool Paged Bytes与Process\\ Pool NonpagedBytes,有什么不同,期待告知)。51Testing软件测试网4x7WWb;]8Rnw"|:I
  可以通过PoolMon工具详细查看非换页池和换页池的详细使用情况。
MN#y!vd0U9u0  备注:这里只是随便提一下。

各计数器理解及描述
|CH6l*aY051Testing软件测试网(O!@`8c‘JJn5fz
1、Process\\Working Set
{7Q2BAgEMt0
含义:
w?MlOMB0q0进程工作集,是虚拟地址空间在物理内存中的那部分。包含了一个进程内的各个线程引用过的页面,即:Task Manager中的Mem Usage。
[ {+o5xalb0分析:
$H/PK{sf9u@+E0
由于每个进程工作集中包含了共享页面,所以Process\\Working Set(_Total)值会大于实际的总进程内存使用量。
G7t9^2V{T0
si:wyl/LDZo02、Process\\Private Bytes51Testing软件测试网6V&]zNdKH
含义:51Testing软件测试网*r‘E5[*o |+K
分配的私有虚拟内存总数,即私有的、已提交的虚拟内存使用量。即:Task Manager中的VM Size。
wZ5PW,n6wY;}0分析:51Testing软件测试网;OijY7@qRUz1e1c1j
内存泄露时表现的现象是私有虚拟内存的递增,而不是工作集大小的递增。在某个点上,内存管理器会阻止一个进程继续增加物理内存大小,但它可以继续增大它的虚拟内存大小。51Testing软件测试网(a$O?A7Y)~`G

8S}X+{{jR$ET03、Memory\\Available MBytes (Available Bytes、Available KBytes)
5dRv#@!I0
含义:51Testing软件测试网A2s?oZ%S
Available MBytes 是指以 MB 表示的可用物理内存量,此内存能立刻分配给一个进程或系统使用。它是空闲列表、零列表和备用列表的大小总和。51Testing软件测试网V5qw/s?m/JOo|U
分析: 51Testing软件测试网?C3p"b3{Rk9h
至少要有10% 的物理内存值,最低限度是4 MB。51Testing软件测试网rlwZ|:xy
页面状态:51Testing软件测试网PK,c$CDS!RUS
备用:页面原先属于某个工作集,但现在被去除了。该页面自从最后一次被写到磁盘后一直未被修改过,PTE(Page Table Entry)仍然指向该物理页面,不过已标记为无效的和正在转移中。
p&bwv [0空闲:页面是空闲的,但它包含了未特别指明的脏数据。(需要用零初始化,否则不能交给用户进程)
*_mOQ4@$`2` Q0零化:页面是空闲的,并且已经被零页面线程初始化为零了。
6Z\4@4jnGf1I:b{h0
%W%\0\;W:j$~Z$|0n04、Memory\\Page Faults/sec
8y9Q?Qz‘c+gk*H0
含义:51Testing软件测试网I#z?M+v.NEe;d
Page Faults/sec 是每秒钟出错页面的平均数量。由于每个错误操作中只有一个页面出错,计算单位为每秒出错页面数量,因此这也等于页面错误操作的数量。这个计数器包括硬错误(那些需要磁盘访问的)和软错误(在物理内存的其他地方找到的错误页)。许多处理器可以在有大量软错误的情况下继续操作。但是,硬错误可以导致明显的拖延,因为需要访问磁盘。
1]o.g8MBf t%sY0
A8M[L4fl/]] F,N05、Memory\\Page Reads/sec
‘Xk?g1]0lf7{&B0
含义:
Z9S7GD8RI3x5n{|0
PageReads/sec是读取磁盘以解析硬页面错误的次数。它显示读取操作的数量,它并不考虑每个操作的页面数量。当一个进程引用一个虚拟内存的页面,而此虚拟内存位于工作集以外或物理内存的其他位置,并且此页面必须从磁盘检索时,就会发生硬页面错误。此计数器是引起系统范围内延迟的主要指示器。它包含读取操作以满足文件系统缓存(通常由应用程序请求)和非缓存映射内存文件的错误。比较内存的值\\Pages Reads/sec 与内存的值\\Pages Input/sec 来决定每个操作取读的平均页面数量。51Testing软件测试网0}w$E4H{?1I
通俗含义:
U6a/^u$`\ _y0
页的硬故障,Page/sec的子集,是为了解决硬错误,从硬盘读取的次数。51Testing软件测试网7v#U.E-F"En#C
分析:
J(~/L+xfF0
阈值为>5,越低越好。大数值表示磁盘读而不是缓存读。持续大于5的值,表明内存的读请求发生了较多的缺页中断(page fault)。51Testing软件测试网?N8hJ hA-m!H#l^
说明进程的Working Set已经不够,使用硬盘来虚拟内存。此处为读得次数,不关心读取得页数,比较大的值表明内存出现了瓶颈。
rEp&i#D_0
v+{"s4d+}pc‘{+j06、Memory\\Page Writes/sec
^3o0dIR;F0
含义:
cN$v8l9B,Q[G0
Page Writes/sec 是指为了释放物理内存空间而将页面写入磁盘的速度。只有页面还在物理内存中时所做的更改才会写入磁盘,因此这些页面可能只保留数据而不保留代码。这个计数器显示写入操作,不计数每个操作中写入的页数。
c K!jgp0eA0
/U*Sf"oy@d"p?8G07、Memory\\Pages Input/sec51Testing软件测试网NaAH9V|T3?0[
含义:
A-]p/`^?E0
PagesInput/sec是以解析硬页面错误从磁盘读取的页数。当一个进程引用一个虚拟内存的页面,而此虚拟内存位于工作集以外或物理内存的其他位置,并且此页面必须从磁盘检索时,就会发生硬页面错误。当夜面发生错误时,系统尝试将多个连续页面读入内存以充分利用取读操作的优点。请比较 Memory\\PagesInput/sec 的值和 Memory\\Page Reads/sec 的值以便决定每个取读操作读入内存的平均页面数量。51Testing软件测试网i)i#CUP\Zy

&d3Kf o1}?4@{08、Memory\\Pages Output/sec
‘h‘I*v^2O;y#y.s0
含义:51Testing软件测试网t.t-Mq‘G6w-at
PagesOutput/sec是指为了释放物理内存空间而将页面写入磁盘的页数。只有在物理内存中更改时页面才会写回到磁盘上,因此页面可能只保留数据而不是代码。高速的页面输出可能表示内存不足。当物理内存不足时,Windows 会将页面写回到磁盘以便释放空间。
n6LcT?{0
u dW z ]X09、Memory\\Page/sec
51Testing软件测试网g#z0{mEE8u
含义:
7I,lw7qR e)kL|-fy0
Pages/sec是指为解决硬页错误从磁盘读取或写入磁盘的页数。这个计数器是可以显示导致系统范围延缓类型错误的主要指示器。它是 Memory\\PagesInput/sec 和 Memory\\Pages Output/sec的总和。是用页数计算的,以便在不用做转换的情况下就可以同其他页计数如: Memory\\Page Faults/sec做比较,这个值包括为满足错误而在文件系统缓存(通常由应用程序请求)的非缓存映射内存文件中检索的页。
4EZp$d/Lfcxt0分析:51Testing软件测试网!mvN_ hN‘C
一般如果pages/sec持续高于几百,那么您应该进一步研究页交换活动。有可能需要增加内存,以减少换页的需求(你可以把这个数字乘以4k就得到由此引起的硬盘数据流量) 。Pages/sec 的值很大不一定表明内存有问题,而可能是运行使用内存映射文件的程序所致。 51Testing软件测试网7`Kf/F.IcmNS9lb
51Testing软件测试网;z7jGe2t!i Lo C
10、Memory\\ % Committed Bytes In Use
‘wJnE~Q0
含义:51Testing软件测试网){5Wk:K3I }w)F
%CommittedBytes In Use 是 Memory\\Committed Bytes 与 Memory\\Commit Limit之间的比值。Committed memory是已在页面文件中保留空间的在用物理内存。Commit Limit是由页面文件的大小而决定的。如果扩大了页面文件,该比例就会减小。51Testing软件测试网jx0@&B1Y

cRI‘a.I-J-Xat3o0※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
eX(EmW051Testing软件测试网NNxXnRw
11、Memory\\ Committed Bytes
!o ov${l`qJp8^0
含义:51Testing软件测试网,I+_.u,a/P$}0G
Committed Bytes 是指已被提交的(不是保留的)虚拟内存字节数。此数并不一定代表页面文件的使用量,因为它包含了物理内存中从未被换出过的私有提交页面。当然,如果一个进程完全是非驻留的,则它代表所使用的页面文件数量。
-h4|?KC0对应Task Manager的PF使用 (Current Commit Charge) 。页面文件的使用量参见计数器:Paging File\\%Usage。51Testing软件测试网%T4M)T%o%nP
原文:
!X1AK@!p.W G!V!M:R0
Numberof bytes of virtual (not reserved) memory that has been committed. Thisnumber doesn’t necessarily represent page file usage because itincludes private committed pages in physical memory that have neverbeen paged out. Rather, it represents the amount of page file spacethat would be used if the process was completely made nonresident.
m,cGd]Isn0分析:
k-NAm6v:[c@Q&d0
NT的内存分配采用了两步走的方法,首先,在虚地址空间上保留一段空间,这时操作系统并没有分配物理内存,只是保留了一段地址。然后,再提交这段空间,这时操作系统才会分配物理内存。51Testing软件测试网"@+^?_:B1r
Windows的地址空间有三种状态。一种是COMMITED,表明该地址空间已和一块内存相联系;一种是RESERVED,表明该地址空间虽未与一块内存相联系但今后可能会用到,需要保留;一种是FREE,表明该地址空间与内存没有联系。51Testing软件测试网)`f3JtKz/Td
51Testing软件测试网8KP?h(F#mFv#|
12、Memory\\ Commit Limit
l_Wc3] z9CS0
含义:
xi\A*CU@v0
Commit Limit 是指无需扩展页面文件就可以提交的虚拟内存字节数。51Testing软件测试网@E9p-b9a:Z)XY
原文:
#p0~ A0hP‘xe5On0
Numberof bytes of virtual memory that can be committed without having toextend the paging files; if the paging files can be extended, thislimit is not hard.  51Testing软件测试网j-q_7S?t
Touse a reserved region of address space, you must allocate physicalstorage and then map this storage to the reserved region. This processis called committing physical storage. Physical storage is alwayscommitted in pages.

※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
$Dk7?.}MA9ze#`051Testing软件测试网Z7o1x;GL5J5G[K
13、Memory\\Pool Nonpaged Allocs
6WU }]^0Gp0
含义:51Testing软件测试网PRT9Do
Pool Nonpaged Allocs 指在换换页池中分派空间的调用数。它是用衡量分配空间的调用数来计数的,而不管在每个调用中分派的空间数是多少。
~m FT}ZwX0原文:51Testing软件测试网M&Ne+m m!z~
Showsthe number of calls to allocate space in the nonpaged pool. Thiscounter is measured in numbers of calls to allocate space, regardlessof the amount of space allocated in each call.
*^T po"q0分析:
2{"h/p;qIms0
考察其自系统启动以来的增长了10%以上,如果是,表明有潜在的严重瓶颈。
.}@Z0@‘]8_(v0需要观察Server\\Pool Nonpaged Failures,非页面池分配失败的次数。非零表示计算机的物理内存太小。51Testing软件测试网Uyun,^:WX
51Testing软件测试网,N:^`-i:T%MbXs
14、Memory\\Pool Nonpaged Bytes
`!A a:};i*F0含义:
51Testing软件测试网LDKF:t‘R
Pool Nonpaged Bytes 指在非换页池中的字节数,非换页池是指系统内存(操作系统使用的物理内存)中可供对象(指那些在不处于使用时不可以写入磁盘上而且只要分派过就必须保留在物理内存中的对象)使用的一个区域。51Testing软件测试网9?0GU[3Bm
疑问:Memory\\Pool Nonpaged Bytes 的计数方式与 Process\\Pool Nonpaged Bytes 的计数方式有什么不同。
ma2J?}kXz4{l0通俗含义:
7Gm/ud^(X G.V0非换页池中的当前大小,即Task Manager中的Kernel Memory→NonPaged。51Testing软件测试网8q(k&[6e4S5i(I@i6?
51Testing软件测试网(MC%EH LL)v4Y(C+J?\
15、Memory\\Pool Paged Allocs
Vk%iimmLN)mOp&g0含义:
)C%N)WonbE]0
Pool Paged Allocs 指在换页池中分派空间的调用次数。它是用计算分配空间的调用次数来计算的,而不管在每个调用中分派的空间数是什么。51Testing软件测试网Qw1O;d`M#i
原文:
PD%TQ5?/|}:h0
Showsthe number of calls to allocate space in the paged pool. This counteris measured in numbers of calls to allocate space, regardless of theamount of space allocated in each call. 51Testing软件测试网6S2N6q2M9Gt&B0dRC/o

-u_ d @5l‘y/l016、Memory\\Pool Paged Bytes
.?e#~1SU.V0含义:51Testing软件测试网$G9r)o8?$B&b
Pool Paged Bytes 指在换页池中的字节数,换页池是系统内存(操作系统使用的物理内存)中可供对象(在不处于使用时可以写入磁盘的)使用的一个区域。51Testing软件测试网/yM;[;Eo0r;`5C;\
疑问:Memory\\Pool Paged Bytes 的计数方式与 Process\\Pool Paged Bytes 的方式有什么不同。
5A%[5d4IkeSH(oV@?M0通俗含义:
Oh`D3\?3o0换页池的当前虚拟大小,即Task Manager中的Kernel Memory→Paged Virtual。51Testing软件测试网us.D{$O,Z9w&W
换页池的当前物理(驻留)大小参见计数器Memory\\Poll Paged Resident Bytes。51Testing软件测试网|om+u FD2{?mL
分析:
[6[%O@0xo!`nf0也需要观察Server\\Pool Paged Failures,页面池分配失败的次数。非零表示计算机的物理内存或页面文件太小。

※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
GHS?J4_051Testing软件测试网3JL,?V6]6G\Wt~T
17、Memory\\ Cache Bytes
D!vO(t+j‘@mWZ0含义:
51Testing软件测试网_ ok8_i,[v
系统工作集的总大小,其包括以下代码或数据驻留在内存中的那一部分:系统缓存、换页内存池、可换页的系统代码(Ntoskrnl.exe和驱动程序),以及系统映射的视图。
/s?j/Z?A‘_T0分析:51Testing软件测试网pPmE3xc(J#U
从字面意思上看,仅仅是指系统缓存,其实不然。
#z M o%K+_,|+wn0CacheBytes Memory\\System Cache Resident Bytes、Memory\\System DriverResident Bytes、Memory\\System Code Resident Bytes 和 Memory\\Pool PagedResident Bytes的总和。
8x7m,f$QA‘s0
)hs&[qT#P5g018、Memory\\Cache Bytes Peak
6k"dQ%_K,L%b4n+iGf0含义:
#~ dWfy?q d0
Cache Bytes Peak 是系统启动后文件系统缓存使用的最大字节数量。这可能比当前的缓存量要大。这个计数器只显示上一次观察到的值;它不是一个平均值。 51Testing软件测试网v&{^H"{Zm4g
原文:
/FW)c‘dI/f0Showsthe maximum number of bytes used by the file system cache since thesystem was last started. This might be larger than the current size ofthe cache.
g].i~$lst0
0L ezC_^J#X.~b019、Memory\\Cache Faults/sec
i$czR t9o&h/i8@D0含义:51Testing软件测试网V/O3^sXZY
Cache Faults/sec 指在文件系统缓存中找不到要寻找的页而需要从内存(软错误)的其他地方或从磁盘(硬错误)的其他上检索时出现的错误的速度。文件系统缓存活动是大部分应用程序 IP 操作的可靠指示51Testing软件测试网_.c&c\*h?TB1w[
器。这个计数器显示错误的次数而不管每次操作中的出错的页数。51Testing软件测试网&h&`#_"Ac*L(a
原文:
1dp8Z;`*}~5D_0Showsthe rate, in incidents per second, at which faults occured when a pagethat was sought in the file system cache was not found and was beretrieved either from elsewhere in memory (a soft fault) or from disk(a hard fault). This counter shows the total number of faults, withoutregard for the number of pages faulted in each operation.
OU0zQ8bL3E0分析:51Testing软件测试网5UbiR#Q
从文件系统缓存中查找数据,未命中的次数。这个值应该尽可能的低,较大的值表明内存出现短缺,缓存命中很低。
rzCA1B?C,P$~i0同时需要观察Cache\MDL Read Hits%,MDL Read Hits 是指 Memory Descrīptor List 向文件系统缓存发出的请求命中缓存的百分比,例如:不需要磁盘访问即可为在缓存中的页面提供内存访问。
kr{ n5v}o;?0值越大(接近100%),表明文件系统缓存效果越好。51Testing软件测试网Nj`^,p-APc*B

9? @Tq.xF~020、Memory\\Demand Zero Faults/sec
d9KE2DtVP0含义:
GX5t.j6M _0
DemandZero Faults/sec通过零化页面来弥补分页错误的平均速度。这个计数器显示最近两个保留取样值的差,再除以取样间隔。零化页面是指先清空以前的资料,再将页面用0来填满,这是Windows NT的安全性功能,这样可以防止以前的资料外泄。这个计数器显示的是错误数量,而不是重新获取的页面数量。
j]:b.^WV^0原文:
mp6n;s&A,]0Showsthe average rate, in incidents per second, at which page faultsrequired a zeroed page to satisfy the fault. This counter displays thedifference between the values observed in the last two samples, dividedby the duration of the sample interval. Zeroed pages (pages emptied ofpreviously stored data and filled with zeroes) prevent processes fromseeing data stored by earlier processes that used the same memoryspace. This counter displays the number of faults, without regard tothe number of pages retrieved to satisfy the fault. 51Testing软件测试网NB3iP$jiUc4v1V
51Testing软件测试网"UY:q)RNy"V @x
21、Memory\\Free System Page Table Entries 51Testing软件测试网p,?fY;I
含义:51Testing软件测试网(Ot m‘I.Ba*Z zu
Free System Page Table Entries 指系统没有使用的页表项目。这个计数值仅显示上一次的值,而不是一个平均值。
5CUYR"Y:A0原文:51Testing软件测试网B/Pa;Fv;T
Shows the number of page table entries not in use by the system.
(G*};P oz$N‘[051Testing软件测试网,IdH"E/[^K-P+UV(|
22、Memory\\Pool Paged Resident Bytes
!OGVw,Te][‘dV;w?a0含义:51Testing软件测试网Z pA)R‘~]L8A
换页池所使用的物理内存,即Task Manager中的Kernel Memory→Paged Physical。51Testing软件测试网7} KDTe1Q"L}5nK

Y7y7^sZ DI023、Memory\\System Cache Resident Bytes 51Testing软件测试网;uF UY7h9x+i!{ n?R
含义:51Testing软件测试网g‘l&I:~E3f8DQJw
System Cache Resident Bytes 是文件系统缓存可换页的操作系统代码的字节大小。此值只包括当前的物理页面,而不包括当前未使用的虚拟内存页面。它不等于“任务管理器”上显示的系统缓存值。因此,此值会比文件系统缓存使用的实际虚拟内存要小。此值是 Memory\\System Code Resident Bytes 的组件,它代表当前在物理内存里的所有可换页的操作系统代码。 51Testing软件测试网 yYZ/`&n+t
原文:
`D4k0e$\n*pP0Showsthe size, in bytes, of pageable operating system code in the filesystem cache. This value includes only current physical pages and doesnot include any virtual memory pages that are not currently resident.It does not equal the System Cache value shown in Task Manager. As aresult, this value may be smaller than the actual amount of virtualmemory in use by the file system cache. This value is a component ofSystem Code Resident Bytes that represents all pageable operatingsystem code that is currently in physical memory. 51Testing软件测试网7_ u*p8P3cI5?
通俗含义:
@‘X\ui l0@4TA0系统缓存所使用的物理内存。51Testing软件测试网$[,W;i}9\/NiE|

k c?{&z5t*gpF+u qP024、Memory\\System Code Resident Bytes
)Fe"C k[N!ehY0含义:51Testing软件测试网,bRU}@.q!CU
SystemCode Resident Bytes 是操作系统代码当前在物理内存的字节大小,此物理内存在未使用时可写入磁盘。此值是Memory\\System Code Total Bytes 的组件,它还包括磁盘上的操作系统代码。Memory\\System CodeResident Bytes (和 Memory\\System Code Total Bytes)不包括必须留在物理内存的代码,并且不能写入磁盘。51Testing软件测试网L;G*M!DKA4w
原文:
fbm$M.tLL0Showsthe size, in bytes, of operating system code currently in physicalmemory that can be written to disk when not in use. This value is acomponent of System Code Total Bytes, which also includes operatingsystem code on disk. System Code Resident Bytes (and System Code TotalBytes) does not include code that must remain in physical memory. 51Testing软件测试网c)u+CQ3m.H jD
通俗含义:
i+v L^%t-q7y)h0Ntoskrnl.exe中可换页代码所使用的物理内存。
(qc#{Uq5@0
~lf*W.n%h.m?}e {025、Memory\\System Code Total Bytes
y?A HCypb,I0含义:
/G p5^/sQuy4Ki&E6e9S0
SystemCode Total Bytes指当前在虚拟内存中的可换页的操作系统代码的字节数。这是用来衡量在不使用时可以写入到磁盘上的操作系统使用的物理内存的数量。这个值是通过将在Ntoskrnl.exe, Hal.dll 、启动驱动器和用 Ntldr/osloader加载的文件系统中的字节的数相加得出的。这个计数器不包括必须保留在物理内存中并不能写入到磁盘上的代码。
#qcDW%_f(X*k0原文:51Testing软件测试网 p.OPF4@9eeS~
Showsthe size, in bytes, of pageable operating system code currently invirtual memory. It is a measure of the amount of physical memory beingused by the operating system that can be written to disk when not inuse. This value is calculated by adding the bytes in Ntoskrnl.exe,Hal.dll, the boot drivers, and file systems loaded by Ntldr/osloader.This counter does not include code that must remain in physical memory.
!o(KzC?m q051Testing软件测试网U+xP:f ]Al7qp`"u~
26、Memory\\System Driver Resident Bytes 51Testing软件测试网*h;qiDmIG
含义:
0T/AvH;h$t0
System Driver Resident Bytes 指设备驱动程序当前使用的可换页的物理内存的字节数。它是驱动程序的工作集(物理内存区域)。这个值为 Memory\\System Driver Total Bytes (也包括可以写入磁盘的驱动程序51Testing软件测试网u1Q6D.[[u!M
内存)的组件。无论 System Driver Resident Bytes 还是 System Driver Total Bytes都包括不能写入磁盘的物理内存。 51Testing软件测试网&@3M9|@QcB$?;Ro
原文:51Testing软件测试网!Y)`3z7jt}
Showsthe size, in bytes, of pageable physical memory being used by devicedrivers. The counter is the working set (physical memory area) of thedrivers. This value is a component of System Driver Total Bytes, whichalso includes driver memory that has been written to disk. NeitherSystem Driver Resident Bytes nor System Driver Total Bytes includesmemory that cannot be written to disk. 51Testing软件测试网Ep6li_
通俗含义:
%z\/~!dvJ7u e}‘?l0可换页的设备驱动程序代码所使用的物理内存。
zLiaZr051Testing软件测试网‘i)[X\X8{%AD
27、Memory\\System Driver Total Bytes51Testing软件测试网b(yyj7Td6c"r
含义:
0h1Y~-X.r_2M4T ~e u0
SystemDriver Total Bytes指设备驱动程序当前使用的可换页的虚拟内存的字节数。当不使用时可换页内存可以写入磁盘。它包括物理内存(Memory\\System DriverResident Bytes)和代码以及写到磁盘中的数据。它是Memory\\System Code Total Bytes 的一个组件。
k-gV$k*o0原文:
j+W?PKn1SF0
Showsthe size, in bytes, of pageable virtual memory currently being used bydevice drivers. Pageable memory can be written to disk when it is notbeing used. It includes physical memory (System Driver Resident Bytes)and code and data written to disk. This counter is a component ofSystem Code Total Bytes.
u-Nmp nMdshl051Testing软件测试网:s8s0avP ]N*s1m^
28、Memory\\Transition Faults/sec
sRYH9m6] X0含义:51Testing软件测试网krf%q/D5]
Transition Faults/sec是在没有额外磁盘运行的情况下,通过恢复页面来解决页面错误的速度。页面错误包括页面正被另一个共享此页面的进程使用,或在被修改的页面列表上或待机列表上,或在发生页面错误时正被写入磁盘。该技术器也等于错误的页面数量,因为每一操作只有一个页面错误。 51Testing软件测试网iBT#{5M A
原文:
3qj9H?O8V ^K `0Showsthe rate, in incidents per second, at which page faults were resolvedby recovering pages without additional disk activity, including pagesthat were being used by another process sharing the page, or that wereon the modified page list or the standby list, or that were beingwritten to disk at the time of the page fault. This counter is alsoequal to the number of pages faulted because only one page is faultedin each operation. 51Testing软件测试网5|y?s ]
分析:
H/I4Ty%v0如果这个指标持续的居高不下说明内存存在瓶颈,应该考虑增加内存。
/X?s+k[!k)G0
3S}nlY)Y.Q029、Memory\\Write Copies/sec 51Testing软件测试网}a0By%Y,V+Gt
含义:
‘X{;R.^@GP N0
Write Copies/sec 是指通过从物理内存中的其他地方复制页面来满足写入尝试而引起的页面错误速度。由于页面只在被写入时才被复制,这是一个实用的共享数据方式;另外该页面是共享的。这个计数器显示的是复制次数,不考虑每次操作时中被复制的页面数。51Testing软件测试网XrF*Mb[Q7[
原文:
:Hv}-c!KL‘X|7o0Showsthe rate, in incidents per second, at which page faults were caused byattempts to write that were satisfied by copying the page fromelsewhere in physical memory. This is an economical way of sharing datasince pages are only copied when they are written to; otherwise, thepage is shared. This counter shows the number of copies, without regardto the number of pages copied in each operation. 51Testing软件测试网.zp,e(OF-Z8gW
分析:51Testing软件测试网‘K2UfK0L
就是写时复制错误的比率。写时复制页面保护机制是一种优化,内存管理器利用它可以节约内存。
m+O)\x K8N}4d1H4DWl0例如:两个进程正在共享三个页面,每个页面都被标记为写时复制,当其中一个进程的任一线程对一个页面执行写操作,则会产生一个内存管理错误。内存管理器不会将该错误报告为访问违例,而是在物理内存中分配一个新的读/写页面,并将原始页面中的内容拷贝到新的页面中,同时更新该进程对应的页面映射信息,使之指向新的页面位置,然后解除异常,从而继续进行刚才的写指令。写操作成功,新拷贝的页面现在对于执行写操作的进程来说是私有的,对于其他进程是不可见的。
^0_)DQJ"v&m0
VKa DoUa‘?0后序
*s:gW1HAD0
本人参考《深入解析Windows操作系统》和网上的一些资料,通过自己的理解,形成了上文,有什么不足之处,敬请提出。51Testing软件测试网$^(G Wo}]4i\
51Testing软件测试网!d&U4G]J9F‘[^M
附:Task Manager说明

51Testing软件测试网"ot-_?T‘P(e-l

F6LQqG[)t A?Y0物理内存:51Testing软件测试网] Q^cHu!})hi
总数(2088268):实际可用的物理内存;
n;`d e*F0可用数(1176636):备用列表、空闲列表、零列表的总值大小;51Testing软件测试网!cw&p~_D ?1xY
系统缓存(1230280):备用列表+系统工作集;51Testing软件测试网4I_:j U7Z2A#E2E,]
51Testing软件测试网1O-`-a8Z;D
内存使用:51Testing软件测试网.BI uFG;|
总数(926572):提交的总虚拟内存;
)yL`:k4Y‘Y0限制(5068816):在不扩展页面文件的情况下最大的虚拟内存;51Testing软件测试网WKpP"|

#h4H{U&U h6|s#c0核心内存:
+je?Zr6]0分页数(95784):换页池的虚拟大小;
QH%g-|#oo:f0未分页(30552):非换页池的物理大小。