clearing pagefile on shutdown

Discussion in 'other software & services' started by hadi, Apr 9, 2005.

Thread Status:
Not open for further replies.
  1. hadi

    hadi Guest

    one of XP tweaks is "clear pagefile on shutdown"
    I know what pagefile for. BUT what are the benefits and/or advantages/disadvantages of clearing it. and why this function is not "ON" by default. Thank you
     
  2. ronjor

    ronjor Global Moderator

    Joined:
    Jul 21, 2003
    Posts:
    57,729
    Location:
    Texas
    The pagefile (swap file) stores info on your hard drive. It could contain information such as passwords, etc.
    Windows uses a pagefile when RAM is in use or there is not enough RAM on the computer.
    Windows will always create a swapfile so it is there if needed. So, if the pagefile is deleted or cleared, Windows will rebuild another file.
    If you choose to delete the pagefile on every shutdown, there will be a lag while Windows deletes this file. That is the only reason I can think of as to why it is not the default setting.
    A Windows delete is not a secure delete. For deleting files securely, you need a program like Eraser that will wipe your pagefile at shutdown. Again, there is a delay while this takes place.

    http://www.heidi.ie/eraser/
     
    Last edited: Apr 9, 2005
  3. Alec

    Alec Registered Member

    Joined:
    Jun 8, 2004
    Posts:
    355
    Location:
    Dallas, TX
    I'm not 100% sure, but I think the option actually writes zeros through pagefile.sys rather than doing a file delete. I believe it was a requirement for the OS, in order to meet one of the government's security testing criteria. It takes extra time on shutdown, though, as previously noted.
     
  4. ronjor

    ronjor Global Moderator

    Joined:
    Jul 21, 2003
    Posts:
    57,729
    Location:
    Texas
    I need to add, you can lower the size of the page file. I have found on XP at least, to let Windows manage the memory.

    I had'nt heard of that option Alec.
     
  5. Firecat

    Firecat Registered Member

    Joined:
    Jan 2, 2005
    Posts:
    7,927
    Location:
    The land of no identity :D
    I can tell ya something, I read in a magazine where it said that one guy did this tweak and it increased his shutdown time by 2 minutes or so...but then his PC was only a P3 600MHz with 128MB RAM....
     
  6. Alec

    Alec Registered Member

    Joined:
    Jun 8, 2004
    Posts:
    355
    Location:
    Dallas, TX
  7. hadi

    hadi Guest

    Thank you all
    as I mentioned I know what is page file used for. I dont want to play with its size. Leave Windows to handle this. it actually increases the shutdown time up to a minute not more than that(depend on speed of the processor ofcourse). BUT I still ask What is the gain of clearing the page file. In another way does it do harm if left uncleared/cleared. Thanks =)
     
  8. Alec

    Alec Registered Member

    Joined:
    Jun 8, 2004
    Posts:
    355
    Location:
    Dallas, TX
    It's like Ronjor said, it's a security/privacy concern. Someone could discover passwords, processes, private information, etc. by examining the pagefile.sys file on the harddrive. Now, the fact the pagefile.sys gets locked for access by the system and largely continually overwritten may mitigate the threat to some degree. However, I suppose it's possible for some kernel driver to pick up on the data in the file, but then again I suppose if the bad guys placed an executing kernel driver on your system then you would have bigger issues to worry about. I suppose, also, that the bad guys could pick up information from the file if they had physical access to the computer/drive, and booted off of MSDOS with NTFSDOS or some other type of utility. But, then once again, you probably have bigger issues to worry about if some bad guy has physical access to your drive/computer. The upshot... I wouldn't worry about it. Like I said, I think it was mainly a government testing requirement.
     
  9. whistl3r

    whistl3r Registered Member

    Joined:
    Apr 7, 2005
    Posts:
    69
    Actually, Windows writes to the page file in 1 & 0's, but it is not DOD complient. DOD is 7 writes or greater, but the higher you go you risk damaging the disk.

    It's best to clear your page file if your PC is used by others or your just paranoid. However, placing your page file on a "Seperate" partition on the last sector of your hard drive is most suitable. Having your Page file on the same partition as your Operating System is not recommended. Your PC will apprciate you if this is done.

    It is not on by default as being the "End User" you should not have to worry about clearing your page file at every shutdown/reboot. Leaving it off speads up the PC, the customer is only worried about "Is it fast?" On the IT side of things clearing the page file leaves a huge advantage, however it can always be done through registry settings in prev versions, for the End User since workstations are freely available to everyone but sittuated in within your personal working space. Not all companies allow sharing of PC's however the issue is that any one person, with the know how, can walk up to your PC and retrieve cached information if not dealt with correctly.
     
    Last edited: Apr 9, 2005
  10. hadi

    hadi Guest

    @whistl3r
    Thank God its not 7 writes. I dont wait till tomorrow just for shutdown!

    @
    Is the size of page file propotional to the size of physical memory?
    coz I've noticed when I increase the puhsical memory (RAM) the pagefile increses its size too
     
  11. whistl3r

    whistl3r Registered Member

    Joined:
    Apr 7, 2005
    Posts:
    69
    It's 1 - 1.5x your physical memory, same goes for setting an individual partition to deal with your page file.

    A large PF is not needed if you have a Gig or more of memory.
     
  12. hadi

    hadi Guest

    @whistl3r

    RAM: 2Gb
    I'll leave every thing as is since the system is running smooth without errors.
    I was wondering what is the reason for clearing the pagefile.
    Thanks
     
  13. whistl3r

    whistl3r Registered Member

    Joined:
    Apr 7, 2005
    Posts:
    69
    Scroll up and you may find the answer :)
     
Thread Status:
Not open for further replies.