Jump to content

Clearing swap file with zeroes possible?


caps_buster

Recommended Posts

I noticed, that the size of the swap file is very dramatically reflected on the size of R-DriveImage backup of the system (Win2k SP4). That clearly indicate, that the data in swap file are not that well compresable and that lead me to idea, that if I can run some utility prior starting R-DriveImage for the backup, and that utility clear the swap file (all zeroes seems to be the best for compression), then I can have a much smaller backup files and much faster the time of restore.

When experimenting with Duron class CPUs (even underclocked, sometimes), this could be welcome speed up.

So I do wonder, if some utility like that does exist or if it can be done using some Win system functions, like the registers setting that clear the swap on reboot/shutdown.

Anyone know, if that could be done "on the fly" and not only on reboot/shutdown?

Link to comment
Share on other sites


Why would you want to backup the pagefile?

Traditionally, the pagefile should go, among others for the reason you mention, on another volume (better if on another disk).

In any case, if you are doing an image of the disk, it would be more logical to disable pagefile (it is normally possible with enough RAM, in 2K 1 Gb would be enough) and then zero just the pagefile.sys or zero the whole unused/unindexed space. (but then it would make more sense to do a backup and not an image :unsure:).

See also:

http://www.msfn.org/board/topic/156944-delete-not-clear-pagefile-at-shutdown/

jaclaz

Link to comment
Share on other sites

  • 4 months later...

I seem to remember that - unlike on XP - on 2K a pagefile is created anyway at next boot (even if it is "disabled"), and I seem to remember it was 2 Mb in size.

On the other hand, besides "proving a point" (whatever the point is) which is (nice) theory,  in practice it just amounts to "bearing with" a 2 Mb file.

 

An interesting experiment would be IMHO however (given that there is enough memory on the system and that as such the pagefile is not actually *needed*) to create a 2 Mb (or whatever is the minimum size that 2K wants) file, but make it a "sparse" file, and then check if it is actually "hit" and thus if it "grows" :unsure:.

 

jaclaz

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...