Configure the amount of memory that can be locked for I/O

There is a limit for how much memory the system can lock for I/O (Input/Output) operations. Increasing the limit might benefit applications or drivers, which are highly dependent on highspeed network or harddisk access, as it will allow a larger amount of outstanding I/O.

This DWORD value specifies how much memory (in bytes) that can be locked for I/O operations:

[HKEY_LOCAL_MACHINE \System \CurrentControlSet \Control \Session Manager \Memory Management]
IoPageLockLimit=0 (0 = Calculated at boot, Default = 0)

One can use the following chart for finding a value, though the best value is found by testing:
Total RAMIoPageLockLimit (Hex)Locked RAMMax value
64 MByte0CalculatedTotal RAM minus 7 Byte
64-200 MByte8000002 MByteTotal RAM minus 16 MByte
256-500 MByte10000004 MByteTotal RAM minus 16 MByte
512+ MByte20000008 MByteTotal RAM minus 64 MByte
Note Windows 2000 RTM (Without any service packs) also reacts to this registry key. If applying a service pack, then this registry setting doesn't have any affect.

More Info MS KB102985
More Info MS KB121965


Updated: 12 May 2007


  1. dirtyepic says:

    Take, for instance, a certain Registry hack that is bandied around as being a performance-enhancer in both Windows 2000 and XP. This is the IoPageLockLimit hack, which (according to its proponents) allows you to change the amount of memory locked for exclusive access by the kernel. Setting this to a bigger value should lock more memory at once and in theory enhance performance. And indeed, it does do this -- but only in an RTM Windows 2000 machine. It does absolutely nothing in Windows 2000 Service Pack 1 and up, and absolutely nothing in Windows XP. This makes it effectively useless, since I know of no one in their right minds who runs Windows 2000 RTM on a production machine at this point in time.

    How did I fall into this trap? Easy -- I tested it on a machine with Win2K RTM installed! It sure seemed to have an effect there, although not always a healthy one, and when I wrote about it I noted that this was a your-mileage-may-vary situation, and that seemed to be the end of it. The sheer amount of stuff out there to write about is intimidating, and I didn't want to spend weeks and weeks beating on the same issues until all but the most stalwart had fled or given up in boredom. I was applying a fair level of skepticism to the subject, but evidently it wasn't enough. (You can read what I wrote here:

    One of the people who woke me up to how this whole IoPageLockLimit thing was a giant shill was Jamie Hanrahan of Kernel Mode Systems ( He had proof, he claimed, that the setting was absolutely worthless as of Win2K SP1 and up. He had run a string analysis on NTOSKRNL.EXE, looking for the actual Registry entry itself to see if it was being referenced by the kernel, and what he found was eye-opening. The RTM kernel references IoPageLockLimit. The SP1 kernel does not. Neither do any subsequent editions of the kernel; neither does the XP kernel in any of its incarnations. To double-check, he ran SysInternals' RegMon utility to determine if anything was, in fact, accessing that Registry entry at all, and the answer seemed to be a resounding no. There seem to be no references to the entry in any other system components, either. (I ran GREP on pretty much the whole Windows directory and came up empty.)

    So why did some people report performance gains when they did this? There are plenty of explanations that have more to do with psychology and behavior than anything else. One of them is simple enough: that while making this tweak they did other things that may have legitimately affected their system performance (like do a defrag or clean up their boot acceleration cache, if they used XP). The other is nothing more than the placebo effect, where people perceive changes that simply aren't there, without having hard numbers to back it up. (Guilty!)

    Now, the Ars Technica site, themselves no slouches, have reprinted the trick (at, along with hard numbers to back it up -- but only under NT 4.0, not Windows 2000! Evidently a lot of people (myself included) have been mindlessly following the bandwagon that NT 4.0 = 2000 when it serves them and NT 4.0 2000 when it does not.

    On the one hand, this is bad news, because it means I've been inadvertently been spreading things which seemed to be facts, but which simply no longer have any truth to them, and haven't for some time. On the other hand, there is some good news here -- it means that the amount of stuff that needs to be tweaked in a Win2K or WinXP system is that much smaller, and that the system has apparently been made that much more self-regulating lately. I don't know about you, but I didn't particularly relish the thought of taking days to try and tweak my cache settings. (How does that song go? "Always ... look on ... the bri-ight side of life...") If it means I have to go and make a mess of retractions, then so be it. I'd rather do that than continue to knowingly be wrong.

    I think an old adage is worth trotting out: Believe half of what you see and none of what you hear.

Leave a Reply

Your email address will not be published. Required fields are marked *