Real world Windows 7 SSD tweaks and optimization
Published by lightningltd
14 Mar 2010
|14 Mar 2010||#1|
| || |
Moving parts of Windows 7 to another drive...
It has been asked what other little things can be done to squeeze a litle more performance from Windows 7 on our SSD drives... One thing that helps maintain performance on an SSD is the percentage of free space available to the SSD controller to execute 'wear leveling'. Basically, spreading out the load to the least used empty memory cells.
In order to do this, we need to fool Windows and other programs into looking elsewhere for stuff that is necessary, but rarely used and taking up a lot of disk space.
This part is only useful IF you have your operating system on your SSD AND it is formatted as NTFS and have a second drive available (NTFS) with space free to use.
What we are going to do is move certain directories to the other drive, then make Windows (and the programs) think it is still on the boot drive. We do this by using an NTFS 'junction'. Think of a junction as a pointer to a location. To the operating system, the files look like they are in location A, but they are really physically in location B.
For the tutorial, we are going to assume that the SSD is C: and the second drive is E:. Substitute your drive letters as needed. As always, MAKE A BACKUP FIRST!
If you are still with me, here is how to do it (the easy way):
Go to Link Shell Extension and download (and INSTALL) the link shell extension software (and VC runtime, follow the instructions on the site) for your flavor of Windows 7 (or barf Vista ).
Make sure explorer is set to SHOW hidden and system files (Tools/Folder Options/View tab, Show hidden, uncheck Hide protected operating system and hide extensions)
Create the following directories:
Boot into safe mode. Open explorer and navigate to C:\Windows.
Right click on the Installer directory and select CUT
Navigate to E:\WinSystem\Windows right click and select paste. It should have created the directory E:\WinSystem\Windows\Installer with files in it.
Right click the directory E:\WinSystem\Windows\Installer and select Pick Link Source.
Navigate to C:\Windows and right click in the directory and select Drop As and select Junction.
You should now see C:\Windows\Installer is back (with a wierd link on the folder icon)... The OS now will put installer files on the other drive and look for them there, but think it is still on c:!
Other directories I do this with are the HP install directory (C:\SwSetup) and MS Office setup directory (C:\MSOCache).
In the previous tutorials, yo learned how to move the TEMP and internet Temporary files... This is a good place for them too. Here is the directory structure on my E:\WinSystem directory:
E:\WinSystem\Temporary Internet Files
Just make sure to drop the junction in the same place as the original directory and the OS will be none the wiser and you will have moved GIGABYTES of seldom used stuff of your SSD (and redirected some more writes)!
The only down side that I have found is as follows: If your backup strategy is like mine WAS, then you would only be making a backup image of the SSD. The problem is, that image backup software does not see that you moved the files, so they cannot copy the files in the E:\WinSystem directory with the image. The fix is quite simple if U are using Windows 7 backup: Along with the system image, have it back up the directory E:\WinSystem. Then it will keep them together and in sync (you restore the image AND the directory that went with the image).
Undoing the junction is easy too, if you want to. Simply delete the junction from the C drive and move the directory back where it was (hence the reasoning I had you create WinSystem\Windows\Installer instead of WinSystem\Installer as a reminder of where the directory was when U started (thinking of WinSystem as the root)!
|My System Specs|
|14 Mar 2010||#2|
| || |
There are a lot of sites and programs out there that are touting how important benchmarks are to your SSD and I agree, to a point. One of the problems in most benchmarking programs is equalization of results.
My benchmark will NEVER equal yours unless we have the exact same hardware and software installed, including drivers, etc. They DO give a good general indication of potential performance if we follow a few ground rules to try to keep things equal as follows:
REMEMBER: Over 95% of Windows 7 are READS, we need to be mainly concerned with READ speed.
1) PLEASE PLEASE PLEASE do NOT do the write benchmarking often. Each memory cell on a SSD has a set number of times it can be written to. The controller keeps track of the number of writes to a cell and makes it read-only when this value is met or exceeded. Most of the write benchmark programs out there write all across the SSD several times to every open cell either at the block level or file level then erase the block/file. Then the controller is left to clean up the mess, hurting performance and drive life. I watched an OCZ tech burn out one of their SSDs running write benchmarks over and over for several days non-stop. The drive became read-only after a slowdown of 98%.
2) To eliminate the differences in services running, software installed, work-loads, etc. do your READ testing in SAFE MODE. This mode has the least things interfering with the READ test.
3) Lets settle on a bench-marking tool that can do no harm. Personally, I use HDTUNE 2.55 free (not pro): http://www.softpedia.com/get/System/.../HD-Tune.shtml
It does not even have write testing installed in the program.
3A) Lets all use the same testing parameters (settings) in the program. In HDTune 2.55 free, click the options icon at the top next to the diskette icon. Click on the Benchmark option and select 8 MB block size. You can also move the slider up to fast, since we are testing an SSD and the 'accurate' setting makes no difference in the benchmark stats on an SSD (just takes longer to get results).
4) Run the benchmark 3 times, writing down results after each run. Use the highest one. Even in safe mode, there are services running that can throw off a read benchmark, so running 3 of them gets you inside the 'service free' window.
We can then go to safe mode and run the benchmark and see. Here is mine:
WEI (Windows Experience) Hard Disk score: 7.2
HDTUNE: Minimum 189.1, Maximum 247.4, Average 225.5, 0.1 ms, 181.1 Burst.
Next, we cover free tools to help keep things smooth.
|My System Specs|
|14 Mar 2010||#3|
| || |
Cool free Tools...
What would SSD speed be without some free, cool tools that are helpful...
Benchmarking (as above): http://www.softpedia.com/get/System/.../HD-Tune.shtml
CrystalDiskInfo: Crystal Dew World - Download Center
Crap Cleaner (Keeps things cleaned up): http://www.ccleaner.com/ (I have it auto-clean on logoff)
Helpful well behaved Windows 7 gadgets (get them from http://windows.microsoft.com/en-US/windows/downloads/personalize?T1=desktopgadgets )
All CPU Meter (shows memory and cpu usage, all cores)
Wireless network meter (also works for wired) shows network usage
Drive Meter 126.96.36.199 Shows all IO to your drives.. MOST useful of the three!
|My System Specs|
|14 Mar 2010||#4|
| || |
SSD Virtuilization Tips...
I use VMWare all day long on my SSD and have found a few little tricks to make it run smoother with less writes to the SSD.
My host is Windows 7 64-bit. My VMs are mostly XP pro andd home (and a Server 2008R2)....
Basically, the tips are as follows and assume you are running VMWare:
With the exception of the page file, follow the tips for configuration in the VM as you would if it was the host OS. Even in a VM, a page file is needed (to a point). Just google things like XP SSD tips, etc.
If you have 2 drives (The SSD and a normal HD), then you can really pump up the speed of the VM if you are running it off the SSD...
1) In the VM settings, create a new virtual drive. Put it on the normal Hard drive (I set mine to 1 gig). Inside the VM, set the new virtual drive as the VMs page file drive. This off-loads a lot of writes to the normal hard drive without really affecting performance.
2) (advanced) Did you know you could run a VM in an almost read-only state from the SSD? Did you know that you can have a VM reading from both drives at the same time during VM boot and operation and writing to the HD only without raid? Basically, we can use the snapshot feature in VMWare to create a fake raid setup for each virtual machine:
In the VMX file for the VM, we need to edit/add the line
workingDir = "E:\VMWare Images\XP Home Personal SnapShot\"
where the directory is where you will be storing the snapshot on the spinner.
In the settings for the VM in VMWare, make sure to uncheck "independent" under advanced options for the virtual hard disk on the VM.
Click on VM up top then create snapshot. As of that point on, all the writes will go to the snapshot file on the spinner and all the reads will come from both.
There is a trade off after a while... Since all writes to the VM drive (snapshot) are block level writes, the more you use the VM, the less performance gain U will get (more and more reads will come from the snapshot file). To prevent that, I merge the snapshot file once a week or once every 2 weeks to the VM on the SSD.
Also, to save space on the SSD, I only put my most used VMs on the SSD (the 2 that are used all day).
|My System Specs|
|03 Apr 2010||#5|
| || |
There seems to be some debate over the use of defragging utilities on your SSD drive. The purpose of this post is to try to clear this up a bit. In order to do this, we must look at where the opinions are comming from, and how an SSD actually works.
The main proponents that say that you DO need to defrag your SSD also sell defrag programs, which I am SURE is a coincidence (NOT!).
The opponents of defragging your SSD are pretty much all the makers of SSD drives, virtually every expert on the subject of SSDs, and of course the biggest experts on Windows and how it operates at the high and low levels with the hardware, MICROSOFT, who created the operating system. They all say the same thing: You do not need to defrag your SSD. Defragging it like a hard drive WILL lower its life expectancy without increasing performance.
So, just looking at who says not to do it, I would think that there should not be too much debate, but as with a lot of things, a lack of understanding (or a simple plain english explanation) of a new technology tends to cause some to hold on to long held beliefs left over from similar hardware (spinning hard drives).
Lets look at the hardware aspect of what an SSD must do to work and be widely accepted by the users: Imagine where SSD technology (and prices) would be today if you had to buy a new motherboard (or computer) just to use an SSD. In addition to the motherboard, you would need to purchase a new 'magic' operating system that could utilize the features of the SSD. The expense alone of all these 'upgrades' would have prevented the mass sales of SSDs, keeping the prices extremely high, and the number of manufacturers low, since it would remain as a high-end only item that only the richest users could afford.
So How does the SSD work with current and past hardware and operating systems without the need for 'magic' expensive upgrades?
Simply put, the first job of the SSD controller is to lie its butt off! Really! Here are the lies the controller must tell in order to work:
1: It has to tell your BIOS and motherboard "Don't mind me, I'm just a plain old fast hard drive. you can boot from me and use me!"
2: After the hardware accepts the SSD, the SSD controller has to tell the same lie to the operating system which is used to performing input and output to specific blocks on a hard drive. Basically, the operating system is fooled into thinking it is in full control of where on the SSD the data is going, since it has always had control in the past on normal hard drives. There is a lot of logic inviolved in this, so the controller has its own processor and basic operating system (firmware).
So, what does this have to do with defragging? Lots...
On a normal hard drive, you want all your most used data in the fastest area all together, since it has to move the drive head around if the data is not all in one place. Once you write the data to a location, it is up to the operating system to know where it is and to maintain the pointers to it on the physical location on the platters. The data stays there until it is told to move it. Defragging software does this for you through the operating system. Your Spinning disk drive can write and overwrite to any location the operating system says to ("write this data from x through y, read the data to me from x through y).
The SSD does things a little differently. There are no platters or heads to move. Data comes from several places at once instead of from one sequential location. Due to the limited number of writes to any one location (cell) of the SSD, the controller must be in control of where things are written to, or the SSD would wear out very quickly. When the operating system tells the SSD to write something to a specific location, the controller tells the operating system that it did (lies). It then spreads the data out in the unused areas of the SSD. This is called 'wear leveling'. When the operating system asks for it back, the controller takes the location that the OS asked for and converts it to the actual cells where it is stored and sends the data to the OS. The SSD controller also likes to move things around when it is idle to keep as many free cells as possible, but does not need to tell the OS that it is moved. The changes are done in the location conversion table (this is not the actual name, just description of what it does).
Bottom line, there is no need to defragment the SSD, since the operating system has absolutely NO CONTROL at all where the data is actually (physically) stored on your SSD. The SSD will put the data where it pleases, even during a defrag operation!
Personally, I would love it if the firmware could somehow block the defrag operation, but it is allowed to happen simply to maintain compatibility with your operating system and drivers.
Hope this clears this one up for some of you (us)
|My System Specs|
|22 Apr 2010||#6|
| || |
Your this tutorial "SSD-tweaks-optimizations-windows7" had immensely helped me, a layman, to understand and follow it step by step.
Since about last four hours I had been doing all these activities, very successfully.
A few hitch I came across which I will properly draft before posting it as my doubts.
Some actions I have to undo like disabling items under Event Trace Session: all I did as per your ideas, but again had to undo as I could not access the web pages. I do not have any idea if this failure is the part of the changes. Will try again.
This message is to express how grateful I am to you, Sir.
So beautifully explained, narrated and step by step demonstrated by you.
|My System Specs|
|25 Apr 2010||#7|
| || |
Problem with fsutil.exe command
I appreciate your well done tutorial on SSD Tweaks and Optimizations... Thank you! I ran into a problem early, though... From the Start Button, I typed run, then command and fsutil.exe behavior, etc... to find out if my TRIM is active. I got stopped right away with the admonition that the fsutil command requires administrative privileges. Help, how do I prove that I have Administrator Privileges at the command prompt?
Thanks for your help, Noels
|My System Specs|
|25 Apr 2010||#8|
| || |
1). Right click on the Command Prompt under Accessories and choose Run as Admin
2). From start, run, type cmd in the search window and hit CTRL-SHIFT-ENTER.
|My System Specs|
|Similar help and support threads for2: SSD Tweaks and Optimizations in Windows 7|
|Windows 7 Tutorial||Category|
|windows 7 network tweaks||Network & Sharing|
|advance tweaks for windows 7||Performance & Maintenance|
|Windows 7 slates "this Christmas," touch optimizations in 2011||News|
|Tweaks/Optimizations for a old Win7 desktop?||Performance & Maintenance|
|Windows 7 Optimizations||Performance & Maintenance|
|Tweaks for Windows 7||General Discussion|
|20 Windows 7 Tweaks & Tips||News|
|Our Sites ||Site Links ||About Us ||Find Us |
© Designer Media Ltd
All times are GMT -5. The time now is 10:37 AM.