configure windows to QUICKLY delete pagefile on shutdown? (not wipe)

7point5

New member
Member
Local time
4:55 AM
Messages
58
so I just discovered what may be one of the dumbest design choices ever if this is true: when configuring windows to clear the pagefile on shutdown (by flipping the ClearPageFileAtShutdown value in registry to 1) windows actually overwrites the entire file :mad: (with zeroes probably)
so obviously when that file's several gigs then it takes several minutes to shutdown

anyone found a way to instead tell windows to simply delete it instead? (like users can do by right-clicking delete with the mouse or typing "del pagefile.sys" in command line)



PS. I wanna delete that damn file on shutdown not for security reasons but practicality: so that when backing up with Ghost I don't have to delete it manually (which isn't possible to do in command line outside windows anyway)

also I've read that starting windows without previous pagefile seems to slightly improve performance or something, dunno if that's true
 

My Computer My Computer

At a glance

windows
Computer type
PC/Desktop
OS
windows
I might be wrong but I would think that Windows empties the Page file on shut down & this is often the reason shut down can be delayed.

A good back up program should not include the Page file as files in the Page file are going to vary all the time, so backing them up would seem futile.

Fiddling with the Page file will probably end up in tears as you really don't know what files are in it.
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64 bit sp1Intel i5 3570 3.4Ghz Ivy Bridge SKT 1155 quad...G-Skill Rip Jaws 16Gb (8x2) DDR3 -1600 PC3 12...Gigabyte NVIDIA GT610 1Gb DDR3 810/1200 PCI-E...
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built using existing case
OS
Windows 7 Home Premium 64 bit sp1
CPU
Intel i5 3570 3.4Ghz Ivy Bridge SKT 1155 quad core
Motherboard
Gigabyte Z77-HD3 SKT 1155 2xSata 3, 4x USB 3.0
Memory
G-Skill Rip Jaws 16Gb (8x2) DDR3 -1600 PC3 12800 CL 10 red
Graphics Card(s)
Gigabyte NVIDIA GT610 1Gb DDR3 810/1200 PCI-E 2.0 Silent
Sound Card
NVIDIA High Definition & Realtech High Definition Audio
Monitor(s) Displays
2 x Philips 226V4L 16:9 aspect ratio
Screen Resolution
1920 x 1080 HD
Hard Drives
Samsung 840 Pro 256gb SSD, SATA 3.
Hitachi Touro Portable 1tb, USB 3.0 HDD used for image b/ups.
PSU
Corsair VS450
Case
Codeng
Cooling
PSU fan & CPU fan
Keyboard
Logitech
Mouse
Logitech Wireless trackball M570
Internet Speed
Wireless 3G. 3mg down & 550kb up.
Antivirus
Bitdefender Internet Security 2020
Browser
Opera (Current Version) & Firefox
Other Info
MS Office 2013 Pro. Davis weather station software. MGE Nova 600 avr UPS.
I very much doubt Microsoft would provide an option to delete the pagefile on shutdown. Raymond Chen, a Microsoft developer since Windows 95 days, would call this a security hole disguised as a feature.

From a security standpoint, which is the entire purpose of the registry setting, deleting the pagefile would serve no real purpose. As is quite well known recovering a deleted file that has not been overwritten is not particularly difficult. For any hacker wishing to access the pagefile this would be a mere speedbump. Overwriting the pagefile is the only way to provide the security the setting was designed to provide. Windows will not allow deleting the pagefile while it is running. That would almost certainly result in a system crash.

Yes, overwriting a large pagefile will take time. That is why it is not enabled by default. In a high security environment this might be a good idea but it makes little sense outside a comprehensive security policy. Most computers have security holes more serious than an uncleared pagefile. The setting has no other benefits.

Most disk imaging software will either provide an option to not copy the pagefile or will not do it at all. Macrium Reflect simply will not copy the pagefile or hibernation file in an image backup.
 

My Computer My Computer

At a glance

