Splitting swap files?

C

Char Jackson

The swap file is called "pagefile.sys" and it's one huge file. I don't
think there's any way you can break it into smaller units on multiple
drives.

You can specify any drive in which to locate this file. I have it in
the root of my Drive E:, which is the second partition of my primary
physical drive.
When you look in the area where you can specify which drive it resides
on, you'll notice that you can put a swap file on each partition if
you like. You're not limited to just one. I think that's what people
mean when they talk about splitting it up.
The reason I did this is not to "reduce the stress" on the boot drive
(C:) but to make it easier to copy or mirror the entire contents of
C:. (You may have to do that if you need to replace the physical
drive.) If you try to copy "pagefile.sys" the process will hang up
and you'll get an error message.
It's been many years since I ran across a backup/copy program that
wasn't aware of pagefile.sys and knew enough to ignore it rather than
try to copy it.
 
A

Alexander Arnakis

It's been many years since I ran across a backup/copy program that
wasn't aware of pagefile.sys and knew enough to ignore it rather than
try to copy it.
Yes, but if you do it manually (without using a backup/copy program),
you run into problems.
 
Y

Yousuf Khan

When you look in the area where you can specify which drive it resides
on, you'll notice that you can put a swap file on each partition if
you like. You're not limited to just one. I think that's what people
mean when they talk about splitting it up.
Yeah, that's basically it, it gives you an option to click on multiple
partitions/drives, and it will create a pagefile.sys in each of those
selected partitions. The question is are they all being used, or is just
one of them being used, with the others being used only if there is a
drive failure on the first, etc.?

In the Unix/Linux world, when you create multiple swapfiles or swap
partitions, then they are all used in some manner at the same time.
Let's you split the i/o out amongst them.
It's been many years since I ran across a backup/copy program that
wasn't aware of pagefile.sys and knew enough to ignore it rather than
try to copy it.
Most backup programs know that these files will automatically be
recreated by the OS at the next reboot.

Yousuf Khan
 
G

Gene E. Bloch

When you look in the area where you can specify which drive it resides
on, you'll notice that you can put a swap file on each partition if
you like. You're not limited to just one. I think that's what people
mean when they talk about splitting it up.


It's been many years since I ran across a backup/copy program that
wasn't aware of pagefile.sys and knew enough to ignore it rather than
try to copy it.
I use Macrium for image backups. Using Macrium to mount my latest image,
I see a pagefile.sys of 3.80 GB.

I have no recent experience with other SW, but I do recall being
surprised that Macrium saves the pagefile.

BTW, there's also a hiberfile on that image - and I never sleep or
hibernate this computer :)

Well, I probably have done so and forgotten...
 
C

Char Jackson

I use Macrium for image backups. Using Macrium to mount my latest image,
I see a pagefile.sys of 3.80 GB.

I have no recent experience with other SW, but I do recall being
surprised that Macrium saves the pagefile.

BTW, there's also a hiberfile on that image - and I never sleep or
hibernate this computer :)

Well, I probably have done so and forgotten...
I more or less misspoke there. What I should have said is that most
current backup software knows how to back up files that are currently
open, and to do so without complaining. Where's the white-out when you
need it?
 
E

Ed Cryer

I use Macrium for image backups. Using Macrium to mount my latest image,
I see a pagefile.sys of 3.80 GB.

I have no recent experience with other SW, but I do recall being
surprised that Macrium saves the pagefile.

BTW, there's also a hiberfile on that image - and I never sleep or
hibernate this computer :)

Well, I probably have done so and forgotten...
The hibernte file will be as large as your RAM.
You can switch hibernate off and delete the file;
http://tinyurl.com/d3pkk9

Ed
 
R

R. C. White

Hi, Ed.
The hibernte file will be as large as your RAM.
I always thought that, too. Actually, I thought was RAM size + some small
amount of "overhead". But I recently rebuilt/upgraded my system. I now
have 8 GB RAM. My directory (Command Prompt's Dir /a command, to include
Hidden and System files) now shows:

03/20/2011 10:17 AM 6,441,803,776 hiberfil.sys
03/20/2011 10:17 AM 8,589,074,432 pagefile.sys

Both show today's date and the time I started my computer this morning, as I
expected. And pagefile.sys is equal to my 8 GB RAM, as always. But
hiberfil.sys is significantly smaller than RAM - and I don't know why.
Perhaps some of the true techies here can explain that to both of us.

