A Better Way To Do The Windows Pagefile

rezerekted

2[H]4U
Joined
Apr 6, 2015
Messages
3,043
I was reading an article about the windows pagefile and it said that the pagefile can't be used by anything running on the same partition as the pagefile so they recommended that you create a pagefile on each partition to avoid that. But that got me thinking about what may be a better way to do it. Why not create a separate partition just for the pagefile? That way every partition with progs/games can use that one pagefile instead of having multiple pagefiles.
 
I was reading an article about the windows pagefile and it said that the pagefile can't be used by anything running on the same partition as the pagefile
I'm not sure where you read that, but it's a flat out lie or ignorance. If that were true a page file would be completely worthless on a single volume installation.

The best way to do the page file is to just leave it alone unless you're absolutely certain you know what you're doing. Some people tweak the size to save space but turning it off is definitely going to do more harm than good.
 
OK, article was FUD then but there is still a performance benefit to doing what I said but it must be on a different HDD too and not just a partiition on the same HDD as the OS. Have a small pagefile on OS partition and a larger one on it's own partition on a different HDD because that will increase I/O performance and also reduce fragmentation.

Adjusting Paging File Size
Use Multiple Disks
Although Windows 2000 supports a limit of 4,095 MB for each paging file, you can supply large amounts of virtual memory to applications by maintaining multiple paging files. Spreading paging files across multiple disk drives and controllers improves performance on most modern disk systems because multiple disks can process input/output (I/O) requests concurrently in a round-robin fashion.

A mirrored or striped volume is a good candidate for placement of a paging file. Placing the paging file on its own logical partition can prevent file fragmentation. Creating multiple paging files on a single logical volume or partition does not improve performance.

If you find that page writing and disk writing or page reading and disk reading are equivalent on a logical disk, splitting the paging file onto separate volumes is helpful.
 
OK why not just go up to 32gb of ram and turn it off or get a cheap ssd to dedicate to it.

Page files are a not beneficial anymore most systems have enough ram that there is no longer a need to have a page file.
 
Because some progs/games will not even run if there is no pagefile. I know that for a fact because I tested it once and ran into a game that refused to run without a pagefile.
 
OK why not just go up to 32gb of ram and turn it off or get a cheap ssd to dedicate to it.

Page files are a not beneficial anymore most systems have enough ram that there is no longer a need to have a page file.
I think that is overly simplistic of an answer. I have servers that have 512GB of ram and they heavily use the page file.

Point is, regardless of how much ram you have depending on your ram utilization your OS will still want to page out data. That's why I do not think you should ever disable it. Simply set the initial size to something as small as possible and the maximum to match whatever the system recommended amount is.

rezerkted, back to the original point of putting it on a different volume. You won't like the answer, but if you have to ask the question then you don't need to adjust it. If the work your doing required you to adjust it, you wouldn't need to ask. Leave the page file on the default system managed setting unless you need to lower the size down (say if you're on a small SSD). The page file should be on an SSD.
 
Because some progs/games will not even run if there is no pagefile. I know that for a fact because I tested it once and ran into a game that refused to run without a pagefile.
I stand by my statement if a game is setup to have a check like that it must be very poorly made.

I keep mine on my spinning disk set size or I might have turned it off... if you want to wear on your ssd leave a page file on the ssd. Just keep in mind reads and writes don't matter much to hdd but each write is one less a ssd can do. With a page file it can do thousands of writes in a day.
 