Windows 7 Pro 64 bitXeon W35208 GBNvidia Geforce 210
Computer type
PC/Desktop
Computer Manufacturer/Model Number
HP
OS
Windows 7 Pro 64 bit
CPU
Xeon W3520
Memory
8 GB
Graphics Card(s)
Nvidia Geforce 210
There is a configuration which will achieve your object, and that is to set up a 'ramdisk' or 'virtual drive' in memory, and configure Windows to place the pagefile in the ramdisk (not on drive C).

You may need to instal more RAM to make this feasible. If you're using 32-bit Windows, you are limited to a total of 3.2Gb (usable), so you would configure the ramdisk to use no more than (say) 1.5Gb. Of course, if you are using 64-bit, the sky's the limit. There are some good freeware ramdisk drivers out there for download, but they are not all equally fast (or user-friendly to set up!), so you should do some googling for benchmarks and reviews before you make a final choice. Advantages of a ramdisk pagefile:

(1) Instantaneous response, because it's located in memory.

(2) It evaporates instantly when you shut down. A new blank pagefile is set up each time you boot Windows (this has no impact on boot time).

(3) Any malware which has established itself in the pagefile is flushed away on shutdown.

I know this is a tardy reply, but I've only just come across this thread!
 

My Computer My Computer

At a glance

Windows 7 Home Premium 32 bit
Computer type
PC/Desktop
OS
Windows 7 Home Premium 32 bit
1) is it true ramdisks use up an entire core of the CPU?

2) if pagefile is on a ramdisk what happens if I boot into safe mode will ramdisk still be there (and if not where will the pagefile be stored?)
 

My Computer My Computer

At a glance

windows
Computer type
PC/Desktop
OS
windows
If you have enough spare RAM to host the Swap File (Pagefile), it's far better to leave things well alone .

The pagefile will only be used if you run out of usable ram so a pagefile in RAM creates an Endless Causality loop.

as the default for the page file is 1.5 times the amount of installed RAM, it's an impossible task to have this stored in RAM, if you have enough ram to spare just reduce the size of the Pagefile to 256MB, (some programs expect the Pagefile to be present so it's detrimental to the system to set it to zero). Also if you are running an SSD or other Solid State Disks there is little access overhead for the traditional PageFile .

The whole concept of a ramdisk was to use spare ram to speed up operation of programs by using it as a fast disk. Modern SSD's are now cheaper and faster that the older HDDs which caused the problems and indeed they may be faster than the RAM in those days
 