And, to Gene:
BTW, there's also a hiberfile on that image - and I never sleep or
hibernate this computer :)

Well, I probably have done so and forgotten...
The date on that file should be the last time you started your computer with
hibernation enabled (or maybe if you enabled hibernation during a session -
I don't know about that). If it is any date other than today (or your
latest Windows start time), then it is sitting there unused, just taking up
disk space, so delete it. With or without it, if you DO use hibernate, the
file will be created anew the next time you enable it; this older
hiberfil.sys will never be used again.

RC
--
R. C. White, CPA
San Marcos, TX
(e-mail address removed)
Microsoft Windows MVP (2002-9/30/10)
Windows Live Mail Version 2011 (Build 15.4.3508.1109) in Win7 Ultimate x64
SP1


"Ed Cryer" wrote in message
I use Macrium for image backups. Using Macrium to mount my latest image,
I see a pagefile.sys of 3.80 GB.

I have no recent experience with other SW, but I do recall being
surprised that Macrium saves the pagefile.

BTW, there's also a hiberfile on that image - and I never sleep or
hibernate this computer :)

Well, I probably have done so and forgotten...
The hibernte file will be as large as your RAM.
You can switch hibernate off and delete the file;
http://tinyurl.com/d3pkk9

Ed
 
G

Gordon

03/20/2011 10:17 AM 6,441,803,776 hiberfil.sys
03/20/2011 10:17 AM 8,589,074,432 pagefile.sys

Both show today's date and the time I started my computer this morning,
as I expected. And pagefile.sys is equal to my 8 GB RAM, as always.
Then you must have specified that. In my experience the Pagefile is
usually 1.5 to 2x RAM if the default setting of allowing Windows to
manage the size is not changed...
 
R

R. C. White

Hi, Gordon.

No, I didn't specify the pagefile size. In fact, I haven't even looked at
that System setting page in months, and certainly not since I upgraded my
system this month, including the upgrade from 4 GB to 8 GB RAM. In checking
my setting just now, I see that it is still "System managed size", as it has
been for at least a couple of years. The 8 GB page file is all on Drive C:;
the box for "Automatically manage paging file size for all drives" is NOT
checked.

Several years ago, I was one of those who frequently tweaked the page file,
trying to find the "right" or "best" settings for both size and location.
But since Vista (or was in WinXP) began to do a much better job than older
Windows versions in managing these things, I've seldom felt the need to
choose anything other than let the System manage them. Especially with the
much larger RAM resources that many of us have today. Not like when 512 MB
was a LOT of RAM and the system needed to swap to/from disk much more often.
;^}

RC
--
R. C. White, CPA
San Marcos, TX
(e-mail address removed)
Microsoft Windows MVP (2002-9/30/10)
Windows Live Mail Version 2011 (Build 15.4.3508.1109) in Win7 Ultimate x64
SP1


"Gordon" wrote in message
03/20/2011 10:17 AM 6,441,803,776 hiberfil.sys
03/20/2011 10:17 AM 8,589,074,432 pagefile.sys

Both show today's date and the time I started my computer this morning,
as I expected. And pagefile.sys is equal to my 8 GB RAM, as always.
Then you must have specified that. In my experience the Pagefile is
usually 1.5 to 2x RAM if the default setting of allowing Windows to
manage the size is not changed...
 
E

Ed Cryer

Hi, Gordon.

No, I didn't specify the pagefile size. In fact, I haven't even looked
at that System setting page in months, and certainly not since I
upgraded my system this month, including the upgrade from 4 GB to 8 GB
RAM. In checking my setting just now, I see that it is still "System
managed size", as it has been for at least a couple of years. The 8 GB
page file is all on Drive C:; the box for "Automatically manage paging
file size for all drives" is NOT checked.

Several years ago, I was one of those who frequently tweaked the page
file, trying to find the "right" or "best" settings for both size and
location. But since Vista (or was in WinXP) began to do a much better
job than older Windows versions in managing these things, I've seldom
felt the need to choose anything other than let the System manage them.
Especially with the much larger RAM resources that many of us have
today. Not like when 512 MB was a LOT of RAM and the system needed to
swap to/from disk much more often. ;^}

