How to Limit CPU & RAM via the Windows Boot Configuration

Testing the effects of different CPU and memory configurations is easiest when you run the tests on a powerful machine and restrict it to the required number of CPU cores and amount of RAM. Microsoft’s documentation of the relevant command is missing an essential parameter. Here are the commands you need.

Limiting the CPU to N Cores

On an elevated command prompt run:

bcdedit /set {current} numproc NUMBER_OF_CORES

Note: strangely, the numproc parameter is missing from the Microsoft documentation of bcdedit. However, it still works fine on Windows 10 1803.

Limiting the RAM to N MB

On an elevated command prompt run:

bcdedit /set {current} removememory MB_TO_REMOVE_FROM_INSTALLED_RAM

With:

MB_TO_REMOVE_FROM_INSTALLED_RAM = INSTALLED_RAM - DESIRED_RAM

This is unnecessarily complicated. Instead of specifying the total RAM you want Windows to see, you specify how much of the installed RAM to remove (in MB).

Removing a Bcdedit Setting

To remove a setting, run the following on an elevated command prompt:

bcdedit /deletevalue {current} SETTING_NAME

E.g.:

bcdedit /deletevalue {current} numproc

Comments

Related Posts

Universal Windows App Data Storage for Admins

Universal Windows App Data Storage for Admins
Universal Windows Platform (UWP) is the current name for a new type of application platform originally introduced with Windows 8 as “Metro” and later renamed to “Modern”. UWP apps can run on desktop, phone and console versions of Windows. They may only use a subset of the Windows API and run in a sandboxed environment. As a consequence, UWP apps can only use very limited areas of the file system. This article describes where UWP app settings are stored and how part of those settings roam between devices.
Windows Internals

Latest Posts

Beautiful Slide Decks from Markdown: Presenting with Slidev

Beautiful Slide Decks from Markdown: Presenting with Slidev
Would you like to get away from PowerPoint and author slide decks in Markdown? Then Slidev may be just what you’re looking for. It’s a web app for presentations. The fact that it’s geared towards developers shouldn’t put you off. After all, who isn’t a developer these days, with AI? Slidev comes with the beautiful Tahta themes and supports features like syntax highlighting and animations. Export options to PDF and PPTX allow for easy sharing. This article shows how to get started.
Applications