Login

Source: 

SSD Alignment

Problem description

The traditional rotating disks are divided into physical sectors. The Windows operating systems and their components operate according to this sector logic. Despite the fact that SSDs store the data in a completely different way, they are still being treated with this sector logic.

The alignment of the SSD is required to assure that a logical sector starts exactly at the beginning of a physical page of the SSD. Without the alignment, the sector boundaries and the page boundaries will not match and sectors will span pages. That would require for a Windows write operation to clear two blocks in lieu of only one thus reducing the write speed by 50%.

Situation

If you install Windows7 on a brand new SSD, you need not make any special arrangements because the Windows7 installer will do the alignment for you. For Vista you are lucky because the start sector happens to match a SSD page. For XP the start sector is 126 which would be in the middle of a SSD page, thus a prior alignment is required. 
A similar situation is present when you clone an existing OS (including Windows7) on a new SSD.

Solution

The easiest way to align an SSD is to create an aligned partition on the SSD with the help of Diskpart. Open an elevated command prompt and run the following sequence of commands – each line followed by Enter.

Diskpart
List disk
Select disk n (where n is the number that was given for your SSD in List disk)
Create partition primary align=1024
Active (assuming you want to install an OS)
Exit

Note: If you want to create a 100MB partition with alignment, the create command is:

Create partition primary size=100 align=1024 

The size unit is always MB.

Verification

If you want to verify the alignment (e.g. for a SSD where you are not certain whether the proper alignment was done), you use the following commands.

Diskpart
List disk
Select disk n
List partition

Now you should see a result like this.

Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 Primary 59 GB 1024 KB - but 64KB or any number divisible by 4 is also good

The offset (in KBs) has to be divisible by 4.


Note: Some readers and users of this tutorial got confused because the alignment numbers in a typical Windows7 installation are shown as:

1024KB for the 100MB partition
101MB for the next partition - which is most likely the C partition

They think that 101MB is not divisible by 4 and that there must be a problem. But that is not so. If you convert 101MBs into KBs (multiply by 1024), then the number is divisible by 4 and the partition is aligned.







 

 

How to Optimize an SSD / HDD When You're Ready to Reinstall the Operating System


This will show how to remove / over-write all existing data from a Solid State Drive (SSD) or a Hard Disk Drive (HDD), it'll work for both, then how to create a partition and then format that partition before install begins so you have a clean drive to start the installation with.

   Note


Before you start this, in the Windows start menu search box type diskmgmt.msc right click the entry and click "Run as Administrator" if you get a User Account Control (UAC) prompt enter your user credentials and click Yes; make very sure you know the correct drive number of the drive you want to do this to if you have more than one SSD / HDD in the machine, you don't want to do the wrong one.

   Warning


Do not do this to any SSD or HDD that has data on it you don't want to lose, the first thing this does is to mark the drive as "Unallocated Space" and then writes zeroes ( 0's ) to the entire drive, it's known as a "Secure Erase" and it will make data un-recoverable, it cannot be done to just a single partition on a drive, it will do the whole drive.
You have been warned!

   Information


It may be a help to over-write the HDD Master Boot Record (MBR) before you start any other procedure using the diskpart clean command, rather than the clean all; it takes just seconds to complete so you will have "unallocated" space to use either the Windows installer to create and format the partition(s) or use diskpart for that, however you choose.

Let's get started!

Step One

Boot To DISKPART


If need be, view this tutorial at the link below for an out-line of the process.

How to Boot to DISKPART at PC Startup

1) In the command window that opens type diskpart then hit the <enter> key then type list disk <enter> if you have more than one SSD / HDD in the machine it'll list them all.

Have a look here to view additional important information on this entire process.

click any image to enlarge

2) Now in the command window type select disk# (= target disk number) then <enter>, you will get "Disk is now the selected disk".

3) Now type clean all <enter> you will get a blinking cursor telling you that clean all is working like in the second snip down, just relax and let it work.

 

4) Running the "clean all" command on a SSD / HDD takes a good bit of time, remember it's writing zeroes ( 0's ) to the entire drive, I've done quite a few of these, here's some examples a 500GB HDD took just at 2 hours, my 80GB SSD takes around 20 minutes and the "virtual" 20GB drive in a VM takes about 7 minutes to complete.

When it finishes you'll get "DiskPart succeeded in cleaning the disk" in the command window.

To leave diskpart at any time and return to the Windows 7 installer type exit two (2) separate times and hit <enter> after each and you will be returned to the installer to continue the installation process.

 

Step Two

Create a Partition


1Create a single partition of the entire HDD / SSD