My Computers My Computers

  • At a glance

    Windows 11 Pro x64 [Latest Release and Releas...Ryzen 9 5950X, 3.8 - 5.2 MHz64GB [2 x 32GB] DDR4 3200MHz4GB NVIDIA GEFORCE GTX 1650 Ti
    Computer type
    PC/Desktop
    Computer Manufacturer/Model Number
    ChillBlast - Custom to my design
    OS
    Windows 11 Pro x64 [Latest Release and Release Preview]
    CPU
    Ryzen 9 5950X, 3.8 - 5.2 MHz
    Motherboard
    Asus Prime X570-Pro
    Memory
    64GB [2 x 32GB] DDR4 3200MHz
    Graphics Card(s)
    4GB NVIDIA GEFORCE GTX 1650 Ti
    Sound Card
    On-board SPDIF to 5.1 System + HDMI [5.1 system]
    Monitor(s) Displays
    32" UHD 32 Bit HDR Monitor + 43" UHD 4K 32Bit HDR TV
    Screen Resolution
    2 x 3840 x 2160 @60Hz
    Hard Drives
    1TB M2 SSD OS, 500GB Fast Access SSD, 2 x 8TB Data + Various Externals from 1TB to 4TB, 10TB NAS
    PSU
    NZXT C750 80 PLUS Gold 750W Modular PSU
    Case
    Workstation Case [Matt Black]
    Cooling
    NZXT Kraken X63 280mm CPU Cooler +2x Quiet Case fans
    Keyboard
    Logitech Wireless MX Keys & K400 + others
    Mouse
    Logitech Wireless MX Master 3S
    Internet Speed
    920 MB Down 50 MB Up
    Antivirus
    BitDefender Total Security Pro
    Browser
    Chrome (always run latest Non-Beta)
    Other Info
    Also run ...
    Laptop - Quad 8GB - Windows 10 Pro x64
    Nexus 7 Android tablet x2
    Samsung 10.2" tablet
    Blackview TAB 8 4G Android Tablet c/w Keyboard
    Wacom Intuos Pro Medium Pen Pad
    Wacom Intuos Pro Small Pen Pad
    Wacom Expresskeys Remote
    Loopdeck+ Graphics Controller
    Shuttle Pro v2 Control
  • At a glance

    Windows 11 Pro x64 Latest RPIntel I7 10750H 5.0GHz32GB [2x16GB] DDR4 2933 MHznVidia GTX1650Ti 4 GB GDDR6
    Computer type
    Laptop
    System Manufacturer/Model Number
    Dell XPS 17 10750H
    OS
    Windows 11 Pro x64 Latest RP
    CPU
    Intel I7 10750H 5.0GHz
    Motherboard
    Dell XPS
    Memory
    32GB [2x16GB] DDR4 2933 MHz
    Graphics Card(s)
    nVidia GTX1650Ti 4 GB GDDR6
    Sound Card
    Stock [Realtek] 4 Speaker
    Monitor(s) Displays
    17" IPS UHD+ Infinity Edge Touchscreen
    Screen Resolution
    3840 x 2400
    Hard Drives
    2TB M2 NVMe, 4TB External + various 500GB & 1TB External NVMe (also have access to spinner HDD from
    PSU
    Stock
    Case
    Stock XPS Aluminium & Carbon Fibre
    Cooling
    Stock - Active Fan Control
    Keyboard
    Backlit + Various Logitech
    Mouse
    Stock Track Pad + Logitech MX Trackball
    Internet Speed
    72 MB Down 18MB Up
    Browser
    Chrome
    Other Info
    Also run ...
    Laptop - Quad 8GB - Windows 10 Pro x64
    Nexus 7 Android tablet x2
    10.2" tablet
    Sony Z3 Android Smartphone
    Wacom Intuos Pro Medium Pen Pad
    Wacom Intuos Pro Small Pen Pad
    Wacom Expresskeys Remote
    Loopdeck+ Graphics Controller
    Shuttle Pro v2 Control Pad
    10TB NAS
1) is it true ramdisks use up an entire core of the CPU?

2) if pagefile is on a ramdisk what happens if I boot into safe mode will ramdisk still be there (and if not where will the pagefile be stored?)

I've never heard that a ramdisk uses an entire core - I'm open to be corrected, but I would be very surprised if that's the case, because ramdisk works perfectly well with single-core processors. It's possible there are ramdisk drivers out there which try to sequester an entire core for themselves, if one is available, but I'm not aware of any. As for working in safe mode, I'm not in a position to test that at the moment, but it might depend on your system. Like any other system device, ramdisk works from a driver loaded at startup, so it depends whether safe mode considers it to be an essential driver or not. If the ramdisk fails to load, the pagefile will default to drive C.

With regard to SSD's, the pagefile is a very dynamic file which continually varies in size and content, so loading it into a ramdisk will significantly reduce wear and tear on the SSD.

In a 32-bit system with 3.2Gb usable RAM, I have always found that 1.5Gb is sufficient for the ramdisk, especially if the startup list is cleaned out to the essentials (which is something you should do whether you have a ramdisk or not, because it benefits your system in lots of ways, eg by speeding up boot time and reducing memory consumption).

The space needed by the pagefile is determined partly by available memory, but mainly according to the tasks you are performing, and I have found that it is generally well under 1Gb on any well-maintained system.
 

My Computer My Computer

At a glance

Windows 7 Home Premium 32 bit
Computer type
PC/Desktop
OS
Windows 7 Home Premium 32 bit
1) is it true ramdisks use up an entire core of the CPU?
I can't see how this would be even possible. In Windows there is no provision for dedicating a core to a specific process or device driver. Affinity settings don't work that way. You can restrict a process to a single core but this is not exclusive. The thread scheduler can and will use this core for any other purpose it chooses, subject of course to other affinity restrictions.

