The Clone Wars: moving to SSD
Mark Pickavance details the subtle aspects of moving from a hard drive to an SSD. Is there a dark side to the flash force?
The editor dropped me a line the other day and asked if I’d write something about moving from hard drive to SSD. It’s a task I’ve performed a number of times, and it’s generally been a refreshingly simple exercise, so my first concern was how many pages I could fill with variations on the theme of ‘clone the drive’. However, (and this is why I’m not the editor), the more I thought about this process the bigger the article became. Yes, on one level you simply clone your existing hard drive to the SSD as like you would if they were both hard drives. Yet, such a simplistic statement ignores many of the details that might put you off doing that, or alter your approach to the task.
So, before I get to actually cloning a drive, what other critical considerations are there to take ahead of the move?
XP, or not XP?
For some considerable time I’ve been telling people if they run XP then SSD is a no-go area for them, but is that absolutely true? Well, you can move an XP system to an SSD, and it will almost certainly run, but that’s something of a false dawn I’d suggest. There are two basic problems, and both originate from the fact that the OS cannot be made aware of the nature of a storage media, and so will treat it exactly like a hard drive.
Firstly, XP won’t execute the ‘TRIM’ command, which is key in SSD operations. TRIM informs the SSD which data blocks are no longer in use, allowing them to erase and reuse blocks efficiently. Failure to execute TRIM causes a backlog of reorganisation work that then gets in the way of subsequent write sequences, to the point where the SSD might actually become slower than a conventional hard drive. What’s more, as each small write impacts into other blocks, as they're grouped by the SSD flash modules, you lose capacity without actually having more on the drive. It’s actually worth noting that TRIM is implemented in Windows 7 (and 8, I assume), but it’s not in XP or Vista.
There are several ways around this limitation; software can be installed on XP to issue TRIM commands for it, and there are also some SSD designs that have implemented something called ITGC (Idle Time Garbage Collection), a forerunner of TRIM that didn’t require the intervention of the PC to get the same result.
However, the real killer is a feature called wear levelling, which can ultimately cause the SSD to fail prematurely. On a hard drive some parts of the disc surface can be accessed more rapidly than others, due to the increased velocity of the outside of the disc and the smaller number of data tracks towards the centre. As such if you want the system to run at its quickest the drive should be filled up in a specific pattern that promotes some parts over others. As conventional hard drive platters don’t physically wear through use this isn’t really a problem, but on an SSD which has a specific limit to the number of writes per flash cell, it’s critical.
For a longer life, an SDD should write to the entire drive evenly. As each cell is accessible at exactly the same speed as all the others, this shouldn’t cause a problem. Thankfully these days the SSD makers have created ‘wear levelling’ strategies that abstract what the OS is doing to a degree, so that if the drive keeps writing to a specific location, then it moves the target area to avoid damaging that section. The problem with XP is that, because it’s not SSD aware, it will keep hammering away, and doing things that aren’t SSD friendly and that even these strategies can’t handle.
So can you really run XP on an SSD without either making it slow or killing the flash modules in it. Yes, but it’s not easy.
An XP-friendly strategy
To make an SSD work better under XP requires you to adjust the OS so that it’s not tempted to write to the drive like it has nothing better to do. So, here s a eight point plan to make XP a more SSD-friendly OS.
The swap file is something XP loves to mess with, and it creates lots of writes even if the EWF (Enhanced Write Filter, not Earth Wind & Fire) is active. The snag with disabling swap is that some software insists on their being one, and won’t work without it.
The solution is to either point swap at a small extra hard drive on a desktop PC, or use a sacrificial SD card or USB key as the swap if you’re a laptop user.
To disable swap head altogether, go to: My Computer > Properties > Advanced > Performance > Settings > Advanced > Virtual Memory > Change. And then select ‘No paging file’ and click on the ‘Set’ button.
Use RAM to increase cache
The more a drive is cached the less it will actually be written to, as writes can be held back for more efficient operations.
To increase the cache you need to fire up the Registry Editor (Run regedit) and then locate the key:
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ Memory Management
In there, if it doesn’t already exist, create the DWORD LargeSystemCache and make it equal 1.
While you’ve got the Regeditor open you also might want to stop this feature too. Prefetch was introduced to reorder often used DLLs and other code on the drive to make the system boot quicker. Except that’s entirely pointless on an SDD, which is just as fast whatever order the files are. The key you need is:
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ Memory Management \
Create or alter the DWORD EnablePrefetcher to 0, where 1 is enabled. This also makes the installation smaller as the cache is a copy of files that are located elsewhere on the drive.
If Prefetch is pointless, so is defragmentation, as an SSD performance isn’t impacted by a file being spread around many places on the drive. There are two keys you need this time, the first of which is:
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Dfrg \ BootOptimizeFunction
Simply change the STRING value from “Y” to “N”.
Once you’ve done that locate:
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ OptimalLayout
Then add or alter the DWORD EnableAutoLayout to the value 0.
Disable updating of file last access time
Unless it’s critical to you know when Windows last accessed a file, you can stop it writing new attributes each time it touches a file. Open a Command windows (Run CMD) and type:
fsutil behavior set disablelastaccess 1
If you get an error you might need to run the Command Prompt as Administrator, depending on how the security on your system is configured.
Disable System Restore
I’ve seen plenty of systems totally mucked up by people messing with System Restore, so disabling it might well be for the best anyway. It’s responsible for plenty of writes your SSD could well do without. The control for it can be found at My Computer > Properties > System Restore, where you can find a tick box for ‘Turn off System Restore’.
If you’ve already changed XP to NTFS then this isn’t a very helpful suggestion, but if you are doing a fresh installation (or are still on FAT32) then it’s a better choice for those who want to reduce write requests on their system.
Use a RAM drive
The worst possible applications for SSD are Internet Browsers, as they generate lots of temporary small files each time you access a page. The best place for these is not on the SSD but in a RAM drive. There are various RAM drive applications and tools around, but the simplest I found at www.arsoft-online.com, it’s called the AR Soft RAM Disk for Windows NT/2000, and it’s free. Once you’ve configured a chunk of memory to the RAM drive you then need to find where each of your applications creates temporary files and redirect them to the RAM drive. This can involve plenty of work, so it’s not for everyone.
There are some other things you can do too, like configuring the EWF (Enhanced Write Filter) I mentioned earlier, but these are pretty technical and not for the average user.
Do all these things and XP will work on SSD, be reasonably fast and not damage the drive by writing to the same cells repeatedly. But, it might just be easier to move to Windows 7, which is more SSD aware.
Preparation for moving
I’m going to imagine I have a Windows 7 system that is on hard drive, and I’d like it on SSD, how do I best prepare it to travel?
Check the drive for errors
This might seem obvious, but I recall a number of times I’ve seen people come unstuck trying to move between conventional hard drives without actually checking if the source is error free.
Select the Properties for the drive, then Tools, and hit the button marked ‘Check now’. If this is the boot drive it will tell you that it will defer the check until a reboot, which you can then perform. When you’ve got an error free drive the cloning operation is likely to go much more smoothly.
Remove anything you don’t want
The SSD is most likely smaller than your hard drive, so having a clean out before the transfer is always a good idea. Remove temporary files, along with any apps you don’t use and data you’ve done with. Quite simply, the smaller you make the installation the quicker it will move.
Defragment the drive
This won’t have any impact on the SSD, but it will make the speed of the transfer quicker if the files it is moving aren’t fragmented all over the drive. This operation does take time, so it’s not always worth it, but it’s another useful check that the files on the system are accessible to be moved.
Install the cloning tools
You can clone drives using Live bootable CDs, and in some respects this works better than copying an OS while it’s actually running. That said, some of the better cloning applications work well in Windows, so pick one and install it.
Add the SSD drive
It might seem like an odd idea, but it is worth getting the system used to the idea of the SSD before you actually copy the system over to it. Not only will this mean that you won’t get the ‘unrecognised device’ cycle when you first boot the copied system, but you can also check if the SSD is performing properly by using a simple benchmark on it. Remember, if you’ve bought a decent SSD then you need to attach it to a port that can do 6Gbps. On some systems these SATA ports are coloured blue, where the slower ones are black, but this is not always the case. Check your motherboard manual to determine which are fast and connect to them.
Make sure AHCI is enabled
For the SSD to work correctly and the TRIM command to be effective, the SSD must connect via AHCI or Advanced Host Controller Interface. This is a feature of your BIOS, and you’ll need to make sure that the SSD SATA port has AHCI enabled. New systems will set this by default, but older ones might need it manually setting.
If your existing hard drive doesn’t use AHCI then, when you make it active, you might find that the system starts identifying new hardware and asking for drivers. Have the motherboard support disc handy to provide those if required.
Backup your system
Cloning a hard drive can go horribly wrong, especially if you get confused about the direction of the movement, so this is probably the ideal time to make a backup that you can use if something goes wrong.
There are lots of software tools that are designed to transfer a complete system between drives. Some are commercial and others are free. However, one approach that most people forget is that (if they followed my previous instructions) there will be a backup that you can use to recover the system to the SSD. The beauty of using this is that it should not only work fine, but also prove that your backups are functioning. If you’ve used the Windows Backup application you’ll need the activate the option to make a bootable system repair disc, which you’ll find in the Control Panel > System and Security > Backup and Restore.
In terms of commercial offerings that can move systems easily there are plenty to consider, I’ve used both Paragon Software’s Hard Disk Manager 11 Suite (£29.95) and Acronis Migrate Easy 7.0 (£23.99) and they’re both excellent.
The only real catch to cloning a drive can come if you do the clone, remove the original disk and then the system won’t boot.
What you need to keep in mind when you’re doing the transfer is that you need to clone the whole drive, not just the partitions. Most software tools have a ‘RAW’ mode or a option to take all the boot sectors and partitions in one action, and that’s the one you want.
Some of you might be wondering why I’m suggesting paid software and not one of the many free tools, and it’s not because they pay me to suggest this. The free tools are fine, but what they generally don’t do is offer partition resizing. As the SSD is most likely to be smaller than the hard drive, you might need to shrink the partition to get it on the SSD, and the commercial tools will allow you that control.
Take note, though, even in what appears to be a very simple transfer, things can go wrong. For example: if you have two hard drives in a system, and the boot sector ends up on the drive that isn’t where the OS resides, it points to the other drive and if you either remove it, or change that drive for another (the SSD in this case), it will no longer boot. The solution is either to use the Windows 7 repair mode to fix the boot partition, or put the SSD on exactly the same SATA port as the hard disk it replaced. Whatever you do, retain the hard drive you transferred from for a month or so, until you’re convinced that everything is working. You can use this original drive to bring the system back very quickly in the event of a problem.
The critical aspect of the transfer is to make sure it isn’t interrupted, either by a power outage, or if it’s happening under Windows and application running. You can use a UPS to stop a power cut messing things up, and you can disable all your system tray functions, and disconnect the Internet, to avoid an update kicking-off while the transfer is occurring.
Windows 7 should work out that it is operating with an SSD without any prompting from you, but you can help it adjust to it’s new component better by modifying the configuration in a fashion that’s almost identical to the changes I recommended for using solid state drives with Windows XP.
Manually enable TRIM
If you want to make sure that TRIM is working then you can utilise the command line to ensure that it is activated. Open a command window and type:
fsutil behavior set disabledeletenotify 0
After which TRIM should be on and working.
Disable System Restore
For much the same reasons as it is a good idea to turn off this feature in XP, it is also a good plan to kill it in Windows 7 under these circumstances. You’ll find the control in Computer > Properties > System protection under the ‘System Restore’ button.
Windows Search indexes parts of the system, like the user areas that you might save documents to. The advantage in speed that this gives you isn’t needed with an SSD, and the system just keeps bothering the drive slowing it down in general usage.Indexing is a service you can find in the services.msc module.
Disable or move virtual memory
Again, this is the same process as I suggested for XP, but on Windows 7 you’ll find the feature in Computer > Properties > Advanced System Settings > Performance (settings) > Advanced > Change.
If you like having a page file and you intend to retain your hard drive, you could exclusively relocate it to that drive, avoiding the SSD.
Again like XP, but under Windows 7 you don’t need to rummage through the registry. The Disk Defragmenter app is located in the Accessories > System Tools part of the Start Menu and, once opened, allows you to disable the running of this in the background under the ‘Configure schedule...’ button.
If you could only punt for a 60GB SSD then you need as much space as you can get, and Hibernation takes 2GB that you can better use. Enter the command line and type enter:
powercfg -h off
On Windows 7 you have both Prefetch and Superfetch, and on an SSD they’re both pointless. Using the registry editor locate:
You’ll find two values, EnablePrefetcher and EnableSuperfetch, set them both to 0 to disable them. You might also want to disable the services for Superfetch which can be accessed by Run services.msc
Configure Write Caching
Not all SSD drives are the same; on some Write Caching is good and others it is bad. The control for this is a Policy on the drive itself - you’ll find it on the drive’s properties panel in Device Manager.
What you need to do is run a drive benchmark, then disable Write Caching and run it again. It might be that you need to leave it active, but you can also discover that on your SSD it is better disabled.
Turn PWM off
You don’t need to power down the drive, because when not in use the SSD will use virtually no power anyway. In the Hardware and Sound > Power Options of the control panel, find the High Performance power plan and select it.
Perfect SSD configuration
Let’s imagine you successfully clone your drive to an SSD and you reformat your hard drive as a secondary volume mostly for data. This makes a lot of sense, because most of the performance benefits of the SSD is in bringing the OS and applications into memory quicker. You can also start a policy of installing applications to the D: drive in the event that the SSD starts to become full. In an ideal world you would also move the user accounts to D:, reducing the amount of changes to C: to a minimum - but, and this is where I can’t help but be a little annoyed with Microsoft, this is a very difficult thing to do (as I’ve learnt from personal experience).
If you create a new account you can locate it on D: reasonably easily, but the number of parts of Windows and third party applications that insist on creating folders in the C:\users\username structure seems infinite. It is possible to track most of the erroneous path references down in the registry, but it can take an age. Why Microsoft never built a segmented model where you could allocate drives or partitions for OS/Apps/Data when you install Windows is entirely beyond me, and it’s a mess they seem remarkably reticent to address.
Until affordable SSD sizes reach 1TB, and the lifespan of successive writes to a cell are addressed splitting your system in this way is the best policy, but until the OS is part of the solution it will remain largely the problem.
I think it’s safe to say that Windows works with SSD technology, though I can’t suggest that it is really an elegant fit in terms of how it uses them. Migration can be reasonably painless if you’re using Vista or Windows 7 but, as you can see from what I’ve detailed here, to get the most from it you need to tweek the OS a little. Following these hints you should be able to really experience the advantage of having an SSD, and also make it operate a little longer than the lifespan of some.