Still in the same command window, to create a partition of the entire HDD / SSD, it is suggested if you are using one of the larger, 1 - 2TB HDDs that you use the outline in #2 below to create a single 100GB partition to do the installation to or #3 below if you would like to include the new Windows 7 System Reserved partition, as we're now seeing serious issues with some trying to install to such large partitions.

Do not format the created partition(s) with the installer if you create them using this process as the installer will delete all this info, the second snip shows how to select "where to install" during the installation process, click to highlight/select the "Windows 7" partition and click next.

Now skip down to #5 below to start the installation.

click any image to enlarge

2Create a specific size partition

If you wanted to create a specific size partition, say 100GB you would add the size you want to create in MBs like in the command below.

create partition primary size=102400 <enter>

1024MB = 1GB - 1024x100 = 102400, you can use/create any size you like.

You can always extend the Windows partition to include the remaining unallocated space on the HDD / SSD or create additional Primary partitions or an Extended partition after the installation completes if you choose.

Do not format the created partition(s) with the installer if you create them using this process as the installer will delete all this info, the second snip shows how to select "where to install" during the installation process, click to highlight/select the "Windows 7" partition and click next.

Now skip down to #5 below to start the installation.

 

3Create the System Reserved partition

If you should want to add the "System Reserved" partition back after the clean all, see this snip; of course you would have to select to install Windows 7 to the partition labeled as "Windows 7" during the install and do not format either partition with the installer.

The reason for suggesting to create the System Reserved at 200MB instead of the new default of 100MB is an attempt to curb some of the issues we're now seeing with the partition being too small when dual/multi booting and it also being needed for use with the Windows 7 Backup and Restore and BitLocker programs.

You can always extend the Windows partition to include the remaining unallocated space on the HDD / SSD or create additional Primary partitions or an Extended partition after the installation completes if you choose.

The second snip shows how to select "where to install" during the installation process, click to highlight/select the "Windows 7" partition and click next.

 

4See this tutorial for the "align" argument

Align a Solid State Drive for Windows Installation

5) That's it, you're now done with the command window, type exit <enter> to leave diskpart and exit <enter> again to close the command window; if you're using a Windows 7 full installer it will go to the "Select Language" screen to continue the installation process as usual.

For those using a created repair CD or a Vista installer type exit <enter> to leave diskpart and exit <enter> again to close the command window; at the System Recovery Options dialog box that's still open click Restart to finish the process.

Enjoy!

 

 

SSD Tweaks and Optimizations in Windows 7

Real world Windows 7 SSD tweaks and optimization
Published by lightningltd
03-14-2010

SSD Tweaks and Optimizations in Windows 7

Hello to all my fellow and future users of SSD drives and Windows 7.
I wanted to set up an area with real-world tips on getting the most out of your SSD and the Windows 7 operating system. I will separate each type of tip to its own message to keep things easier to read and to follow.

All of this has been tested on my laptop system, configured as follows:
HP DV2270us, Core 2 qual 2ghz, 4 Gig RAM.
Disk 0: Patriot M28 64-gig SSD 240MBs (Boot drive), Disk 1: Seagate ST9500420AS 500 Gig 100MBs second drive.
Windows 7 ultimate 64-bit.
Machine is used all day every day at work and home, lots of virtual machines running.

These suggestions are just the way I choose to set things up and get GREAT performance and utilize the SSD to its fullest potential. Your mileage may and probably vary. The tutorials and suggestions are not meant to be debated, its all up to you to decide if you want to try them or not. 
All standard disclaimers apply... I am not responsible for breaking your stuff, only mine.
With all that said, on with the tutorials...
FYI, lightningltd here (me) and magic-man on other forums are one in the same, So I am posting this tutorial here with my permission.

Published by

lightningltd

Member

Join Date: Oct 2009

Posts: 43

 

Tutorial Tools

Print Version

03-14-2010

  #1

lightningltd

 

Windows 7 64-bit

43 posts

 

 

 

Windows 7 prep to update firmware & activate TRIM

This tutorial is for those who are already running Windows 7 on their SSD as a boot drive. If like me, you first installed to hard drive then used an image backup program to put the OS on the SSD, then this step is necessary to allow Windows 7 to set the proper settings for SSD use and set things up for optimizing the OS after burning the firmware and/or cleaning the drive to factory specs. If you installed directly to the your SSD, you don't need to follow this step, but it can be helpful if you followed the XP and vista SSD guides and things just aren't up to snuff.

*** read all the steps first so you can create the images and boot USB and CD/DVD and print the instructions before you start***

FIRST.... MAKE A BACKUP IMAGE just in case!!!!!!!!!!!!!!!!!!! Be sure to create the restore disk, too.