2) if pagefile is on a ramdisk what happens if I boot into safe mode will ramdisk still be there (and if not where will the pagefile be stored?)
Safe mode uses only a set of defined essential services and drivers, which the RAMDisk driver will not be among. If no other pagefile is defined and you boot into Safe mode you will have no pagefile. I am about 99% certain of this. I have no intentions of trying this.

As for putting the pagefile on a RAMDisk:

Creating a RAMDisk is usually a poor use of memory. Putting the pagefile on it is a particularly poor use of memory. The idea that it would be beneficial is primarily based on misconceptions of how the pagefile is used. To be sure there are many such misconceptions. Most descriptions I have seen regarding the pagefile are at least partly wrong. Even Microsoft user level documentation is very misleading.

Having the pagefile on a RAMDisk may benefit certain aspects of performance performance under some specific situations but it will take a hit elsewhere. On the whole it will cost performance.

The pagefile is simply a place where infrequently used data can be offloaded from RAM thus leaving more of it for more important uses. Putting the pagefile on a RAMDisk results in data being shuffled around from one location in memory to another with no real gains. Don't be fooled by the Task Manager memory gauge into thinking you have a lot of of unused memory. All memory except that labeled as Free is in use.

These views of having the pagefile on a RAMDisk are not just my own. They are sheared with many Windows experts whose knowledge and experience far exceed my own. And they have used far stronger language than I would care to use here.
 

My Computer My Computer

At a glance

Windows 7 Pro 64 bitXeon W35208 GBNvidia Geforce 210
Computer type
PC/Desktop
Computer Manufacturer/Model Number
HP
OS
Windows 7 Pro 64 bit
CPU
Xeon W3520
Memory
8 GB
Graphics Card(s)
Nvidia Geforce 210
Last comments from me...

Unless you tell it to do otherwise, Windows will always initialise (and use) a pagefile on drive C, no matter how much memory is installed. It's an essential feature of the Windows design philosophy. If you configure a ramdisk pagefile, and it doesn't initialise, Windows will display a message to inform you that it's setting up a temporary pagefile on drive C.

I once heard that you can force Windows to retain the pagefile contents in volatile memory, without needing to use a separate ramdisk, by executing a runtime instruction. However, I can't find any reference to this on the web. All the discussion suggests it's either impossible or, at best, complex and tricky to set up.

If it could be set up, I'm not aware what the relative advantages and disadvantages might be, compared with a ramdisk. The configuration might be more likely to crash, because any failure such as a memory conflict, a runaway thread, or a simple memory overflow, would be uncontained and therefore potentially catastrophic. The problem might be contained, or not arise in the first place, if the guilty files were sequestered in a pagefile within a ramdisk; I suspect an overflowing ramdisk pagefile would simply spill over into drive C. But that's just my speculation.

The point about minimising wear to SSDs is especially relevant to computers which have the SSD soldered directly to the motherboard. Out of warranty, in the event of a breakdown, these are not economically replaceable and the data will probably be unrecoverable, so you would naturally want to maximise life expectancy.
 
Last edited:

My Computer My Computer

At a glance

Windows 7 Home Premium 32 bit
Computer type
PC/Desktop
OS
Windows 7 Home Premium 32 bit

My Computer My Computer

At a glance

Win 10 x64, Linux Lite, Win 7 x64, BlackArch,...
Computer type
PC/Desktop
Computer Manufacturer/Model Number
HP Desktop & Compaq Laptop
OS
Win 10 x64, Linux Lite, Win 7 x64, BlackArch, & Kali
Hard Drives
Samsung 850 Pro 256Gb,
Hitachi HDD 1Tb,
Crucial MX SSD 250Gb
Segate 3Tb USB 3.0 Ext. Backup HDD
Internet Speed
150Mbps dn, 20Mbps up
Antivirus
Avast Free, Malwarebytes Anti-Exploit & Anti-Ransomware
Browser
Firefox, Chrome, Opera, & VPN
Back
Top