Back to Home

Speeding up the reaction of Windows XP / 7. Careful use of SSD drives

download acceleration · ewf · SSD · Enhanced Write Filter · SWAP · swap file

Speeding up the reaction of Windows XP / 7. Careful use of SSD drives

I read the topic "Do you have 2-3 HDD? We will speed up the loading and reaction of Windows and programs ”, which also tells you about my method of accelerating Windows. The beginning was the acquisition of the TS16GSSD25S-S SSD SLC disk and 4GB of memory (at that time I had WinXP 32bit) and the desire to squeeze the maximum out of the system. This method was tested by me for six months on XP and the same on 7.

So the goals are:


1. Protection of an SSD drive (there are a lot of opinions about their “survivability” if you put Windows and a swap file on them);
2. Acceleration of the reaction of Windows to user actions;
3. Acceleration of applications and system services;
4. Use of memory over 3 GB (in case the Windows does not see it).


Methods and tools:


1. The main tool of EWF (Enhanced Write Filter - advanced recording filter).
It is part of Windows XP Embedded. The main functions of the module are deferred recording to disk (all changed data is saved to the HDD immediately upon exiting the system or at the command of the user) and “freezing the system status” (any writing to the disk is prohibited, the system has a state at each time the PC is turned on) . In a network many descriptions and examples of using EWF (example here you can download the software and software controls the mode EWF work, a new version of EWF by Win7 network did not see, I can lay) Pros and cons of this module:
  • + Once a modified file (for example, the user registry file NTUSER.DAT) is stored in memory, all calls will go to its copy in memory, thereby increasing the speed of the system
  • + all recording to disk occurs in memory - increasing the speed of the system
  • + you can enable lazy recording on one specific disk partition
  • + it is possible to “discard” all changes to the disk at the user's command (for example, when installing heavy software)
  • - all recording to disk occurs in memory - loss of power leads to data loss (or rather to loss of changes per session)
  • - the buffer size in the memory is limited to 512MB - when it is completely filled, the SYSTEM WILL WELL DEAF with the loss of all changes per session (in Windows Embedded Standard 7, this limit is increased to ~ 1300 MB)
  • - there is no installer as such (you need to copy files with replacement, and edit the registry, and in safe mode, because some registry branches do not have access for reg files)

2. Method - transfer of TEMP files to a RAM disk.
We reassign the path of the TMP and TEMP environment variables to the RAM disk (System Properties - Advanced - Environment Variables). The Windows / TEMP and Documents and Settings \ User \ Local Settings \ Temp \ folders should be replaced with links to the TEMP folder in the RAM disk (this can be done by simply creating a folder shortcut or creating a "symbolic link" using third-party tools, such as those described here ). I don’t presume to make a better judgment. Spent little time on this issue, but everything worked fine for me. You need to make links only for “crookedly written” programs that assume the TEMP directory exclusively in the Windows folder. Pros and cons of the method:
  • + no need to clean the TEMP directory on the RAM disk (with each reboot, the data in them will be lost)
  • + some system acceleration
  • + some utilities allow the creation of a RAM disk in memory over 3 GB, thereby you can use the "inaccessible" memory
  • + rid of SSD drive from storing temporary files
  • - limited size of TEMP folders (for some software 500-800MB is not enough)
  • - some software throws off the data it needs after the reboot into the TEMP directory, naturally after it will not be there

3. Method - transfer of a SWAP file to a RAM disk.
It is possible to transfer the swap file to another disk by standard means, but I ran into a problem when the disk is picked up after starting the RAM system after picking up the SWAP file. As a result, Windows itself creates a resizable file on the disk with the system. The solution I found is the program addswap.exe (as part of the Gavotte RAMDisk utility), which allows you to “pick up” the page file after the system starts (in fact, it is recreated every time the system starts), and it’s possible to create the file not in the root, but according to a certain the way. You need to run it only once. Opinions on the question remain that drive C must have a swap file, albeit a minimum size (something with memory dumps when programs crash, etc.), as well as opinions about that without it, the system works almost better (I still don’t trust Windows, even seven, and try to “keep” a small 500-1000MB paging file in the system, it’s still in memory, but I recommend always using a “fixed” size swap file). Pros and cons of the method:
  • + faster paging file access
  • + creating a RAM disk in inaccessible memory over 3GB
  • + getting rid of SSD disk from swap file storage
  • + swap file fragmentation is no longer important
  • - limited paging file size