Basically, you need to do a repair install of Windows 7 so Windows can set itself up properly for SSD use. The following link will step you through this step:
http://www.sevenforums.com/tutorials/3413-repair-install.html
When done, we need to verify that TRIM is active. At a command prompt (start/run/cmd), type the following: fsutil.exe behavior query DisableDeleteNotify

It should respond back with DisableDeleteNotify=0 if trim support is ready and active. If it is not, type fsutil.exe behavior set DisableDeleteNotify 0

This will set Windows 7 to use TRIM when the drive and are ready to do so.

Next, we need to make sure our ATA/ATAPI ACHI controller is set to use trim.
EDIT! 3/22/10: The new INTEL chipset 9.6.0.1014 support TRIM! Use these instead of the MS AHCI ones for Intel Chipsets.
RAID: Intel® Rapid Storage Technology Driver for Intel Desktop Boards

For non-intel chipsets:
To see/change it, go to device manager and select IDE ATA/ATAPI controllers. If it says "Standard AHCI 1.0 Serial ATA Controller", you are good to go. If not, double click it and select the tab. Click update . Select browse. Select let me pick. select Standard AHCI 1.0 Serial ATA Controller. 

Once it has reboot and all is fine, then U can go on to the next step (after making an IMAGE backup of the whole SSD with the new changes (I use Windows backup)).

Last edited by lightningltd; 03-22-2010 at 09:27 PM.. Reason: Add info on new INTEL drivers

My System Specs

 

03-14-2010

  #2

lightningltd

 

Windows 7 64-bit

43 posts

 

 

 

Reset to Factory Spec (erase) to restore performance

This step is necessary IF you have been using the SSD for a while before updating the firmware and/or want to return performance back to factory fresh (this will fix isues created if you ran 'tony-trim' method on another site). I did it right after the firmware update since it will ERASE the entire SSD, losing all data. It is called an ATA secure erase for a reason.
some of the firmware update tools do not issue the proper ATA secure erase command when they are done (Like the samsung), so the SSD will 'inherit' any performance issues it had before. Using this method resets all the memory cells to factory values.

IF you just pulled the SSD out of the box and updated it, or have never used it, then this step is NOT NEEDED.
Remember! Make sure U have that image backup I keep yelling about, you WILL lose everything on the SSD if you haven't already!

Download and print the instructions from http://ata.wiki.kernel.org/index.php/ATA_Secure_Erase 
Get the lin*x boot image from http://partedmagic.com/ and burn it to a CD/DVD. 
Boot to the CD/DVD and click the bottom where it looks like a black window (prompt).
Follow the instructions you just printed. On my laptop, I had to unplug the SSD while the OS was running and plug it back in real quick to make it not be frozen as in the instructions.

When all done, you have a nice empty clean SSD to restore your image to!
Restore the image to the drive and boot up.

See U at the next part... Optimizing Windows 7 for the SSD!

My System Specs

03-14-2010

  #3

lightningltd

 

Windows 7 64-bit

43 posts

 

 

 

Optimizing Windows 7 for the SSD and TRIM...

Now that you have gotten everything done as far as firmware, and image restored and have a working Windows 7, we can do some things to make Windows 7 a bit 'friendlier' to your SSD and make things faster to boot.

FWIW, Microsoft did a great job in pre-optimizing Windows 7 for SSD use. Except for installation, over 95% of Windows 7 operations are READS, perfect for your SSD. You COULD just use it as is and things would be fantastic. BUT, there are some things to verify first.....

1: Verify that TRIM is enabled as in the prior messages.
2: Make sure your AHCI controller is using a TRIM compliant as in the prior messages.
3: Make sure the defrag program is disabled for the SSD... Admin tools/Services set Disk Defragmenter to disabled. I use auslogics disk defrag (free) for my other drives manually. U almost never have to defrag an SSD. It can lower its life expectancy.
4: Page File. There has been much debate about this. The idea that no one needs a page file is a bunch of crap. I have tried it both ways, moitoring writes and reads, and YES, it IS used even with 8 Gigs of RAM. I left mine at 2 Gigs, but it is just fine at 1 Gig. Writes to the page file are sequential now. Page file is also read at boot time to speed things. Keep it on your SSD where it belongs.
5: Superfetch/prefetch/bootfetch: Windows 7 does not always turn it all off as it should. The purpose of these things are to pre-load the programs you load from slow hard drive to fast memory (cache) in case you want to run them. With your SSD, there is no need. We will disable them and free up some memory and resources and stop a LOT of writes to the SSD.
To disable Superfetch, etc: Admin tools/Services. Select superfetch and set to disabled. 
Run regedit and change the following values: HKLM/System/CurrentControlset/Control/Session Manager/Memory Management/Prefetch Parameters and change the key valus of Enableboottrace, enableprefetcher, enablesuperfetch all to 0 and exit regedit.