One static page file, 1MB in size (that's 1024KB), per physical drive not partition and you'll be doing about as well as you can - this allows for multiple page file access at any given moment in time (because even the fastest storage can still only read or write in one moment, it can't do both). Multiple page files spread across multiple physical drives allows the OS to read or write to any page file it requires at any time regardless of what's going on with other drives, for the most part. If drive A is busy doing some reads of data then the OS goes to drive B or C or whatever and pages as necessary.

Giving the OS more potential options for paging (which it always does regardless of the amount of system RAM you have in place) allows for more efficient operation.

This ain't rocket science, people. ;)
 
Ok i just checked i turned it off on my ssd and let windows manage the size on my sshd
 
only reason to tweak it in most cases is if your running low on space on your ssd? i let windows manage it these days cause by the time it wears out my ssd it will be like using a floppy drive in this day in age. (it will be outdated anyway lol) For the average person here there is no reason to play around with it cause if your pc is running out of ram you need to add more memory anyway. Playing with the page file wont help
 
Currently I do have it on my system ssd and is manged by the OS but I am going to try the small pagefile on every HDD for the reasons stated above and see how it goes. Nix the idea of dedicated partition for pagefile though, but that is how most people setup their Linux partitions, with a dedicated swap partition.
 
OK, article was FUD then but there is still a performance benefit to doing what I said but it must be on a different HDD too and not just a partiition on the same HDD as the OS. Have a small pagefile on OS partition and a larger one on it's own partition on a different HDD because that will increase I/O performance and also reduce fragmentation.

Adjusting Paging File Size
Use Multiple Disks
Although Windows 2000 supports a limit of 4,095 MB for each paging file, you can supply large amounts of virtual memory to applications by maintaining multiple paging files. Spreading paging files across multiple disk drives and controllers improves performance on most modern disk systems because multiple disks can process input/output (I/O) requests concurrently in a round-robin fashion.

A mirrored or striped volume is a good candidate for placement of a paging file. Placing the paging file on its own logical partition can prevent file fragmentation. Creating multiple paging files on a single logical volume or partition does not improve performance.

If you find that page writing and disk writing or page reading and disk reading are equivalent on a logical disk, splitting the paging file onto separate volumes is helpful.
This references Windows 2000. That's where you need to stop reading.

Windows and most other programs work best with a pagefile. SSDs work extremely well as pagefile hosts. Just let the system handle it unless you're really short on space. In which case uninstall some crap.
 
I've tried a few different things over time.

Just letting Windows manage it even with multiple drives seems to work better than anything regarding page file to me.
 
I've tried a few different things over time.

Just letting Windows manage it even with multiple drives seems to work better than anything regarding page file to me.

I always set my total pagefile size to be 1X or 1.5X RAM size. I set both upper and lower limits to be that same size. That way, I'm not incurring any disk fragmentation, etc. If my system has an SSD with enough free space, the pagefile(s) go on the SSD.
 
x509:

Your sig says you've got a system with 32GB of RAM in it so, if you've got a 32GB to 48GB page file on an SSD, brother you are doing it wrong. ;)

With that much RAM - seriously - a 1GB static page file on each physical drive (HD or SSD, doesn't matter) will be more than enough for your setup in almost any situation except some incredibly deep machine processing stuff that I doubt you're actually involved with (I mean real science shit like modeling hurricanes and weather patterns and such with data sets with billions or even trillions of variables to account for).

People go batshit insane with page files, they really do and after nearly 30 years of tweaking and tuning up machines of all kinds since Windows first appeared, the same advice is still what I give today and I already posted it earlier in this thread - a static page file about 1GB in size (ok, you can go to 2GB if you really must but honestly a mere few of you out of thousands of people would need to do such a thing) placed on each physical disk (hard drive or SSD or whatever, it doesn't matter) is the most efficient use of page files for Windows because it allows for simultaneous reads/writes across multiple drives - when one drive is busy, guess what, there's another drive with a page file that Windows can make use of, and so on.

One page file per system (especially if you have multiple physical drives) is a waste and causes unnecessary resource slowdowns because you can't read and write at the same time from a single volume/disk/etc, multiple drives allow for multiple reads and writes across the media devices and things just work better, period.

Like it or not Windows (and OS X and Linux) were designed long ago in the days when virtual memory allowed people to do more and run more applications and programs than the physical configuration of a PC allowed for mostly because of limited RAM. That's no longer a problem for most people but even so Microsoft (and Apple and all the Linux developers) still write code that by default is designed (since day one) to make use of virtual memory and the page file is just one component of that subsystem. It can't hurt to optimize page file usage when multiple physical drives are in a system and I don't care if you have one or two or 5 dozen of the fastest PCI-E or NVMe SSDs in existence and it's fast as fuck already.

It can be faster. ;)

This is the [H], people, don't do it soft, do it [H]ard or don't do it at all. :D
 
"One page file per system (especially if you have multiple physical drives) is a waste and causes unnecessary resource slowdowns because you can't read and write at the same time from a single volume/disk/etc, multiple drives allow for multiple reads and writes across the media devices and things just work better, period."

This is what I was referring to in my original post and then someone posted "I'm not sure where you read that, but it's a flat out lie or ignorance.". I just didn't explain what I meant very well because it was quite a while ago I read it and couldn't remember the details of what I had read.

I haven't switched to this method yet but am going to shortly, like right now, I am going to go change it.
 
Last edited:
This is what was being called a flat out lie or ignorant " it said that the pagefile can't be used by anything running on the same partition as the pagefile." And as it's worded, it is. Now if what was meant to be said was "if a program has activity on the drive where the pagefile is stored, then Windows can't access the pagefile until that operation is complete," then that would be correct. However, it would hardly be noticeable since the pagefile operation can preempt any pending operations other programs have going on.


There are really only two scenarios where you're going to notice pagefile related performance degradation: You are running out of RAM and Windows is having to hit the pagefile, or you have a program that has very heavy drive I/O to the only device where pagefile(s) for the system sit(s).. Even that second case might really only be noticeable if you're running out of RAM.
 
Last edited:
OK, I guess I'm a bit uncertain here. If software engineers still write code to use virtual memory, and I have multiple apps active at the same time, then don't I need a lot of vm?

I will reconfigure to put a pagefile on each physical drive in my system (4).

x509
 
All memory in Windows is virtual memory. Each application is given it's own virtual address space and Windows works behind the scenes to map the virtual addresses to physical addresses or pages them out to the pagefile.
 
I was reading an article about the windows pagefile and it said that the pagefile can't be used by anything running on the same partition as the pagefile so they recommended that you create a pagefile on each partition to avoid that. But that got me thinking about what may be a better way to do it. Why not create a separate partition just for the pagefile? That way every partition with progs/games can use that one pagefile instead of having multiple pagefiles.


You need to look into what the page file actually does, with ram so cheap I doubt you ever use it.
 
If you (meaning anyone reads this) has a "normal" working Windows installation and you open Task Manager and then open the Resource Monitor and select the Disk tab, at some point you're going to see activity for C:\pagefile.sys (and others on other drives if you follow the provided advice on putting a static one on each physical drive). If you machine is completely idle with nothing going on you may not see much, and this is totally regardless of how much RAM you have in the box. But it does mean - because I said "normal" that meant untouched untampered and working "normally" as Windows should which implies it does have a working page file - that in "normal" usage with apps open, multitasking going on, and again regardless of how much RAM is installed, you're going to see some activity on the page file sooner or later unless it's disabled.

Here's another tip: even if you disable the entire page file completely (or so you think) Windows will stll create one about 128MB in size buried in the \Windows directory for use as required. It won't grow in size, it'll remain static at 128MB in size but it'll be there and Resource Monitor (or whatever process monitor you use) will show activity sooner or later on that secondary "Hail Mary" page file too.

Windows is actually pretty damned good at what it does considering how large it is and what a freakin' behemoth of code it happens to be and it does even better when people leave it the fuck alone to do its thing by design. It's when people go in and tweak this, that, this, that, those things, these things, go back and tweak those things again, etc in the quest for every last tiny little shred of irrelevant but measurable to some degree improvement in overall performance and efficiency that people miss the point in the first place:

Turn it on, use it, then whatever, but don't waste so much damned time trying to eek out every last potential cycle there is. Yes I realize that advice flies in my "this is the [H]..." comment earlier in this very thread but, damn, there's got to be a point where the tweaking stops and you actually make use of the machine. :p
 
This is what was being called a flat out lie or ignorant " it said that the pagefile can't be used by anything running on the same partition as the pagefile." And as it's worded, it is. Now if what was meant to be said was "if a program has activity on the drive where the pagefile is stored, then Windows can't access the pagefile until that operation is complete," then that would be correct. However, it would hardly be noticeable since the pagefile operation can preempt any pending operations other programs have going on.


There are really only two scenarios where you're going to notice pagefile related performance degradation: You are running out of RAM and Windows is having to hit the pagefile, or you have a program that has very heavy drive I/O to the only device where pagefile(s) for the system sit(s).. Even that second case might really only be noticeable if you're running out of RAM.

You are arguing fucking semantics. I already said my memory is foggy as to what was said exactly and I am not going to go hunt the article down again for your benefit. I've already done the switch over so it's a done deal and you are now just flapping in the wind.
 
If you (meaning anyone reads this) has a "normal" working Windows installation and you open Task Manager and then open the Resource Monitor and select the Disk tab, at some point you're going to see activity for C:\pagefile.sys (and others on other drives if you follow the provided advice on putting a static one on each physical drive). If you machine is completely idle with nothing going on you may not see much, and this is totally regardless of how much RAM you have in the box. But it does mean - because I said "normal" that meant untouched untampered and working "normally" as Windows should which implies it does have a working page file - that in "normal" usage with apps open, multitasking going on, and again regardless of how much RAM is installed, you're going to see some activity on the page file sooner or later unless it's disabled.

Here's another tip: even if you disable the entire page file completely (or so you think) Windows will stll create one about 128MB in size buried in the \Windows directory for use as required. It won't grow in size, it'll remain static at 128MB in size but it'll be there and Resource Monitor (or whatever process monitor you use) will show activity sooner or later on that secondary "Hail Mary" page file too.

Windows is actually pretty damned good at what it does considering how large it is and what a freakin' behemoth of code it happens to be and it does even better when people leave it the fuck alone to do its thing by design. It's when people go in and tweak this, that, this, that, those things, these things, go back and tweak those things again, etc in the quest for every last tiny little shred of irrelevant but measurable to some degree improvement in overall performance and efficiency that people miss the point in the first place:

Turn it on, use it, then whatever, but don't waste so much damned time trying to eek out every last potential cycle there is. Yes I realize that advice flies in my "this is the [H]..." comment earlier in this very thread but, damn, there's got to be a point where the tweaking stops and you actually make use of the machine. :p

But earlier in the thread you said this: "One page file per system (especially if you have multiple physical drives) is a waste and causes unnecessary resource slowdowns because you can't read and write at the same time from a single volume/disk/etc, multiple drives allow for multiple reads and writes across the media devices and things just work better, period."

Now you do an about face and say, rudely, leave it alone. Hypocrite much?
 
Changing one aspect of the virtual memory subsystem is not really a major massive tweak in my opinion, just something that makes sense considering the single-path nature of storage devices meaning they can only do one thing at one time, read or write, they cannot do both. Multiple drives in a system - which is pretty common these days compared to years past where people would just have a single hard drive and nothing else - is why I make the suggestion(s) in the first place.

What I choose to do isn't necessarily what someone else might choose to do but then again not many people have been using Windows as long as I have and installed it as many times as I have and so on (tooting my own horn here). I offer the suggestions because in principle and in actual practice using multiple static page files across every physical drive improves performance in operating systems like Windows for a variety of reasons - if you can't grasp that well, that's not my problem.

You did catch the part where I pointed out the fact that I knew what I was saying when I said it earlier as well as when I pointed out I was kinda backtracking in that last post of mine, right? Right?

You started this thread based on "something you read on the internet" and people have pointed out the incredible inaccuracy of the information you gleaned from that source - what I've said is accurate and can be proven in many respects so, don't jump on my shit just 'cause I (and others) have tried to steer you on the right track to getting better performance.

Take the advice as offered or go back to that source you started this thread about, the choice is yours. The philosophy of "leave it alone" started around here many years ago, from what I understand, because so many people were asking so many questions and using so many sources of information that were all fucking wrong so, it's easier to tell people to leave it alone than trying to dispel their beliefs in something they "read on the internet" and this is no different.

And if you think I was rude, boy have you got a lot to learn about stuff you read on the Internet. :D
 
I have 32GB of RAM and I let Windows manage the page file. With a SSD Windows has smartly decided to use a static 2GB page file on my system.
 
Things like paging and virtual memory are a must. I remember watching my pagefile on Windows 7 as I was transitioning to a SSD. I decided to keep a 2-4 gig pagefile on the SSD for compatibility's sake and in case something like Firefox goes berzerk. The writes were frequent but tiny. The SSD was a 128 Gig Plextor and after 2 years of constant use there was no indication of wear.
Even with 32 gigs of RAM, an app can break bad and the pagefile is needed to restore an usable memory allocation scheme.

However, for spinner drives, I like to avoid fragmentation and slightly improve performance by identifying whether the first or last sectors are fastest (usually the "leftmost" area) and setup a 10 gig partition formatted in FAT32. I then set a 4-6 gig pagefile there.

Another way, for those who want both compatibility and don't want IO for Virtual, there's the option of making a RAMdisk and using it for a SWAP file.
 
Why the hell are you reading articles about Windows 2000? Is your OS Win2k?
 
Changing one aspect of the virtual memory subsystem is not really a major massive tweak in my opinion, just something that makes sense considering the single-path nature of storage devices meaning they can only do one thing at one time, read or write, they cannot do both. Multiple drives in a system - which is pretty common these days compared to years past where people would just have a single hard drive and nothing else - is why I make the suggestion(s) in the first place.

What I choose to do isn't necessarily what someone else might choose to do but then again not many people have been using Windows as long as I have and installed it as many times as I have and so on (tooting my own horn here). I offer the suggestions because in principle and in actual practice using multiple static page files across every physical drive improves performance in operating systems like Windows for a variety of reasons - if you can't grasp that well, that's not my problem.

You did catch the part where I pointed out the fact that I knew what I was saying when I said it earlier as well as when I pointed out I was kinda backtracking in that last post of mine, right? Right?

You started this thread based on "something you read on the internet" and people have pointed out the incredible inaccuracy of the information you gleaned from that source - what I've said is accurate and can be proven in many respects so, don't jump on my shit just 'cause I (and others) have tried to steer you on the right track to getting better performance.

Take the advice as offered or go back to that source you started this thread about, the choice is yours. The philosophy of "leave it alone" started around here many years ago, from what I understand, because so many people were asking so many questions and using so many sources of information that were all fucking wrong so, it's easier to tell people to leave it alone than trying to dispel their beliefs in something they "read on the internet" and this is no different.

And if you think I was rude, boy have you got a lot to learn about stuff you read on the Internet. :D

Arrogant AND rude. I grasped it fine and is why I have switched to that method. Come down from your ivory tower.
 
After getting volmgr errors in event viewer i decided to turn pagefile on. Set the 16min-2gb max. That way i it wont use all the space all the time.

If you set min-max the same does the pagefile pre allocate the size and just pad the file out.

I would rather allow it more space on the drive to help lower cell wear. I never let my samsung ssd make a 8gb unallocated space cause why not. Lol
 
I had always heard that using a fixed size to the page file (heard various amounts based on RAM) and then defragging the drive would help performance. Of course that was back in olden days when 8gb or more was pretty much unheard of.
 
All those tweaks with the pagefile stem from the times when you had 1-2Gb of ram and only a spinning slow hdd at sata 1 or sata 2 speeds. Back then it really made a difference if your pagefile was robbing spin time and sata bandwith.

If you have a sata3 ssd or even better a PCI-E SSD you have plenty of bandwith available and making tweaks is just a waste of time.
 
Probably, can't say I have noticed any benefit yet after creating a 1GB pagefile on each HDD+SSD.
 
It doesn't matter if you have the fastest possible piece of storage technology available today, whatever that may be *cough*RAMdisk still wins*cough* but the fact remains: you can't read and write with that device at the same instant, not even a RAMdisk. As long as you're increasing the efficiency of the system by allowing mutliple read/write operations to happen simultaneously across multiple storage devices it is an improvement for system operation and the reasons are quite clear if you're paying attention.

Sorry, was that too arrogant there at the end with the paying attention thing? ;)
 
You can spread the page file across 500 disks, and you still won't beat the performance of a RAMdisk simply because the first has throughput and latency measured in megabytes and microseconds while the second uses gigabytes and nanoseconds. A RAMdisk will have already completed several read and write transactions long before the disk even queues to a single request.
 
It doesn't matter if you have the fastest possible piece of storage technology available today, whatever that may be *cough*RAMdisk still wins*cough* but the fact remains: you can't read and write with that device at the same instant, not even a RAMdisk. As long as you're increasing the efficiency of the system by allowing mutliple read/write operations to happen simultaneously across multiple storage devices it is an improvement for system operation and the reasons are quite clear if you're paying attention.

Sorry, was that too arrogant there at the end with the paying attention thing? ;)