RC
Well, I've just looked at my two files, pagefile and hibernate. The
former is the size of available RAM (some goes for graphics), the latter
approx three quarters of it.

This matches with the finding of the chap who gives advice about
resizing it here;
http://tinyurl.com/6catr3l

AS to just why it's smaller than RAM, well, I don't know.

Ed
 
K

Ken Blake

Hi, Gordon.

No, I didn't specify the pagefile size. In fact, I haven't even looked at
that System setting page in months, and certainly not since I upgraded my
system this month, including the upgrade from 4 GB to 8 GB RAM. In checking
my setting just now, I see that it is still "System managed size", as it has
been for at least a couple of years. The 8 GB page file is all on Drive C:;
the box for "Automatically manage paging file size for all drives" is NOT
checked.

Same here, RC. My pagefile, untweaked, is the same size as my amount
of RAM, 6GB.
 
G

Gene E. Bloch

I more or less misspoke there. What I should have said is that most
current backup software knows how to back up files that are currently
open, and to do so without complaining. Where's the white-out when you
need it?
You did imply that when you said "It's been many years since I ran
across...", I just was adding info to your experience.

Save the whiteout for a *real* emergency :)
 
G

Gene E. Bloch

And, to Gene:

The date on that file should be the last time you started your computer with
hibernation enabled (or maybe if you enabled hibernation during a session -
I don't know about that). If it is any date other than today (or your
latest Windows start time), then it is sitting there unused, just taking up
disk space, so delete it. With or without it, if you DO use hibernate, the
file will be created anew the next time you enable it; this older
hiberfil.sys will never be used again.

RC
To both RC and Ed Cryer --

The hiberfil was created and accessed at the same date & time last
November, and last modified "about an hour" ago, which happens to be
"about when" I last booted. I have no idea what these dates & times
mean. I guess the system does something to the hiberfil even though it
should know that I don't plan to use it :)

As for the file itself (less than 75% of the RAM size, BTW), I've got
about 180GB free, so I don't much care about < 3GB for the moment.
 
Y

Yousuf Khan

I use Macrium for image backups. Using Macrium to mount my latest image,
I see a pagefile.sys of 3.80 GB.

I have no recent experience with other SW, but I do recall being
surprised that Macrium saves the pagefile.

BTW, there's also a hiberfile on that image - and I never sleep or
hibernate this computer :)

Well, I probably have done so and forgotten...
Macrium's documentation says that it doesn't save the pagefile or
hiberfile when you use "Intelligent Imaging". However, even if you do
use that option, it might save the file in name only, but not in actual
data.

Yousuf Khan
 
G

Gene E. Bloch

Macrium's documentation says that it doesn't save the pagefile or
hiberfile when you use "Intelligent Imaging". However, even if you do
use that option, it might save the file in name only, but not in actual
data.

Yousuf Khan
Could be. It shows the right sizes for them, but I never looked into
them. And I do think I use intelligent backup, but the user interface
can be weird...

I just looked. I can't open the real files in HxD, a hex editor, so I'd
have to view them from a boot CD. I expect I can view the cloned files
easily enough. No, I tried - I can open only the pagefile, not the
hiberfile.
 
Y

Yousuf Khan

Does it make any sense to move the Windows 7 swap file out of the boot
disk, and splitting it out over two other separate physical disks? I'm
thinking that the boot disk is usually the one that gets overloaded from
too much activity, so putting the swapfile on a couple of other data
disks will remove the stress from the boot disk, while having them over
multiple disks will reduce the stress on any one particular disk. I
figure that Windows will round-robin access to these disks. But I don't
know if this is actually how Windows works or not, can anybody confirm?
Should I just put it on one disk only? Windows always defaults to
putting it on the boot disk.

Yousuf Khan
Since posting the original question, I've found a good answer to this
question. Splitting the pagefile out over multiple disks does help
performance.

Yousuf Khan

***

Windows 7 virtual memory performance optimization
"Splitting the Page File

If you have two or more physical drives (not just two or more partitions
on a single physical drive), splitting the page file over each drive can
improve performance because it means that Windows 7 can extract data
from each drive's page file simultaneously. For example, if your current
initial page file size is 384MB, you'd set up a page file on a drive
with a 192MB initial size, and another page file on a second drive with
a 192MB initial size."
http://searchsystemschannel.techtarget.com/feature/Windows-7-virtual-memory-performance-optimization
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top