This will disable MOST of the superfetch/prefetch stuff... The boot prefetch will get disabled in the next part along with some un-necessary logging that is done (and writes a lot).

My System Specs

 

.

03-14-2010

  #4

lightningltd

 

Windows 7 64-bit

43 posts

 

 

 

Optimizing Windows 7 for the SSD and TRIM part 2

Now on to some things we can do to reduce some on the unnecessary writes to the SSD. Windows 7 has the most event logs that I have seen of any OS. If you are having issues, then I would not change the logging options. If not, then we can stop a lot of writes that frankly, only an engineer would need (we leave the basic event logs alone).
Go to start/admin tools and select performance monitor. Expand data collector sets. Click on Startup Event Trace Sessions.
With the exception of the following NECESSARY logs (Application, Security, System, Security Essentials) we can stop them from starting. To do so, right click on each one that has a status of Enabled (except the ones mentioned above) and select Properties. Click the Trace Session tab. Unselect Enabled. Click Ok. Repeat for the others (including readyboot).
After your next boot, you will have a lot less writes going to the SSD that are not needed.

Write caching... Enable on the SSD: http://www.sevenforums.com/tutorials/10392-write-caching-enable-disable.html
TEMP FILES... IF you have another NON SSD drive installed, I would move the TEMP and temporary internet files to them (next message(tutorial page)).

Since I have Windows 7 make an image backup of the SSD to my other drive every day (only takes a few minutes and very little resources), I completely turn off system protection (system restore).

You can also turn off Windows reliability monitor. I will post a short tutorial if you want. It does quite a bit of writing too, but only every few hours.

There are some other more advanced things I do, but to be honest, they result in very little speed increase (less than 5%).

My System Specs

 

03-14-2010

  #5

lightningltd

 

Windows 7 64-bit

43 posts

 

 

 

Temp files, Page File..

Quote:

how do you "TEMP FILES... IF you have another NON SSD drive installed, I would move the TEMP and temporary internet files to them."
another question: doesn't superfetch run in the ram?
one more question: what do you find you need the paging file for with 8 gb ram? i have found ive never needed it for anything just curious why you think this or what you have found that needs it

Changing location of temp files: http://ask-leo.com/how_do_i_change_the_location_of_windows_temporary_files.html
Changing location of IE temp files: Move Temporary Internet Files Folder - Internet Explorer 7 Misc
Superfetch does run in Ram, but it also does a lot of reading and writing. Remember, the object of superfetch is to copy program stubs from SLOW hard disk to fast RAM. With an SSD, this is not needed, since the SSD reads so fast. I recommend you try it with it on, then try it with the service disabled. You likely will not see any slow down, actually a speed up since more RAM is available for other things and there will be a marked decrease in disk writes/accesses.

Windows 7 does use the page file IF PRESENT to keep things effecient. Several programs use it like VMWARE, some games, graphics software, MS office, etc... It will only use it when it is effecient to do so. With 8 Gigs of RAM a 1 GIG page file is plenty. Remember: the page file in Windows 7 is more sequential now, and therefore much more efficient. One of my MS sources also told me that there is some cached boot code in it to speed up boot, but to be honest, I haven't seen a difference. I can tell you that it IS smoother with even a 512 Meg page file on the SSD. 
Try it both ways with your read-world load and decide for yourself. There is no bench-mark for it other than your gut. That is why it is so debated.

My System Specs

03-14-2010

  #6

lightningltd

 

Windows 7 64-bit

43 posts

 

 

 

Reliability Monitor...

Quote:

could you also explain: You can also turn off Windows reliability monitor

Admin tools, open task scheduler. expand task scheduler library, then Microsoft, then Windows. Scroll down and click on RAC. Go to the top and select View then show hidden tasks IF RACTASK is not showing. Right click on RacTask and select disable. To re-enable it, you right click it and select enable.
Here is the good part.... disabling it stops it from PROCESSING reliability data and errors for reliability viewer. The data is still collected in the logs, just stored effeciently. You can re-enable it and see the reliability stuff when U wish. Disabling it saved RAM and some drive churning until U need to look at it.

My System Specs

 

03-14-2010

  #7

lightningltd

 

Windows 7 64-bit

43 posts

 

 

 

More advanced things....

Quote:

There are some other more advanced things I do, but to be honest, they result in very little speed increase (less than 5%). 
please share