4. Tools - creating a RAM disk in an unused OS memory.
Let's say we have 32bit Windows, 4GB of RAM are installed, and the motherboard BIOS supports them. The OS usually sees 3 ... 3.5 GB of RAM, the rest remains unavailable (the PAE key in boot.ini did not help in my case). I know 2 programs that were able to create a RAM disk in inaccessible memory - SuperSpeed ​​RamDisk Plus and Gavotte RAMDisk. The first one is quite "heavy", it saves data from the RAM disk at shutdown, and restores it at system startup, but does not pick up the page file (the RAM disk is mounted too late at system startup). The second one is simple and not whimsical, it has the ability to work through the command line, you can save data manually (or by writing bat files for autoload), the main plus - I managed to install a swap file on it, so that at startup the system picks up on its own (but this happens a little crookedly - in the settings of the swap file in the OS, this SWAP file is not visible, but the total amount of SWAP is specified correctly). Both programs can create a TEMP folder when mounting a drive (convenient if the "do not save data when turning off the computer" mode is used). And one more noticeable minus of SuperSpeed ​​- let's say you use “save data on shutdown”, if the disk is 100MB full, it’s logical that the image file of this disk will be comparable, BUT if you ever filled a 300 MB disk, then the disk image will never be smaller size (at least delete all data from the RAM disk), only re-creating the disk helps. Both programs can create a TEMP folder when mounting a drive (convenient if the "do not save data when turning off the computer" mode is used). And one more noticeable minus of SuperSpeed ​​- let's say you use “save data on shutdown”, if the disk is 100MB full, it’s logical that the image file of this disk will be comparable, BUT if you ever filled a 300 MB disk, then the disk image will never be smaller size (at least delete all data from the RAM disk), only re-creating the disk helps. Both programs can create a TEMP folder when mounting a drive (convenient if the "do not save data when turning off the computer" mode is used). And one more noticeable minus of SuperSpeed ​​- let's say you use “save data on shutdown”, if the disk is 100MB full, it’s logical that the image file of this disk will be comparable, BUT if you ever filled a 300 MB disk, then the disk image will never be smaller size (at least delete all data from the RAM disk), only re-creating the disk helps.

5. Method - do not store personal data on the disk with the system, and even less on the desktop.
All “My Documents”, films, photos, etc. I advise you to store it NOT on the system partition of the disk. We can call the reason the slowdown, especially when the whole thing is stored on the desktop, but the main reason is the safety of the data. Personally, I switched to using the server at home a long time ago - all the data in the family is stored there, it is reliable and makes it possible to access them from any computer, laptop and PDA. It is always on, always available, and when asked why you need to keep the server just for this - I have a NAS server only part of its capabilities. In connection with the problem of inaccessibility of data "outside the house" - I believe you will come up with a solution (my solution is a VPN connection, and no more than 10 files on a laptop / folder with you). There is still a sense of “impunity”, I remember sweating in 96g, realizing that an important section on hard had collapsed, now I’m casting over Windows as I want, with confidence that if I have a problem, I’ll restore it from the Acronis image in 10 minutes (on the same server there are about 10 images on different computers and laptops and with different OSs for them). Another plus - I have enough 16GB hard drive to work under Win7.