But you said in a later post to leave it alone and let the system handle it. So, which is it? Make up your mind.

I've used a ramdisk before but not for the pagefile, not interested in creating one again though, thanks.
 
Here's another tip: even if you disable the entire page file completely (or so you think) Windows will stll create one about 128MB in size buried in the \Windows directory for use as required. It won't grow in size, it'll remain static at 128MB in size but it'll be there..
Never heard about it. Does it uses a specific filename or a random generated name? Is it present only when pagefile is disabled? Is the same behaviour on all Windows versions, starting from win9x/XP up to Windows 10? I am interested in technical way, because back in times I did a lot of experimenting with various system files and tweaks etc.
 
Yea, well, Tiberian, you ain't telling me much I don't already know. Have already tried pagefile on each HDD before years ago. Gamers are tweakers so of course I have tried all kinds of tricks to get better performance over the years. Telling people to leave it alone as if they are children is condescending and not wanted or appreciated. If I mess things up I know how to fix it and experimenting is how people learn. MY PC is not a toaster.
 
Geez, if I wanted to be labeled so much and so often I wouldn't get on the Internet, go figure. ;)

As stated, "leave it alone" is a philosophy - it doesn't mean you can't use the computer or the OS, it just means if you're not that inclined then leave it alone because it really does work best when it's allowed to do what it's written to do by design. If your hobby is tweaking the living shit outta your box 24/7 then so be it, but I assure you, at some point you'll come to the simple realization that if you'd just left it alone to do its thing you've have enjoyed the games a lot more since you had more time to do so.

Framerate is life, as we old Quake players used to say, but with respect to a game in action your storage media ain't really gonna make that much of a difference - note that I said when the game is in action meaning when it's running. Load times can be improved depending, sure, but once the game is running it'll be dependent on CPU/RAM/GPU almost exclusively so, storage ain't going to play into it at that point.

Take the advice, don't take the advice, it's up to you but really, don't lambast those that at least try to provide accurate and useful information - that would end up having you labeled as dismissive and disrespectful when someone with more knowledge and experience is offering up info that you came around asking for.

And with that, I leave you alone. :p
 
It's not so much what you said but the way you said it I took issue with. But it's ok and thanks for your opinion oh great PC guru..

What do you think of this app? Never used it but looks like it could be useful if the claims are true.

Save 25% on CPUCores :: Maximize Your FPS on Steam

Quake? Pffft! I had that game, and still do, but back then I mostly ran hardcore flightsims, you know, the most demanding games on the planet, so we had to tweak shit.
 
Last edited:
Back
Top