Some of what I do is not limited to SSD, but overall OS optimization...
Services... I used the black viper guide and got mine trimmed down some without losing functionality of Win 7... I like it the way it is (almost). U can read up on what each service does and decide for yourself...
http://www.blackviper.com/Windows_7/servicecfg.htm

However, here are the services on my machine (laptop):

w7srvcs.txt
Tab separated file with MY service config...

My System Specs

03-14-2010

  #8

lightningltd

 

Windows 7 64-bit

43 posts

 

 

 

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:
E:\WinSystem
E:\WinSystem\Windows
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\MSOCache
E:\WinSystem\SwSetup
E:\WinSystem\Temp
E:\WinSystem\Temporary Internet Files
E:\WinSystem\Windows\Installer

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)!

Last edited by lightningltd; 03-15-2010 at 12:36 AM..

My System Specs

 

03-14-2010

  #9

lightningltd

 

Windows 7 64-bit

43 posts

 

 

 

SSD Benchmarking...

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 , 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.

Last edited by Brink; 03-14-2010 at 03:08 AM.. Reason: replaced direct download link

 

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 
Auslogics Disk Defrag: Download Auslogics Disk Defrag for free
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 1.0.0.1 Shows all IO to your drives.. MOST useful of the three!

Last edited by Brink; 03-14-2010 at 03:10 AM.. Reason: replaced direct download link

 

My System Specs

03-14-2010

  #11

lightningltd

 

Windows 7 64-bit

43 posts

 

 

 

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

 

04-03-2010

  #12

lightningltd

 

Windows 7 64-bit

43 posts

 

 

 

SSD Optimization

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 .

Hope this clears this one up for some of you (us)

 

 

 

SSD - Install and transfer the Operating System

How to physically Install an SSD and transfer the Operating System
Published by whs
03-11-2011

SSD - Install and transfer the Operating System

Introduction

If you never owned an SSD, you have missed something. Yes, they are not cheap, but Dollar per Dollar there is no other piece of hardware that can give you as much additional performance than an SSD.

Because SSDs are expensive, their current use is for placing the operating system. That’s how you get the best mileage. Although XP and Vista can be installed on SSDs, it is recommended to use them for Windows7, which is the first system to support Trim.

For desktops, an SSD with a 60GB capacity is usually sufficient. The user data can be moved to the HDD – I will explain the procedure later. Should you have very large programs, e.g., games, you should move their program files during the installation of the game to the HDD too.

For laptops, the situation is more complicated because you usually have only one disk bay. I use 80GB and 90GB SSDs on my laptops. In addition, I use the HDD that I recovered from the laptop after I installed the SSD in an external USB enclosure. But, if you move around a lot with the laptop, that may not be so convenient and a bigger SSD (120GB or 250GB) may be in order (budget allowing).

Hardware Installation

For a desktop, you will need a bracket if it is a 2.5” SSD (like most today). But, there are also 3.5” SSDs that will fit without adaptor brackets into the disk bays. You also need a cable to attach the SSD to the motherboard. For electricity, there is usually an extra plug at the PSU which you can use for the SSD’s.

Once you have all those bits, you can install the SSD in an available disk bay – or if none available, some self-adhesive Velcro will also do. The SSDs are light and do not produce any vibration or heat.

For a laptop, you need an external enclosure that attaches to a USB port. That will allow you to make the initial SSD setups. The one I linked attaches via USB2 and eSata, which may be practical later to use as external drive with the HDD that you recovered from the laptop. Also for hot swapping bare bone HDDs. But there are cheaper enclosures for USB2 only and also some that allow attachment to USB3.

Transfer the Operating System

There are two ways to transfer the operating system from your current HDD to the SSD: 
1. The Geeky way which comes for free and 
2. The easy way that costs $19.95.

1.The Geeky way requires the following steps:

Prepare the SSD – You first have to initialize the SSD to create the MBR. You can do that with Disk Management or with this program (which you will need later anyhow).

Then you need to align the SSD and define an active partition on it. You use an elevated Command Prompt with the following commands:

Diskpart
List disk
Select disk n (where n is the number that was given for your SSD in List disk)
Create partition primary align=1024
Active (assuming you want to install an OS)
Exit

If you want to verify that the alignment is correct, you use these commands:

Diskpart
List disk
Select disk n
List partition

You should see a result like this:

Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 Primary 59 GB 1024 KB - but 64KB or any number divisible by 4 is also good. The offset has to be divisible by 4.

In Windows7, you may have the 100MB active boot partition. The easiest way to deal with that is to move the bootmgr to the C: partition using EasyBCD. That you do on your HDD before you transfer anything to the SSD. Then you do not have to worry about it and you need only transfer the C: partition to the SSD.


