How to set Windows XP pagefile beyond 4096 MB?

0

I'm trying to increase my windows pagefile so that multiple applications can "run" concurrently without throwing "system is low on memory" errors.

However, there seems to be a limit of 4096 MB:

enter image description here

How can we increase the limit?

How can we set Windows XP's pagefile above 4096 MB?

My System Info

Pacerier

Posted 2013-03-09T13:46:38.727

Reputation: 22 232

Why do you need such a big pagefile? – gronostaj – 2013-03-09T14:14:43.190

@gronostaj, I use programs that require a lot of memory like Photosho, multi-tab browsers, video viewers, etc – Pacerier – 2013-03-09T14:22:00.890

1Virtual memory is much slower than RAM (I mean, like 250 times slower). I think you should upgrade physical RAM. – gronostaj – 2013-03-09T14:30:22.383

@gronostaj, yes of course that's a better option, but it's more expensive. – Pacerier – 2013-03-09T14:38:50.940

@Pacerier - There isn't a single application that you can use on a 32-bit installation of Windows that will use more then 4GB of memory since your using a 32-bit operating system. If you want a larger page file install a 64-bit operating system. – Ramhound – 2013-03-09T14:46:00.960

@Ramhound, of course the whole point is... I don't only run one program at one time! – Pacerier – 2013-03-09T15:02:27.343

@Ramhound: Some 32 bit operating systems can use more than 4GB of RAM and more than 4GB of page files -- 32-bit Windows XP can't, but other 32 bit operating systems (such as i386 Linux with PAE enabled) can. So it's not necessary to install a 64 bit operating system to use a larger page file. – pts – 2013-03-09T15:43:09.517

1@pts - The question is about Windows XP. Furthermore this question is about a Windows operating system not the Linux kernel. – Ramhound – 2013-03-09T16:13:02.440

Why can't you just allow Windows to expand the pagefile as it needs it (System managed size)? – alroc – 2013-03-11T20:25:38.907

@alroc, because I need more than 4096 MB since I concurrently use programs that require much memory. – Pacerier – 2013-03-11T20:57:09.760

Answers

4

This Microsoft article explains how to overcome the 4095 MB limit on paging file size. However, it begins by saying

When you set the paging file size in Windows, the documentation states that the largest paging file that you can select is 4,095 megabytes (MB). This limit is imposed by the page mapping that we use on x86 processors. These processors cannot handle more pages per page file.

Later it suggests that this may not be an effective solution and suggests adding more RAM.

Note that reading or writing a paging file of this size can be costly in terms of performance. If you find that you need a paging file of this size, it may be better to add more RAM to the computer.

Wayne Johnston

Posted 2013-03-09T13:46:38.727

Reputation: 3 416

1This is not actually quite accurately applied. See my answer below. – Matt H – 2013-03-11T21:41:53.913

0

A 32bit OS cannot address more than 4GB of RAM (i.e. 2 power 32). Therefore the pagefile cannot be bigger than 4GB. This is true for Linux and other OS' as well.

All applications loaded into memory will be loaded within the 4GB window. So even if you had 8GB of RAM in your machine you're stuck with 4GB of addressable RAM because of software limitations.

However, several versions of Windows (and other OS') are available that had support for Physical Address Extensions This was a CPU extension on 32bit processors that allowed utilising more than 4GB of RAM. It required support at the OS level as well. Note: you're still stuck with addressing 4GB of RAM at any one time, but the PAE feature allows you to switch that 4GB window to higher memory areas giving the ability to applications to access more RAM.

The problem with PAE is that it also needs application support for apps to use more memory. So an individual app still can't access more than 4GB of ram unless it's been written to utilise the Address Windowing Extensions

The link provided by Wayne's answer also requires PAE be turned on.

All in all, PAE is a cumbersome mechanism with limitations. Your best bet is to upgrade windows if you want to give more RAM. This will allow the OS to make better use of available RAM. However, be aware that your apps are 32bit and still have the 4GB memory limit (unless they use AWE). Windows will at least be able to swap them in and out of memory better than 32bit windows with PAE.

Matt H

Posted 2013-03-09T13:46:38.727

Reputation: 3 823

Why does http://msdn.microsoft.com/en-us/library/windows/hardware/dn613975(v=vs.85).aspx state that even with PAE, the maximum ram possible for XP is 4 GB total?

– Pacerier – 2014-11-13T21:05:38.237

Matt H, I'm afraid you have promulgated a widespread myth. Apps do not need "application support to use more memory" under PAE. Apps reference virtual address space, not physical. PAE does not extend the virtual address space, only the physical. PAE (if your OS supports it) does allow the total of all of your processes to use more than 4 GB of RAM but it doesn't allow any one process to use any more v.a.s. than it ever could. A workaround for the OP is to create additional pagefiles on additional volumes. The right answer is of course to install a 64-bit version of Windows. – Jamie Hanrahan – 2016-01-25T11:20:43.023

It's my understanding that your app needed to use the AWE API to access the extra RAM made available through the cludgy PAE system. Anyway, this is such an old problem that so few people have now. Nearly everyone is on 64-bit. – Matt H – 2016-01-25T19:37:31.390