Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบ >> Windows Server

แก้ปัญหา Non-Paged Pool Memory Leak ใช้งาน RAM สูงผิดปกติ

Non-Paged Pool คือ RAM ที่ Kernel และ Drivers ใช้ ไม่สปไป Disk ปกติ 200-400 MB หากเกิน (เช่น 4 GB) แสดงว่า Memory Leak ใน Driver (มัก Network Driver)

อาการ

  • Task Manager → Performance → Memory → Non-paged pool สูงมาก
  • Event ID 2019 Source Srv: "The server was unable to allocate from the system nonpaged pool"
  • Max: x64 = 128 GB หรือ 75% RAM, x86 = 2 GB หรือ 75% RAM
  • Reboot ชั่วคราว แต่ Server 24/7 ต้องหา Root Cause

วิธีแก้ไข

1. ปิด Network Data Usage (NDU) Driver

Driver Ndu.sys ชนกับ Killer/MSI Network Driver บ่อย
sc config NDU start= disabled หรือ Registry: HKLM\SYSTEM\ControlSet001\Services\Ndu\Start = 4 → Reboot

2. หา Driver ที่ Leak ด้วย PoolMon (Windows Driver Kit)

  1. ติดตั้ง WDK → รัน Poolmon.exe → กด P (Nonpaged) → กด B (Sort by Bytes)
  2. ดู Tag ที่ใช้ Memory มาก (เช่น Nr22, ConT, smNp)
  3. หาไฟล์ Driver: findstr /m /l /s Nr22 %Systemroot%\System32\drivers\*.sys หรือ PowerShell Select-String -Path *.sys -Pattern "Nr22"
  4. Map Tag ใน PoolMon: poolmon /g (ต้องมี pooltag.txt)
  5. เช็ค Driver ด้วย sigcheck (Sysinternals) → Update/Reinstall/Uninstall Driver นั้น

3. อัปเดต Network Adapter Driver ล่าสุดจากเว็บ Vendor

หากปัญหาเกิดหลัง Windows Update Driver ให้ Rollback และปิด Auto Driver Update

4. ปิด Hyper-V Role (ถ้าไม่ใช้)

Server: Remove-WindowsFeature -Name Hyper-V
Client: Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All

5. ตรวจ User-mode Process

Task Manager → Details → Add Column "NP Pool" → หา Process ที่ใช้ Non-paged Pool มาก