But if you care to keep the 100MB partition, then the partition you just created on the SSD is for that 100MB partition. The next step is to shrink the partition you just created to a 100MB size (make sure it is not any smaller). With Disk Management you will have trouble to do that. I recommend this program for the operation.

From the free space you gained, you create the C: partition for the OS. This partition must not be active and need not be a primary (because the 100MB partition contains the boot manager).

Alternatively and easier is if you first create the 100MB partition with these commands: 

Diskpart 
List disk 
Select disk n (where n is the number that was given for your SSD in List disk) 
Create partition primary size=100 align=1024 
Active 
Exit 

Note: The unit in the size parameter is MB

After this action you can use Disk Management to create the C partition from the remaining unallocated space. That can be a logical partition.

If there is no 100MB partition, things are easy. The partition you created with Command Prompt will receive the C partition including boot manager and all.

There may be more partitions on your factory HDD – e.g., the Recovery partition and a Tools Partition. Those you should not transfer to the SSD because of space constraints. I would back them up – e.g., with an imaging program. The Recovery Partition you can also burn to DVDs.

The OS transfer

This is done with an image. There are a variety of free imaging programs (e.g., the free editions of Macrium, Paragon, Acronis, etc.) that are suitable for the task. You can also use the Windows7 imaging, which has the advantage that it deals with the 100MB active boot partition automatically. Disadvantage is that you never know exactly what it does.

You image your partitions to an external disk (you may have to assign a drive letter to the 100MB partition so that the imaging program can identify it) and then pull the images back in to the SSD (using the bootable recovery program of the imaging program).
The recovery is partition by partition. So you have to make separate runs for the 100MB partition (if any) and the C: partition.

Note: Most free imaging programs cannot shrink the originating partition to fit into the usually much smaller C: partition on the SSD - even if the amount of data in that partition would fit. In that case you will need to shrink the C: partition on the HDD prior to imaging it. The HDD C: partition must be smaller or equal in size to the designated partition on the SSD. For that operation I also recommend this program because Disk Management might not be able to shrink it enough. 

It is, of course, understood, that the amount of data on your HDD C: partition must not exceed the capacity of the designated C: partition on the SSD. Should you have more data on your HDD C: partition than the size of the SSD C: partition can hold, I suggest you first create a data partition on the HDD system and move the user data there. Here is my video tutorial that explains how this is done. When you finally are on the SSD system, you then right click on the user folders in the data partition (Documents, Pictures, etc.) and Include them into the appropriate library. That approach does not require you to move the user folders later.

Next step is to change the boot sequence in the BIOS to set the SSD as second boot device (leave the CD/DVD reader as first boot device) and, hopefully, your system will boot.

2.The easy way for transferring the OS requires you to purchase this program. It does everything for you – alignment, deals with the 100MB partition, transfers C:, shrinks the originating partition, etc. All you will have to do is change the boot sequence.

Note: Before you activate the SSD, it is recommended to set the BIOS to AHCI. Best time to do that is just before you change the boot sequence. Once Windows7 is running, you make the corresponding settings in the OS. Here is a tutorial on how to do that.
Many people claim that there is a significant performance gain with AHCI. I, however, did not see that. But it may be different from system to system.

Settings after the OS transfer

Disk Defragmentation makes no sense on an SSD. For a laptop, go into Services, navigate to Disk Defragmenter, right click on it and go to Properties. Here you set the service to Disabled.
For a desktop, you may want to disable defrag in the Disk Defragmenter and only for the SSD so that the remaining HDDs can still be defragmented.

Note: As long as Defrag Service is turned off, you cannot shrink any partition. The partition shrink process requires the Defrag service. If you need to shrink a partition later, turn the Defragmentation Service temporarily on.

Hibernation File – most of us do not use Hibernation, but Sleep instead. But, the hiberfile takes precious space on your SSD – to the same tune as the size as your RAM. To get rid of it, run the following command in elevated Command Prompt: powercfg –h off. If you ever want it back, it is powercfg – h on.

Superfetch – many “experts” suggest to turn Superfetch off. I think that is not appropriate. Fetching a program or data from RAM is still a lot faster than fetching it from a disk – even from an SSD.

There are no other settings that are necessary. On the SSD forums you will find a lot of tweaks. I recommend you stay away from them.


Move the user folders to the HDD

To move the user folders to the HDD is very simple. Create a Data partition on the HDD. Define folders in that partition – e.g., Documents, Music, Pictures, etc. One for each folder you want to move off the SSD. The name of those folders can be anything. The system will rename them anyhow. It is just more obvious if you call them by the same name as the originating folders.

