fivelake
驱动牛犊
驱动牛犊
  • 注册日期2005-12-16
  • 最后登录2017-04-29
  • 粉丝0
  • 关注0
  • 积分17分
  • 威望92点
  • 贡献值0点
  • 好评度2点
  • 原创分0分
  • 专家分0分
  • 社区居民
阅读:2019回复:4

为什么nonpagedpool的大小要超过paged pool?

楼主#
更多 发布于:2008-07-31 10:41
下面是我机器上的用!vm查出来的结果。发现NonPagedPool居然打到200M,而PagedPool只有可怜的160M。不是说NonPagedPool是有限资源么?
我查过注册表。HKLM\SYSTEM\CurrentControlSet\ Control\Session Manager\Memory Management\NonPagedPoolSize和HKLM\SYSTEM\CurrentControlSet\ Control\Session Manager\ Memory Management\PagedPoolSize都是0,所以这两个值应该是OS系统自己算出来的。
我的机器是WinXP SP2



*** Virtual Memory Usage ***
    Physical Memory:      261688 (   1046752 Kb)
    Page File: \??\C:\pagefile.sys
      Current:   1572864 Kb  Free Space:   1548908 Kb
      Minimum:   1572864 Kb  Maximum:      3145728 Kb
    Available Pages:      181287 (    725148 Kb)
    ResAvail Pages:       194730 (    778920 Kb)
    Locked IO Pages:          51 (       204 Kb)
    Free System PTEs:     183765 (    735060 Kb)
    Free NP PTEs:          32767 (    131068 Kb)
    Free Special NP:       24854 (     99416 Kb)
    Modified Pages:          529 (      2116 Kb)
    Modified PF Pages:       529 (      2116 Kb)
    NonPagedPool Usage:     1316 (      5264 Kb)
    NonPagedPool Max:      52945 (    211780 Kb)
    PagedPool 0 Usage:      5740 (     22960 Kb)
    PagedPool 1 Usage:       559 (      2236 Kb)
    PagedPool 2 Usage:       537 (      2148 Kb)
    PagedPool 3 Usage:       543 (      2172 Kb)
    PagedPool 4 Usage:       560 (      2240 Kb)
    PagedPool Usage:        7939 (     31756 Kb)
    PagedPool Maximum:     40960 (    163840 Kb)
    Shared Commit:          1428 (      5712 Kb)
    Special Pool:           1003 (      4012 Kb)
    Shared Process:         2239 (      8956 Kb)
    PagedPool Commit:       7939 (     31756 Kb)
    Driver Commit:          1435 (      5740 Kb)
    Committed pages:       53049 (    212196 Kb)
    Commit limit:         629866 (   2519464 Kb)
Leonsoft
驱动小牛
驱动小牛
  • 注册日期2003-05-08
  • 最后登录2012-08-11
  • 粉丝1
  • 关注0
  • 积分21分
  • 威望281点
  • 贡献值1点
  • 好评度103点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2008-08-02 12:10
The paged pool is exactly what its name implies: a region of virtual memory that is subject to paging. The size of the paged pool is limited and depends on both the amount of available physical memory on each individual machine and the specific operating system release. For example, the maximum size of the paged pool is about 491 MB on 32-bit hardware running Windows XP and about 650 MB on Windows Server 2003 SP1.
The nonpaged pool is a region of system virtual memory that is not subject to paging. Drivers use the nonpaged pool for many of their storage requirements because it can be accessed at any IRQL. Like the paged pool, the nonpaged pool is limited in size. On a 32-bit x86 system that is started without the /3GB switch, the nonpaged pool is limited to 256 MB; with the /3GB switch, the limit is 128 MB. On 64-bit systems, the nonpaged pool currently has a limit of 128 GB.
I will do the best with what the God gave me.
fivelake
驱动牛犊
驱动牛犊
  • 注册日期2005-12-16
  • 最后登录2017-04-29
  • 粉丝0
  • 关注0
  • 积分17分
  • 威望92点
  • 贡献值0点
  • 好评度2点
  • 原创分0分
  • 专家分0分
  • 社区居民
板凳#
发布于:2008-08-02 13:05
To Leonsoft
     你说的我都知道,但是你也可以从这段说明nonpage应该是一种稀有资源,而主要的内存分配应该都是在paged pool当中。
    但是,在实际当中,默认情况下,微软给nonpaged pool的size要大于paged pool。这个和他的说明是完全相反的。这个才是我的问题。OS为什么在默认情况下,给nonpaged pool的size要大于paged pool的size。
   我们在驱动开发中出现过,paged pool被分配光了,而nonpaged pool却只用了1/30,也就是说,还有160多M nonpaged pool。  这个也是和微软的文档说明相反的。
zjan521
驱动牛犊
驱动牛犊
  • 注册日期2002-10-02
  • 最后登录2010-07-20
  • 粉丝0
  • 关注0
  • 积分3分
  • 威望91点
  • 贡献值0点
  • 好评度74点
  • 原创分0分
  • 专家分0分
地板#
发布于:2008-08-04 20:03
NonPaged 是总数确定有限的, 而Paged 实际上因为可以和磁盘交换, 逻辑上的数量要大很多. paged分配光了只是性能受影响或者应用受影响, 而 nonpaged 分配光了就已经踏进鬼门关了。

稀有的意思其实就是要珍惜。能不用就不用。
fivelake
驱动牛犊
驱动牛犊
  • 注册日期2005-12-16
  • 最后登录2017-04-29
  • 粉丝0
  • 关注0
  • 积分17分
  • 威望92点
  • 贡献值0点
  • 好评度2点
  • 原创分0分
  • 专家分0分
  • 社区居民
地下室#
发布于:2008-08-05 11:19
To zjan521
   Paged Pool虽然是可以交换的,但是你不能超过上面列出的Paged Pool的大小,我在驱动中试验国,当我开始分配的时候,Paged Pool最大160M,已经使用80M,这个时候,你最多可以分配60M。超过60M,系统就不分配了,这个时候,就不能说性能受影响了吧,如果没有很好的处理,那么系统也已经踏进鬼门关了。而这个时候,我检查发现NonPage Pool,却还有180多M。
游客

返回顶部