Determining the Maximum Sizes of Kernel Memory Pools

While onsite with customers, I have found several more cases where the Windows Server 2003 32-bit is running dangerously low on kernel memory. Here lately it has been a lack of pool paged memory. In any case, you can use my earlier blog posts to estimate the kernel memory size. With that said, when you run into this issue, you need to really know what the real maximum sizes are. In this blog post, I will show you two relatively easy ways to get this information.

The memory pool usage in pool paged memory and pool non-paged memory should not exceed 80% of their respective maximums. The pool usage values are exposed the performance counters, “\Memory\Pool Paged Bytes” and “\Memory\Pool NonPaged Bytes”, but their maximum sizes can only be found by debugging the kernel. I know that debugging the kernel sounds very intimidating, but I assure you it is easy, but *dangerous* if you mess it up, so try this in a test environment first.

Getting Maximum Sizes for Pool Paged Bytes and Pool Non-Paged Bytes:

  1. Install the Microsoft Debugging Tools for Windows. This is a free download from https://download.microsoft.com. Installation of these tools does not require a reboot.
  2. Use Microsoft WinDBG or Process Explorer (both Microsoft tools):
    1. WinDBG method:
      1. Open WinDBG.
        1. Ensure the symbol path is set: Click File, “Symbol File Path…”. Ensure the following path is in place without the double quotes: “SRV*C:\symbols*https://msdl.microsoft.com/download/symbols”. Click OK.
        2. Click File, “Kernel Debug…”. Select the Local tab, then click OK.
        3. Select “No” to any Workspace dialog boxes.
        4. At the “lkd>” prompt, type “!vm”
          “PagedPool Maximum” is the maximum size for the Pool Paged memory.
          “NonPagedPool Max” is the maximum size for the Pool Non-Paged memory.
    2. Process Explorer method: This is preferred if you need to get the maximum pool sizes often.
      1. Download Process Explorer from:
        https://technet.microsoft.com/en-us/sysinternals/bb896653.aspx or run directly from https://live.sysinternals.com.
        No installation is required.
      2. Run procexp.exe.
      3. Ensure the symbol path is set: Click Options, “Configure Symbols…”
      4. Set the Symbols path to (without the double quotes):
        “SRV*C:\symbols*https://msdl.microsoft.com/download/symbols”
      5. Set the Dbghelp.dll path to the installation directory of the Debugging Tools for Windows. Default location is: “C:\Program Files\Debugging Tools for Windows\dbghelp.dll” Click OK.
      6. Click View, “System Information…”
      7. “Paged Limit” is the maximum size for the Pool Paged Memory.
        “Nonpaged Limit” is the maximum size for the Pool Non-Paged memory.
      8. If you need to get the maximum pool sizes again, then just follow steps 2, 6 and 7.