Then, open the Explorer and right click on, e.g., My Documents folder (not the Documents Library) in the left pane. Go to Properties and click on the Location tab. Here you click on Move and navigate to the corresponding folder in your Data Partition on the HDD. Then you Select that folder and Apply it.

Very Important: You must move the SSD folder to the corresponding Data Partition folder – NOT to the root of the partition itself. That would create a mess.

 


chkdsk
Built in utiilty for Windows 2000/XP. Start --> Run. Type chkdsk /r for full scan. Can also be run from recovery console. Not recmomended for diagnosing.

Hitachi / IBM - DFT "Drive Fitness Test"
http://www.hgst.com/hdd/support/download.htm
Works with all manufacturers

Western Digital "Data Lifeguard"
http://support.wdc.com/download/index.asp#dlgtools
Works with WD drives only

Maxtor "Powermax"
http://www.seagate.com/ww/v/index.j...toid=7add8b9c4a8ff010VgnVCM100000dd04090aRCRD
Works with all manufacturers

Fujitsu "FJDT"
http://www.fel.fujitsu.com/home/drivers.asp?L=en&CID=1
Works with fujitsu models only

Samsung "hutil"
http://www.samsung.com/global/business/hdd/support/utilities/Support_HUTIL.html
Samsung "es-tool" (Successor to hutil above)
http://www.samsung.com/global/business/hdd/support/utilities/ES_Tool.html
Compatability unknown...

Seagate "Seatools"
http://www.seagate.com/support/seatools
Works with Seagate drives only

Toshiba - N/A
There are no tools available for Toshiba, but you may be able to use IBM or Maxtor's drive tools as well as other third party programs


Other Useful Drive Utilities

HDD Regenerator - Repair bad sectors
Repairs most bad sectors by remagnetizing the disk surface without losing your data. Works independantly of the file system, making it compatible with all PCs, operating systems and hard drives...
http://www.dposoft.net/

Active@Partition Recovery
Recovers most deleted, lost or formatted partitions.
http://www.partition-recovery.com/

Partition Magic
Fast and easy partitioning, Supports all Windows and most Linux file systems. Great for ignoring bad sectors and for advanced partitioning schemes.
www.partitionmagic.com

Ranish
GPL/Freeware partitioning program for use with Windows, Linux, FreeBSD and more. Not much on eye candy, but it works. .
www.ranish.com

gParted
GPL/Freeware partitioning program for use with Windows and Linux. Nice, intuitive interface and comes available as a bootable CD image..
http://gparted.sourceforge.net/

Acronis Partition Expert
Easy to use interface. Supports Windows and Linux partitions. 
http://acronis.com/products/partitionexpert/


Drive Backup Tools

Symantec Norton Ghost
Ghost 8.0 or less runs under DOS, but extremely reliable. Ghost 9.0 and 10 requires Windows 2000 or XP. 9.0 & 10 are Windows-centric. Ghost 9+ supports full "hot imaging" of system partitions while in Windows, but not incremental imaging.
http://www.symantec.com/sabu/ghost/ghost_personal/

Acronis True Image
Supports Windows and Linux file systems. Allows "hot imaging" of system partitions while in Windows, supporting full and incremental (fast) backups. TI 10 has been rock solid for me -- Recommended.
http://acronis.com/products/trueimage/


Drive Secure Erase Utilities

Darik's Boot and Nuke
Securley erases all data on your harddrives, beyond the point of possible recovery. Use with care! Tip: remove harddrives you will not be erasing from the computer.
http://dban.sourceforge.net/

 

Source: 

There are four types of interfaces that are most commonly used these days. These interface are:

  • (P)ATA
  • SATA
  • SCSI
  • SAS

Bear in mind that a drive's performance as a video source depends on the 'sustained transfer rate' of the drive which has nothing to do with the interface type or speed. The sustained transfer rate is limited by the 'media transfer rate'. The media transfer rate is the rate of data transfer between the head and the disc surfaces. It is a physical limitation that is shared by all hard drives regardless of the interface. The only things that affect it are: the data density on the disc, the physical size (read/write area) of the heads, and the rotational speed of the drive. All drives with the same rotational speed and data density will have approximately the same media transfer rate. A high end 7200 RPM drive can achieve a max media transfer rate of approximately 80 MB/sec regardless of the interface being SATA, PATA, or SCSI. - Drive manufacturers don't want you to know this and divert attention from it by emphasizing the interface's speed in their ads. The interface's speed is only an advantage during data bursts. Most manufacturers went so far as to stop listing the media transfer rates in their specification tables. - With drive of a given rotational velocity and data density, the only way to improve overall system performance is to use a form of RAID that uses Stripping. This effectively uses two drives simultaneously so that the total media transfer rate is doubled.

