How to disable swapping / set page file usage for certain applications?

2

There is 1.5Gb RAM at the test computer, and usually, 900Mb of them are free. When I launch an application which takes about 500Mb, Windows 7 goes with swapping, and occasionally this leads to huge delays.. What I want is to exclude that app. from swapping due to high memory's usage.

Although the page file default policy is to write most unused pages to disk, the idea of what I see is writing everything at disk right at the moment when I launch that app and I'd rather prefer to see 1-2 apps crashing with[ ]out of memory.

However, disabling swap completely leads to annoying Firefox crashes at the normal work time, and that's the only reason for having page file at that machine.

kagali-san

Posted 2011-06-05T02:08:58.177

Reputation: 1 404

You run an application and you say that it is immediately writing to disc. How do you know that it isn't reading from disc? What measurements have you made to determine that the premise of your question is even true? (It often isn't when people ask these kinds of questions.) – JdeBP – 2011-06-05T14:27:38.030

Answers

1

There is 1.5Gb RAM at the test computer, and usually, 900Mb of them are free. When I launch an application which takes about 500Mb, Windows 7 goes with swapping, and occasionally this leads to huge delays.. What I want is to exclude that app. from swapping due to high memory's usage.

There can easily be 900MB free in byte-sized chunks, but if your application needs 500MB in contiguous memory then Windows is going to have to start paging to defragment the heap to make larger contiguous chunks of memory available.

By blocking one application from paging it's memory out, you're left with the possibility that Windows cannot perform enough defragmentation to allocate a large contiguous block of memory. This is just as bad as not having a page file.

At any rate, Windows does a pretty good job with memory allocation as it is.

ta.speot.is

Posted 2011-06-05T02:08:58.177

Reputation: 13 727

So there is no way to block a single application from paging out? I understand the disadvantages, but I do not like the way Windows handles memory when I use multiple hundreds of GB of RAM. – EGr – 2015-07-30T14:22:29.697

"byte-sized, I get it now" – ta.speot.is – 2011-06-05T02:30:14.960

0

If you can upgrade your ram then I would add more this will help a lot. Another thing you can is allow windows to auto choose the size that it needs for your virtual memory and you can do this by going to Control Panel\All Control Panel Items\System then open system properties then click on the advanced tab and then select the settings button under Performance. When the next window pops up goto the advanced tab and then click on the change button under the Virtual Memory section. You must always have a space on your hard drive for virtual memory no matter how much Ram you have.

user82071

Posted 2011-06-05T02:08:58.177

Reputation: 1