One drive 2 pagefiles for 2 operating systems

Mrkjones

Distinguished
Apr 2, 2010
6
0
18,510
Hello, i hope some one can help.
I have 2 physical drives C and E. Drive C is partioned into 2 C and D, I have Win Xp installed on C and Win 7 installed on D. Now the pagefile for XP in on E the second drive. and the pagefile for Win 7 is on the installed OS partion D. My question is there a way i can use the second drive E for both pagefiles?
Thanks
KJ
 
Solution
The pagefile always resides in the root folder of a drive and it's always called "Pagefile.sys" - so if you set both OS's to use the same disk then they will use the same pagefile.

That's OK - there's nothing in the pagefile that's kept past shutdown, and you can never have both OS's running at the same time so there's absolutely no reason why they can't both use the same pagefile.

The only caveat I'd advise is to go into control panel as advised by hodmkrin and set both pagefile's sizes so that they're manually configured and are set to exactly the same size from both systems. Otherwise you'll be allocating and timing the pagefile each time you swap systems and that will lead to fragmentation.

hodmokrin

Distinguished
Feb 19, 2009
29
0
18,540
Yes, inside windows 7, go to control panel, then system and security, then go to system. Once on this menu, look in to top left hand corner for advanced system settings. Once inside here, go to the advanced tab, then select performance settings. Now click the advanced tab, and select the change button under virtual memory. Uncheck the option to automatically manage these settings. Then select the drive where you want the page file, and make sure you remove the page file form the drive you don't want it on.

Good luck
 

Mrkjones

Distinguished
Apr 2, 2010
6
0
18,510
Thanks you for your reply. However i want to use both operating systems each with a page file but on a different physical disk (drive E) So if I enable the pagefile for win7 on drive E will it not overwrite the pagefile for XP with is originally also on drive E? Is there a way for both OS's to have a pagefile on the same drive without interfering with each other.
Cheers
 
The pagefile always resides in the root folder of a drive and it's always called "Pagefile.sys" - so if you set both OS's to use the same disk then they will use the same pagefile.

That's OK - there's nothing in the pagefile that's kept past shutdown, and you can never have both OS's running at the same time so there's absolutely no reason why they can't both use the same pagefile.

The only caveat I'd advise is to go into control panel as advised by hodmkrin and set both pagefile's sizes so that they're manually configured and are set to exactly the same size from both systems. Otherwise you'll be allocating and timing the pagefile each time you swap systems and that will lead to fragmentation.
 
Solution



Always is wrong, period, you can tell it where you want the pge file set.

i'd advice that you re-partition the drive you want your swap files on, and create two additional small partitions that are about the size of the swap file you want, and then put one swap file in each partition, the nett loss of space is the same.
 

You can tell it which drive letter (i.e., partition) you want it on, but that's it. It goes onto the drive you asked for, in the root folder, with a filename of "pagefile.sys".

The OP wants two different pagefiles on the same drive/partition. Can't be done.

...but I see no reason to do it in the first place.
 

spinning rust

Distinguished
Jul 9, 2009
45
0
18,540
"That's OK - there's nothing in the pagefile that's kept past shutdown, and you can never have both OS's running at the same time so there's absolutely no reason why they can't both use the same pagefile. "

not true, unless you modify you local setting, windows will not clear the pagefile before shutdown. on really large pagefiles, that can delay shutdown by minutes.
 

That's true, but there's nothing in the pagefile that Windows cares about when it starts back up again, so the fact that there's stuff in there is really irrelevant.

Unless you're looking to hack something, the only thing of interest stored in the pagefile after shutdown is crash dumps, which are of very little interest to most people even on the very rare occasions when they do occur.
 
I always had OS's on different hidden partitions (C1, C2, etc) and always forced them to use the same page file of a fixed size on D:\ with that and temp files being the only thing on that partition.... can't imagine why you would want to do otherwise. What would be purpose of the 2nd page file ? ....would just be empty, unusable space.
 

Mrkjones

Distinguished
Apr 2, 2010
6
0
18,510



Thanks for all your replies, I have been having router issues (networking a ps3, another thread perhaps lol) so not been able to check back until now.
So it looks like it is ok to set the same pagefile for both OS's?

So just to make it clear, I want to use ONE fixed size (thanks sminlal for that) pagefile on drive E "hard drive 2" to be shared by two OS's win7 and xp, which are installed on the same physical drive "hard drive 1" but two logical partitions C and D.

hard drive 1
C:\ win xp
D:\ win 7
hard drive 2
E:\pagefile (being used alternatively )


Also JackNaylorPE you seem to be doing what i want as well. Can you confirm your operating systems and your drive setups. My partions are not hidden will that cause any mishaps?
Thanks again for the replies,
So i will not damage/corrupt the OS's by using one pagefile for both OS's? I know i could just try it but it seems rather risky!
 

mikrev007

Distinguished
Oct 28, 2008
264
0
18,790
No, you will not corrupt anything. Sharing the same pagefile is just fine.


Technically, if you manually set the path in the registry then it can be located anywhere.