(P)ATA

As a much older standard, PATA is universally supported on most x86 hardware. This interface was originally called ATA but when Serial ATA (SATA) was introduced it was renamed Parallel ATA. Recently, this function on motherboards has been shifted to a 3rd party controller, and boards only offer one port (two drives).

SATA

Most new hard drives and motherboards come with support for the newer Serial ATA (SATA) interface. Although SATA is a superior standard (it supports a lot of the SCSI subset, and features much smaller, thinner cables than PATA, amongst other improvements), some SATA controllers have closed-source or no Linux drivers. This has resulted in some Linux-based systems being unable to use SATA adequately due to poorly functioning controllers. This situation is no longer as serious as it once was, but you should check your hardware driver support to be sure.

For the current status of SATA support under Linux you can check Serial ATA (SATA) on Linux.

Please bear in mind that the built-in software RAID functions on SATA chips will usually not work in Linux without extensive fooling around with the kernel (if at all). Because Linux provides its own software RAID features, this isn't a big loss for a dedicated Linux box (such as a MythTV system), but if you dual-boot, you may not be able to use the controller's software RAID.

SCSI

SCSI stands for Small Computer Systems Interface, and is/was a competing hard drive interface to IDE/ATA. However, back in the mists of time, SCSI was designated to the "high end hard drive" side of things, and is now much more expensive than ATA technology. Though, if you look at things like raw drive MTBF hours, you will see that cheaper ATA drives are only now barely catching up to the SCSI drive specs.

None but the highest end server and workstation motherboards come with built-in SCSI host adapters, so these usually have to be added by means of a PCI card, which in themselves are not cheap. The cost of the hard drives are very high indeed, and they offer much reduced storage capacity compared to a modern PATA or SATA drive. However, SCSI disks are incredibly fast and very reliable -- but as we can see, it comes at a huge price. To be honest, there is very little chance of even an extensive MythTV setup requiring a SCSI system -- SCSI excels in massive multi-user environments like databases and web/mail servers, but the advantages under a single user setup are hard to distinguish. With the recent addition of Western Digital's enterprise-class "Raptor" SATA drives, you can approach SCSI speeds without shelling out a kings ransom, although their size is limited to 74GB at the time of writing.

One thing of note is that SCSI drives are very very loud due to their very high rotation speed (10,000 or 15,000rpm) and so are going to be relegated to the backend under the stairs pretty quickly. Raptor drives are quieter, but still far louder than your average IDE drive.

[ Editorial comment: SCSI's not that bad a choice, particularly if you can get used drives cheaply on eBay, and you are building an Under The Stairs backend box -- instead of the 2 or 4 drives you can put on most IDE controllers, you can put 15 on a SCSI controller -- and multiple channel controllers are available. So it is a matter of scale and buying savvy as much as anything else. -- Bay Link(2004-10-01T18:06:44Z)

  • The problem comes that 15 drives are only useful for mass storage reasons, and the price/size ratio attainable through SATA is much better than with SCSI. For MythTV purposes SATA make the most sense technically and financially, with PATA a close second if you are not concerned with overall speed (i.e. as an archive array). That said I do have a 4xHDD U320 SCSI setup as my personal desktop... --Steve Adeff 16:23, 8 June 2006 (UTC)]

SAS

SAS, or Serial Attached SCSI, is a new technology that takes the best of SCSI and SATA and in many ways it compares to Fiber Channel (e.g. SAN technology) and USB as well. Most modern servers already ship with SAS instead of SCSI, and they're eventually expected to be the desktop standard. As of today it has a bus bandwidth if 3 Gbps, and is on target to increase to 12 Gbps by 2011. Individual SAS drives today have a transfer rate of 300 MB/sec, just under the SCSI rate of 320 MB/sec, but each drive gets the full 300 MB/sec to the host, instead of shared as with SCSI, SATA and PATA. Current benchmarks show comparable performance to the best 15K Ultra320 SCSI drives and in some areas SAS far surpasses SCSI performance. Some other cool features are:

  • The SAS interface is backwards compatible with all SATA drives.
  • It can support over 16,000 devices on a single bus, compared to 16 with SCSI and 1 with SATA
  • SAS Expanders provide the ability to hook up drives the same way we network computers using a switch, although over shorter distances (several meters).
  • 2.5" and 3.5" drives are available

- Seagate Barracuda ES2 Serial Attached SCSI one terabyte drives can be found for around $270 - maybe even $250. They spin at 7200 rpm. Not a bad choice for MythTV systems that are going to be always on. RedmondTux

 

Go to top