DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Advice needed re: locking windows kernel in RAM  (Read 5,780 times)

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • Participated in NANY Challenge Eight Times
    • Programming School - Deluxe Bonus Medal
    • Programming School - Stage 1 Medal
    • Coding Snacks
    • Military Service Badge - US Army
    • Writer
Advice needed re: locking windows kernel in RAM
« on: March 18, 2013, 08:50 PM »
Someone emailed me this, supposedly from a PC-Mag article issued months ago:

Quote
Windows willingly swaps its own code from memory to make room for your other programs. But since Windows code is the most often used when you run your system, swapping it can slow things down. You can save swap time by making Windows lock its own kernel in RAM, as long as you have enough memory (512MB).

Note that the Registry controls all swapping of the kernel, and any erroneous alteration in the Registry can make your PC inoperable. Use the program Regedit (usually found in your Windows or WinNT folder). Click on My Computer | Local Disk (C:) | Windows | Regedit.

Expand the listings to HKEY_LOCAL_MACHINE\ SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management in the left-hand half of the window. Highlight DisablePagingExecutive on the right-hand side. Then click on Edit | Modify and enter the value 1. Click on OK, close Regedit, and reboot your computer.

Safe/unsafe? Advisable/Inadvisable?
Win 10 Pro running on a 3.2 GHz CPU and 12 Gb RAM
__________________________________________

Proofreading Service: http://williammillerservices.com/proofreading

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,649
    • Participated in NANY Challenge Eleven Times
    • Coding Snacks
    • Linux User
    • Hardware Hacker
Re: Advice needed re: locking windows kernel in RAM
« Reply #1 on: March 18, 2013, 08:55 PM »
Sounds like good advice......., about 10 15+ years ago.  :down:

Who doesn't have enough RAM to avoid these kinda mumbo-jumbo, these days?
And forcing the kernel into RAM on a low memory system, so it's even more busy swapping the currently active application in and out of memory, instead of some kernel code you're not using (much) at the moment?
/Ton
Ath's software collection, Quote: "A problem well stated is a problem half-solved." (Charles Kettering)
« Last Edit: March 18, 2013, 08:56 PM by Ath »

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,861
Re: Advice needed re: locking windows kernel in RAM
« Reply #2 on: March 18, 2013, 10:26 PM »
Sounds like good advice......., about 10 15+ years ago.  :down:

+1.

Yup. It's rarely a good idea to manually edit the registry. And when it comes to the above suggestion, it's definitely a bad idea. As Ath pointed out, the situation this hack attempts to 'fix' has long since been addressed by improvements made to Windows and the hardware it runs on.

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • Participated in NANY Challenge Eight Times
    • Programming School - Deluxe Bonus Medal
    • Programming School - Stage 1 Medal
    • Coding Snacks
    • Military Service Badge - US Army
    • Writer
Re: Advice needed re: locking windows kernel in RAM
« Reply #3 on: March 18, 2013, 10:36 PM »
I have plenty of RAM on my desktop PCs (6 and 8 Gb respectively), so my question was academic and your responses anticipated. This topic is kinda in the same category of " should I use a RAM disk?"
Win 10 Pro running on a 3.2 GHz CPU and 12 Gb RAM
__________________________________________

Proofreading Service: http://williammillerservices.com/proofreading

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,861
Re: Advice needed re: locking windows kernel in RAM
« Reply #4 on: March 19, 2013, 12:37 AM »
There are times when a RAM disk still makes sense. Mostly for busy caching situations on a server - although even those situations are becoming less common now that programs that can benefit from such now handle it for you.

Generally speaking, unless there's a very specific and special requirement that can provably benefit from second guessing your OS, I've found it's best to just let system handle caching, swapping, and other memory management activities. Today's operating systems are quite sophisticated and adept at handling that sort of thing. Rarely will you be able to do it better tweaking those things by hand.

Just my :two: anyway.  8)
« Last Edit: March 19, 2013, 12:42 AM by 40hz »

f0dder

  • [Well, THAT escalated quickly!]
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
    • Participated in NANY Challenge Once
Re: Advice needed re: locking windows kernel in RAM
« Reply #5 on: March 19, 2013, 12:40 AM »
I have plenty of RAM on my desktop PCs (6 and 8 Gb respectively), so my question was academic and your responses anticipated. This topic is kinda in the same category of " should I use a RAM disk?"
I used to do this back in the days when I didn't have enough RAM to disable the pagefile entirely.

Now, the following quite from Ath makes sense logically:
And forcing the kernel into RAM on a low memory system, so it's even more busy swapping the currently active application in and out of memory, instead of some kernel code you're not using (much) at the moment?
...but the real-world effect was a system that ran somewhat more smoothly. With DisablePagingExecutive enabled, Windows "recovered" faster (with lots less page-in activity) after, say, exiting a memory-hungry game. And I never ran into any adverse effects by having the setting enabled.

Dunno if there'd be any idea of doing it when you've running without pagefile. While there's nothing to page-out to, perhaps the setting could influence whether unmodified code sections are discarded and later page-in'd? *shrug* - not like I'm ever running low on memory on my current rig :)

But on old systems with limited RAM and slow harddrives? It's worth checking out - depending on how you're using the system, it might be a performance increase.
- carpe noctem

Tinman57

  • Duck! It's another MicroSoft Patch!
  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,702
    • Military Service Badge - US Air Force
Re: Advice needed re: locking windows kernel in RAM
« Reply #6 on: March 19, 2013, 01:13 AM »
  I set XP SP3 to do this years ago and haven't looked back.  I use my memory tweaker program to turn this option on.
((((TINMAN))))

Original address: https://www.donationcoder.com/forum/index.php?topic=34362.0