На компьютерах и серверах Windows могут возникать проблемы с исчерпанием свободной памяти, вызванной утечкой некого системного драйвера, хранящего свои данные в невыгружаемом пуле памяти системы. Невыгружаемый пул памяти (Non-paged memory) – это данные в оперативной памяти компьютера, используемые ядром и драйверами операционной системой, которая никогда не выгружается на диск (в своп/ файл подкачки), т.е. всегда находится в физической RAM памяти.
Текущий размер невыгружаемого пула памяти можно увидеть в диспетчере задач Windows на вкладке Perfomance (Производительность) в разделе Memory (Память). На скриншоте ниже видно, что практически вся память на сервере занята, и большая часть ее относится к невыгружаемому пулу 4,2 Гб (Non-paged pool / Невыгружаемый пул). В нормальном состоянии размер невыгружаемого пула редко превышает 200-400 Мб. Большой размер невыгружаемого пула часто указывает на наличии утечки памяти в каком-то системном компоненте или драйвере.
При утечке памяти в невыгружаемом пуле на сервере, в системном журнале событий появится события:
Event ID: 2019
Source: Srv
Description:
The server was unable to allocate from the system nonpaged pool because the pool was empty
В подавляющем большинстве случаев причиной такой утечки памяти является проблема со сторонними драйверами, установленными в Windows. Как правило, это сетевые драйвера. Обратите внимание, как ведет себя пул при скачивании больших файлов (скорее всего он при этом быстро растет).
Максимальный размер невыгружаемого пула в Windows:
- Windows x64 до 128 Гб и не более 75% физической памяти
- Windows x86 до 2 Гб и не более 75% RAM
Для очистки пула помогает только перезагрузка, и, если для домашнего компьютера это еще может быть приемлемо, то на круглосуточно работающем сервере желательно найти нормальное решение.
Содержание:
- Установка последних версий драйверов сетевых адаптеров
- Отключение драйвера мониторинга сетевой активности Windows
- Отключение роли Hyper-V
- Поиск драйвера, вызвавшего утечку памяти с помощью Poolmon
Установка последних версий драйверов сетевых адаптеров
Попробуйте скачать и установить последние версии драйверов ваших сетевых адаптеров с сайта производителя.
Если у вас в Windows включено автоматическое обновление драйверов, убедитесь не начались ли проблемы после установки новых драйверов. Попробуйте откатить версию драйвера на более старую и проверить, воспроизводится ли проблема. Если проблема решилась, отключите авто обновление драйверов.
Отключение драйвера мониторинга сетевой активности Windows
Достаточно часто причиной утечки памяти в невыгружаемый пул является несовместимость драйвера мониторинга сетевой активности (Network Data Usage — NDU, %WinDir%\system32\drivers\Ndu.sys) с драйверами сетевого адаптера компьютера (чаще всего конфликтуют драйвера для сетевых карт Killer Network и MSI). Данный сервис можно отключить без особых потерь функционала Windows.
Службу можно остановить командной:
sc config NDU start= disabled
Либо через реестр:
- Откройте редактор реестра regedit.exe
- Перейдите в ветку HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Ndu\
- Измените значения параметра Start на 4.
После внесения изменений нужно перезагрузить компьютер
Отключение роли Hyper-V
В некоторых случаях утечку памяти в невыгружаемый пул вызывает установленная роль Hyper-V. Если эта роль не нужна, рекомендуем отключить ее.
В Windows Server Hyper-V роль можно отключить командой:
Remove-WindowsFeature -Name Hyper-V
Команда для Windows 10:
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
Поиск драйвера, вызвавшего утечку памяти с помощью Poolmon
Если описанные выше способы не помогли, можно попробовать определить драйвер, который вызвал утечку памяти в невыгружаемый пул.
Для этого нам понадобится консольная утилита Poolmoon.exe, входящая в комплект разработки Windows Driver Kit (WDK). Скачайте с сайта Microsoft и установите WDK для вашей версии Windows и запустите утилиту Poolmon.exe (в WDK для Windows 10 утилита находится в каталоге
C:\Program Files (x86)\Windows Kits\10\Tools\
).
После запуска утилиты Poolman.exe нажмите клавиши P. Во втором столбце останутся теги процессов, которые используют невыгружаемую память (атрибут Nonp) Затем нажмите клавишу B, чтобы выполнить сортировку по столбцу Bytes.
В левом столбце указаны теги драйверов. Ваша задача определить файл драйвера, использующего этот тег. В нашем примере видно, что больше всего RAM в невыгружаемом пуле используют драйвера с тегами Nr22, ConT и smNp.
Вы должны проверить драйвера на наличие найденных тегов с помощью утилиты strings.exe (от Sysinternals), с помощью встроенной команды findstr или с помощью PowerShell.
Следующие команды должны найти файлы драйверов, связанные с найденными вами тегами. данными процессами можно командами:
findstr /m /l /s Nr22 %Systemroot%\System32\drivers\*.sys
findstr /m /l /s ConT %Systemroot%\System32\drivers\*.sys
findstr /m /l /s smNp %Systemroot%\System32\drivers\*.sys
Также можно воспользоваться PowerShell:
Set-Location "C:\Windows\System32\drivers"
Select-String -Path *.sys -Pattern "Nr22" -CaseSensitive | Select-Object FileName -Unique
Select-String -Path *.sys -Pattern "Py28" -CaseSensitive | Select-Object FileName -Unique
Select-String -Path *.sys -Pattern "Ne40" -CaseSensitive | Select-Object FileName –Unique
Вы можете отобразить файлы драйверов непосредственно в poolmon.exe. Для этого убедитесь, что в каталоге утилиты находится файл pooltag.txt. Его можно скопировать из каталога установки WDK или найти в GitHub. Запустите утилиту:
Poolmon /g
Обратите внимание, что имя драйвера теперь отображается в столбце Mapped_driver.
Если поиск не дал результатов, проверьте возможно утечка памяти вызвана не системным процессом. Запустите Task Manager, перейдите на вкладку Details, добавьте колонку NP Pool и найдите процессы с большим размером памяти в невыгружаемом пуле.
Таким образом, мы получили список файлов драйверов, которые могут оказаться причиной проблемы. Теперь по именам файлов нужно определить, к каким драйверам и системным компонентам они относятся. Для этого можно воспользоваться утилитой sigcheck от Sysinternals.
sigcheck C:\Windows\System32\drivers\rdyboost.sys
Утилита возвращает имя драйвера, его свойства и информацию о версии.
Теперь можно попытаться удалить/обновить/переустановить проблемный драйвер или службу.
Если утечка памяти привела к BSOD, вы можете определить проблемный драйвер по файл дампа памяти.
- Загрузите дамп памяти в отладчик Windbg;
- Выполните команду:
!vm - Если значение NonPagedPool Usage больше чем Max, это говорит о том, что невыгружаемый пул исчерпан;
- Проверьте содержимое пула командой (результаты будут отсортированы по использованию невыгружаемого пула):
!poolused 2 - После получение тега драйвера найдите файл с помощью findstr или strings как описано выше.
Данная инструкция применима как для Windows Server 2019/2016/2012R2, так и для клиентских Windows 10, 8.1.
This service provides network data usage monitoring functionality.
Default Settings
| Startup type: | Automatic |
| Display name: | Windows Network Data Usage Monitoring Driver |
| Service name: | Ndu |
| Service type: | kernel |
| Error control: | normal |
| Path: | %SystemRoot%\system32\drivers\Ndu.sys |
| Registry key: | HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Ndu |
Default Behavior
Windows Network Data Usage Monitoring Driver is a kernel device driver. In Windows 10 it is starting automatically when the operating system starts. If Windows Network Data Usage Monitoring Driver fails to start, the failure details are being recorded into Event Log. Then Windows 10 will start up and notify the user that the Ndu service has failed to start due to the error.
Dependencies
Windows Network Data Usage Monitoring Driver cannot be started under any conditions, if the TCP/IP Protocol Driver service is disabled.
Restore Default Startup Configuration of Windows Network Data Usage Monitoring Driver
Before you begin doing this, make sure that all the services on which Windows Network Data Usage Monitoring Driver depends are configured by default and function properly. See the list of dependencies above.
1. Run the Command Prompt as an administrator.
2. Copy the commands below, paste them into the command window and press ENTER:
sc config Ndu start= auto
sc start Ndu
3. Close the command window and restart the computer.
The Ndu service is using the Ndu.sys file that is located in the C:\Windows\system32\drivers directory. If the file is removed or corrupted, read this article to restore its original version from Windows 10 installation media.
This service provides network data usage monitoring functionality.
This service also exists in Windows 11 and 8.
Startup Type
| Windows 10 version | Home | Pro | Education | Enterprise |
|---|---|---|---|---|
| 1507 | Automatic | Automatic | Automatic | Automatic |
| 1511 | Automatic | Automatic | Automatic | Automatic |
| 1607 | Automatic | Automatic | Automatic | Automatic |
| 1703 | Automatic | Automatic | Automatic | Automatic |
| 1709 | Automatic | Automatic | Automatic | Automatic |
| 1803 | Automatic | Automatic | Automatic | Automatic |
| 1809 | Automatic | Automatic | Automatic | Automatic |
| 1903 | Automatic | Automatic | Automatic | Automatic |
| 1909 | Automatic | Automatic | Automatic | Automatic |
| 2004 | Automatic | Automatic | Automatic | Automatic |
| 20H2 | Automatic | Automatic | Automatic | Automatic |
| 21H1 | Automatic | Automatic | Automatic | Automatic |
| 21H2 | Automatic | Automatic | Automatic | Automatic |
| 22H2 | Automatic | Automatic | Automatic | Automatic |
Default Properties
| Display name: | Windows Network Data Usage Monitoring Driver |
| Service name: | Ndu |
| Type: | kernel |
| Path: | %WinDir%\system32\drivers\Ndu.sys |
| Error control: | normal |
Default Behavior
The Windows Network Data Usage Monitoring Driver service is a kernel mode driver. If Windows Network Data Usage Monitoring Driver fails to start, the error is logged. Windows 10 startup proceeds, but a message box is displayed informing you that the Ndu service has failed to start.
Dependencies
Windows Network Data Usage Monitoring Driver is unable to start, if the TCP/IP Protocol Driver service is stopped or disabled.
Restore Default Startup Type of Windows Network Data Usage Monitoring Driver
Automated Restore
1. Select your Windows 10 edition and release, and then click on the Download button below.
2. Save the RestoreWindowsNetworkDataUsageMonitoringDriverWindows10.bat file to any folder on your hard drive.
3. Right-click the downloaded batch file and select Run as administrator.
4. Restart the computer to save changes.
Note. Make sure that the Ndu.sys file exists in the %WinDir%\system32\drivers folder. If this file is missing you can try to restore it from your Windows 10 installation media.
Yea, though I walk through the valley of the shadow of death, I will fear no evil: for thou art with me; thy rod and thy staff they comfort me.
The original Ndu.sys is an important part of Windows and rarely causes problems. The file Ndu.sys is the Windows Network Data Usage Monitoring Driver file and is located in the C:\Windows\System32\drivers folder and the process is known as Windows Network Data Usage Monitoring Driver. If you’re encountering the Ndu.sys Blue Screen error on your Windows 11/10 device, you can try the solutions provided in this post.
You may encounter this issue after a successful upgrade to the latest version of Windows 11/10.
If you’re faced with this SYSTEM_SERVICE_EXCEPTION error, you can try our recommended solutions below in no particular order and see if that helps to resolve the issue.
- Run the Blue Screen Online Troubleshooter
- Update network card drivers
- Rename and replace Ndu.sys file
- Rollback to previous Windows 11/10 version
- Switch internet connection mode
- Reset Windows 11/10
- Clean install Windows 11/10
Let’s take a look at the description of the process involved concerning each of the listed solutions.
If you can log in normally, good; else you will have to boot into Safe Mode, enter Advanced Startup options screen, or use the Installation Media to boot to be able to carry out these instructions.
1] Run the Blue Screen Online Troubleshooter
In some cases, the Blue Screen Online Troubleshooter from Microsoft will resolve BSOD errors.
2] Update network card drivers
The Ndu.sys is known as Windows Network Data Usage Monitoring Driver. So, you might be encountering this error because of outdated or corrupted network card drivers. In this case, you can either update your drivers manually via the Device Manager, or you can get the driver updates on the Optional Updates section under Windows Update. You may also automatically update your drivers or you can download the latest version of the driver from the network card manufacturer’s website.
3] Rename and replace Ndu.sys file
Do the following:
- Press Windows key + E to open File Explorer.
- Navigate to the folder path below:
C:\Windows\System32\drivers
- At the location, right-click on the Ndu.sys file and then select Rename.
- Name the Ndu.sys file as Ndu.sys1.
Note: If you cannot change the name of the file, make sure you logged in with an administrator account or simply change the permissions you have on this specific file to the administrator.
- Next, open again the C: partition you have Windows installed.
- Search in the C: partition for the Windows.old folder. This folder contains the old Windows version you upgraded from.
- Locate and open the System32 folder you have in the Windows.old folder.
- Now find and double-click to open the driver’s folder.
- Search in the drivers’ folder for the Ndu.sys file.
- Right-click on it and select the Copy option.
- Now paste it in the drivers’ folder of the current upgraded Windows 10 install.
- Exit File Explorer.
- Reboot your Windows 10 computer.
On boot, check to see if the BSOD error persists. If so, try the next solution.
4] Rollback to previous Windows version
This solution requires you to roll back to a previous version of Windows.
5] Switch internet connection mode
This solution requires you to switch internet connection mode. So, if you are using a wired (ethernet) connection mode to access the internet on your Windows computer, you can switch to wireless connection mode or vice-versa, and see if the error persists.
6] Reset Windows 11/10
This solution requires you to reset Windows and see if that helps.
7] Clean install Windows 11/10
At this point, if none of the above solutions worked to resolve the BSOD error, it’s most likely due to some kind of system corruption that cannot be resolved conventionally. In this case, you can back up your files to an external USB drive; if you can’t boot to the desktop, use a Linux Live USB and then clean install Windows.
I hope this helps!
How to disable Windows NDU driver
On some systems, especially those with limited resources, NDU can consume significant CPU and memory resources. Disabling it can free up these resources for other tasks and slightly improve network performance.
To Disable NDU, open the Registry Editor (Press Win + R, type regedit, and press Enter) and navigate to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Ndu
Locate the Start key on the right panel, right-click on it, and select Modify. Change the Value data from 2 (Automatic) to 4 (Disabled), keeping the Base as ‘Hexadecimal’.
Exit Registry Editor and reboot your PC for changes to take effect.
Alternatively, open the Command Prompt using administrator privileges (Win + R > type cmd in Run dialogue > Ctrl + Shift + Enter) and execute the following command in it:
sc config ndu start=disabled
Then reboot your PC for the changes to take effect.
How do I fix Windows Blue screen error?
A wide range of hardware and software-related issues can cause blue Screen of Death (BSOD) errors. When you encounter a BSOD, note down the error code. It will help you identify the cause of the error. To fix a BSOD, start with a simple reboot and then proceed with specific troubleshooting steps like running SFC or DISM scans, installing OS and driver updates, using system restore, and performing a clean boot.
What is Windows blue screen hardware error?
A blue screen hardware error, commonly known as the Blue Screen of Death (BSOD), is a critical error that occurs when the Windows operating system encounters a problem that it cannot recover from, leading to a system crash. Hardware/software issues or driver problems often cause this error.
Проблема, как я понял, экзотическая, черт знает что, и почему в качестве жертвы был выбран я, без понятия, ну ладно, теперь к сути проблемы, железо в конфиге, стоит Windows 8 x64, сразу скажу переустановка Windows (любой, хоть Win7) с полной тотальной чисткой, форматированием с низким доступом к HDD не ПОМОГАЕТ! Проблема возникает вновь и вновь. А она следующая:
Есть такая штука в Windows, как «Невыгружаемый пул» некий такой буфер, который сам собой не выгружается и служит для нужд Windows, так вот этот … сын начинает расти/заполнятся, до максимального объема оперативной памяти (т.е. до 100% после чего Windows вылезает с синим жкраном) со скростью скачивания/загрузки из uTorrent и ему подобных программ. Пример: захожу в инсталлятор World of Tanks (там идет закачка через torrent сервера), начинаю скачивать игру, к примеру скорость 10 мб/с, и «невыгружаемый пул» растет с этой скоростью:
Норма 90-120 мб невыгружаемого пула!
Тоже самое с программами uTorrent, bitTorrent и все, все им подобным. Вирусов нет, windows чистющий установленный 30 минут назад, с антивирусом Kaspersky, левых программ тоже нет, диспетчер задач ничего не выявляет, он показывает лишь фактически сколько осталось ОП, сами же программы WoT, uTorrent не жрут ничего!
Но оговорюсь, эта проблема была у меня появилась впервые ещё 2 месяца назад, но тогда я её смог решить, как то случайно где-то наткнулся на один форум (проблема очень редкая), где была такая проблема, там нужно было в командную строку ввести буквально одну команду (или 2), что-то вроде отключения какого-то драйвера, и после перезагрузки все работало и цвело Но сейчас я не могу найти этого, по своей глупости я не сохранил тот сайт, думая, что после переустановки Windows в следующий раз этого не произойдет, ошибся, кстати я раз 15 Windows переустанавливал Помогите пожалуйста.
_________________
Intel i7-6400t (QHQj), MSI Z170M Mortar, Corsair DDR4-2133, AMD HD7950