6. Method - transfer of user folders to RAM disk.
Do not hit hard - I had reasons to do so. First I turned on EWF mode on the system drive, after some time I began to miss the 512MB buffer for comfortable work (I had to restart the computer once every 1-2 days, but usually it stayed in my “sleep mode” for weeks and rebooted extremely seldom). After analyzing which files change most often (while eating the EWF buffer), I came to the conclusion that these are to a lesser extent the Windows files themselves in the WINDOWS and Program Files folders and to a greater extent the current user folder. It was decided to split the user folder (in my case, two users) and the Windows / program files to different disks.
The minimum program is to make 2 logical drives - on the first Windows, on the second two user folders from Documents and Settings. Enable EWF for each drive, thereby increasing the total maximum buffer to 1GB.
The maximum program is to transfer the user folder to a saved RAM disk - we will get a very decent increase in speed, but you need to save the image of this disk to the section WITHOUT EWF, that is, there is a risk of overflowing the buffer and getting stuck when the system reboots when the RAM disk image is saved. Pros and cons:

  • + A noticeable increase in speed (shortcuts, part of the registry, desktop - all this is now in memory)
  • + the response of the system to user actions is simply amazing !!!
  • + EWF buffer is now not decreasing so quickly (you can work without rebooting 3-5 days)
  • - the same risk of losing changes per session due to a freeze / loss of power
  • - size is limited (sometimes the user's folder can be simply huge)


7. Method - the correct layout of the SSD drive.
The problem is quite logical when a logical data block (equal, for example, to one physical block on a disk) is located on a disk with an offset. The consequence of this is that when reading / writing one logical data block, work occurs with the “two halves”, but in fact with two physical blocks on the disk. In theory, when formatting a disk for Win7, such problems should not arise, but it is still advisable to check this, for example, using the Paragon Alignment Tool.

So, we take a picture of the universe and stupidly look at what’s what ...
I’ll try to more clearly describe what I did and the sequence of actions to achieve this.

I started with Windows XP 32bit

The structure of the disks should be as follows:

real partitions or disks (NTFS)
C: - preferably the first one on the fast disk, Windows on it (minus the TEMP folder and user folders from Documents and Settings) and the “most important” software. EWF is enabled in deferred recording mode.
D: - the second section in the system, without any accelerators - the main thing is reliability. Personal documents, installed toys, some software are stored, the image of the RAM disk is also saved here when turned off.

frame disks (FAT32)
E: - frame disks, with saving data to an image on disk D, on which the transferred user profiles are located. Estimated size 300-400Mb.
F: - ram disk without saving data, at the root is the page file, TEMP folder for storing temporary files. 500-600Mb.

You can do without the letters E and F if you connect the volumes of RAM disks as "empty NTFS folders." For example, connect drive E as the folder c: \ Documents and Settings \ username \ and cancel the drive letter, and F screw the drive to the windows / temp directory to cancel the drive letter, but SWAP will have to be thrown under the same folder instead of to the root. For SuperSpeed ​​RamDisk Plus, this can be done through the Windows "Disk Management", for Gavotte RAMDisk you will have to work through the command line directly with the utility. This method is more preferable since you don’t have to bother with “symbolic links” (folders pointing to another directory or disk) and many disks are not created in the system.

Now to the implementation.
Suppose we have a disk (SSD or simple HDD), on it there are two partitions, C: for the system and D: for user data.
Disable file indexing on all NTFS volumes (this is bad for SSDs), swap file, system recovery, hibernation (unfortunately, you only have to use standby mode).
We clean the folders c: \ WINDOWS \ Prefetch and c: \ Windows \ system32 \ dllcache \. We execute
in the command line sfc / cachesize = 0 .
Install SuperSpeed ​​RamDisk, throw in the Program Files program Gavotte RAMDisk. To use inaccessible memory for them, in SuperSpeed ​​you need to check a few checkboxes (google for more details), in Gavotte - register in the registry [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ RRamdisk \ Parameters] "UsePAE" = dword: 00000001 (usually there is reg file).
We create a SuperSpeed-th RAM disk, set the image saving mode when it is turned off (the storage location is disk D). It will create a drive with a letter.
We reboot and enter under the Administrator (if one is not visible - display the administrator at startup [HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Winlogon \ SpecialAccounts \ UserList] dword type "Adminus" = "00000001"). Handles move everything from c: \ Documents and Settings \ username \ to the newly created RAM-disk (the folder - the source should be empty) and go to My computer - Management - Disk Management. We find the RAM disk, delete the drive letter and create the path by specifying the user folder on drive C. Everything, now you can go under it and check the stability - your data is stored in memory and written to the image on disk D during reboots.
Now create a ram disk using Gavotte RAMDisk, specify the size, delete the drive letter (backspace) and click "apply". Next, mount the disk as a folder by running rdutil link C: \ windows \ temp (having cleaned it beforehand). It is also necessary to rewrite the paths of the tmp and temp environment variables to this path (the temp folder inside the user profile is initially used).
Now you need to connect the SWAP file, and in the same temp folder - execute addswap C: \ windows \ TEMP \ pagefile.sys 384 384 . You can check whether the file is picked up at startup by rebooting and trying to remove it from temp (the system should not allow it), and neither pagefile.sys nor hiberfil.sys should be in the root of the C drive.
The last step is to reboot in safe mode, copy the files for EWF and run the reg file (usually it goes with the archive). When using the reg file, he must answer that ALL data is transferred. Next, we reboot and activate the delayed recording mode.

Some optimization of Windows is also desirable - I’m listing a reg file that I run every time I install XP for everyone! user. It does not pretend to be super correct, so I advise you to analyze each item and decide whether you personally need it.

[HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ Memory Management \ PrefetchParameters]
"EnablePrefetcher" = dword: 00000000
[HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Dfrg \ BootOptimizeFunction]
"Enable" = "N"
"OptimizeComplete" = "No"
[HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ OptimalLayout]
"EnableAutoLayout" = dword: 00000000
[HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ FileSystem]
NtfsDisabledotabletotdotabledotdtabledotabledotdtabledotabletot
0000_tempdatedotabletod 0000_temp : 00000001
[HKEY_LOCAL_MACHINE \ the SYSTEM \ CurrentControlSet \ the Control \: Session Manager \ the Memory Management]
«DisablePagingExecutive» = dword: 00000001
«LargeSystemCache» = dword: 00000001
«IOPageLockLimit» = dword: 03e80000
[HKEY_LOCAL_MACHINE \ the System \ CurrentControlSet \ the Control \ PriorityControl]
« Win32PrioritySeparation "= dword: 00000005
[HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager]
«BootExecute» = ""
[HKEY_LOCAL_MACHINE \ the SYSTEM \ CurrentControlSet \ the Control \ PriorityControl]
«IRQ8Priority» = dword: 00000001
[HKEY_LOCAL_MACHINE \ the SYSTEM \ CurrentControlSet \ the Control \: Session Manager \ SUBSYSTEMS]
«the Posix» = -
«Optional» = -
[HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ AeDebug]
"Auto" = "0"
[HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer]
"NoRecentDocsHistory" = dword: 00000001
[HKEY_CURRENT_USER \ Control Panel \ Desktop]
" MenuShowDelay "=" 50 "
" FontSmoothing "=" 2 "
" FontSmoothingType "=" 2 "
" FontSmoothingOrientation "=" 1 "
[HKEY_CURRENT_USER \ software \ microsoft \ windows \ currentversion \ explorer \ advanced]
"TaskbarGroupSize" = dword: 00000006
"SeparateProcess" = dword: 00000001
[HKEY_CURRENT_USER \ Control Panel \ Keyboard]
"InitialKeyboardIndicators" = "2"
[-HKEYLOC_OC Microsoft \ Windows \ CurrentVersion \ Explorer \ MyComputer \ NameSpace \ DelegateFolders \ {59031a47-3f72-44a7-89c5-5595fe6b30ee}]
[HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control]
"WaitToKillServiceTimeout" = "10000"
[-HL_ALFT Windows \ CurrentVersion \ Explorer \ RemoteComputer \ NameSpace \ {2227A280-3AEA-1069-A2DE-08002B30309D}]
[-HKEY_LOCAL_MACHINE \ SOFTWARE \ the Microsoft \ the Windows \ CurrentVersion \ Explorer \ RemoteComputer \ NameSpace \ {D6277990-4C6A-11cf-8D87-00AA0060F5BF}]
[the HKEY_CURRENT_USER \ Software \ the Microsoft \ the Windows \ CurrentVersion \ the Policies \ Explorer]
«NoFavoritesMenu» = dword : 00000001
NoRecentDocsMenu = dword: 00000001
NoSMHelp = dword: 00000001
MemCheckBoxInRunDlg = dword: 00000001
NoActiveDesktop = dword: 00000001
NoLowDiskSpaceChecks = dword: 00000001
No dword: 00000001 No dword: 00000001 No dword: 00000001 No


Now about Windows 7 32bit


The excellent EWF will work with this Windows, but it turned out to get a new version from Windows 7, which has a write-back buffer of about 1300 MB. In this regard, there is no need to transfer the user folder from Documents and Settings (besides the latter has grown to indecent sizes) and all the manipulations come down to turning on EWF, adding a RAM disk using Gavotte RAMDisk and moving the swap file there. Reg file is also more modest because I’m not sure of the relevance of many parameters, I left only a few of them.

[HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ Memory Management \ PrefetchParameters]
"EnablePrefetcher" = dword: 00000000
[HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Dfrg \ BootOptimizeFunction]
"Enable" = "N"
[HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ OptimalLayout]
"EnableAutoLayout" = dword: 00000000
[HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ FileSystem]
"NtfsDisableLastAccessUpdate
[ SECMET \ Control Panel \ SYSTEM \ SYSTEM \ CONTEMK \ CONTEMK \ SYSTEM \ CONTEMK \ CONTEMK \ CONTEMK \ CONTENT Memory Management]
"LargeSystemCache" = dword: 00000001
[HKEY_CURRENT_USER \ Control Panel \ Desktop]
"MenuShowDelay" = "150"
[HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager]
"BootExecute" = ""
[HKEY_LOCAL_MACHINE \ SOFT \ SOFT \ Windows NT \ CurrentVersion \ AeDebug]
"Auto" = "0"
[HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer]
«NoRecentDocsHistory» = dword: 00000001
[-HKEY_LOCAL_MACHINE \ SOFTWARE \ the Microsoft \ the Windows \ CurrentVersion \ Explorer \ MyComputer \ NameSpace \ DelegateFolders \ {} 59031a47-3f72-44a7-89c5-5595fe6b30ee]
[HKEY_LOCAL_MACHINE \ the SYSTEM \ CurrentControlSet \ the Control]
«WaitToKillServiceTimeout "=" 10000 "
[-HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Explorer \ RemoteComputer \ NameSpace \ {2227A280-3AEA-1069-A2DE-08002B30309D}]
[-HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ NameSpace \ {D6277990-4C6A-11CF-8D87-00AA0060F5BF}]
[HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer]
"MemCheckBoxInRunDlg" = dword: 00000001
"NoLowDiskSpaceChecks = = NoLowDiskSpaceChecks =


For the convenience of using EWF, I have two batch files on my desktop. The first flushes the buffer to disk and turns off EWF until the next boot of the system (relevant when installing the software). The second briefly shows how much buffer was used up:

EWF memory reset. Bat
ewfmgr c: -commitanddisable -live
ewfmgr c: -enable
pause


EWF state.
Bat @ewfmgr -all | find "Volume Name"
@ewfmgr -all | find "State"
@ewfmgr -all | find “Boot Command”
@ewfmgr -all | find "Memory used for data"
pause

Read Next