1

Can I set memory usage priority in Windows8? I would like to give certain programs, specifically JavaW, priority access to available RAM.

3
  • 3
    It's about gaming and there's not enough info, take your pick.
    – Xavierjazz
    Jul 4, 2013 at 0:54
  • 3
    I'm not sure the question makes sense. My understanding is that if a program needs to consume more memory, it's going to, and if it's unable to it will probably crash. Jul 4, 2013 at 1:27
  • Agreed with @Louis, it's very unclear what you're trying to accomplish here.
    – Shinrai
    Jul 5, 2013 at 16:14

2 Answers 2

5

Windows has a page priority since Vista. You can use ProcessHacker to set it. Value 1 is the lowest and 5 ist the highest (default value):

enter image description here

1
  • Yes, that exists, but it won't have the effect the OP wants. See my answer. Dec 20, 2018 at 7:14
2

Sorry but there is no way to do what you want.

You can set the "memory priority" of a process but this will have very limited effect. There is no setting that will give a process more access to available RAM than the default, because the default memory priority (5) is the maximum you can set. (There are values 6 and 7 but they are only usable by Windows internal mechanisms.)

Conversely, setting a low memory priority does not limit how much RAM gets allocated to the process either. So forget about keeping all other processes from using RAM this way.

What affect does it have, then? When a process is set to low memory priority, then all physical pages faulted into the process after that get set to that priority. And pages set to lower than the default memory priority will be the first to be removed from the process when the process working set is being shrunk. However, the mere existence of low-memory-priority pages does not cause working set reduction.

And... when pages are removed from a process and go to the Standby page list, the lower-priority pages can get repurposed (e.g. for SuperFetch) before the higher-priority pages.

That's it.

In fact, the main purpose of memory priority is not at all to prioritize various processes' allocation of RAM, but rather to ensure that SuperFetch does not repurpose too many pages containing important stuff from the Standby page list. It is no accident that this whole memory priority scheme showed up in Vista - the first version that supported SuperFetch. SuperFetch uses the lowest-memory-priority pages on the Standby list first.

Memory priority is set to 5 for normal interactive processes, 3 is the default for processes started by Scheduled Tasks; 1 for "low priority user pages", i.e. pages allocated by processes running at low priorities. I haven't been able to find a default value for service processes, but I imagine it's 4 or 5.

A process that really wanted to try to "optimize" its memory usage could change its own memory priority from time to time, perhaps setting it to a lower value during not-so-important stuff.... Or while running initialization code that would likely not be needed again during the program's run. However, few processes bother.

1
  • It would help if the OP had stated his outer problem. Most people who ask this question tend to think that they'll make some process run faster by giving it more memory but what actually happens is that it runs slower because causing a sub-optimal allocation of RAM to processes creates extra I/O that slows everything down. Dec 20, 2018 at 10:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .