05.20.10

Every SSD could use a little TRIM

Posted in Home Theater, Windows at 9:01 pm by mike

So I was an early adopter of a Corsair P128 SSD drive for my media center machine.   I was extremely pleased with the fact that it eliminated 95% of the disk noise, even though I left the 1TB HD in the machine.   Even when recording to the HD, it barely makes a noise since the OS is completely running off the SSD and the HD doesn’t need to do any seeks.   But because I bought the disk right around the time Windows 7 was release, the SSD firmware didn’t yet support the TRIM command.

What the TRIM command does is tell the SSD to actually clear all the data from deleted files.    Regular old harddisks don’t care much whether they are writing to an empty space, or overwriting a deleted file.   Hence, when you delete a file, usually all the operating system does is mark the space used by the file as free.   Then the next file is welcome to overwrite that space.

Unfortunately, due to the design of SSD memory, it’s actually much slower to overwrite existing memory, because it needs to be cleared first.   This becomes even more time consuming when you are writing a file that is smaller than the SSD block size (Both traditional and solid state drives like to deal with data in a standard size like 256KB or 512KB.  This is called a “block”).   In the case of the SSD, it needs to read the entire block into memory, clear the entire block, then write it back with your small change.    Now this is all done internally on the drive, but still is much slower than a simple read or write.

If the OS knows it’s dealing with an SSD, it can send along a TRIM command after every delete operation.    This tells the SSD to clear the memory associated with the files that were recently deleted.   Note this can usually be done in parallel to other work, so by the time you want to write something to that same block, the freed data has already been cleared!   Note, this does disable the ability to retrieve deleted files, which has long been a double-edged sword in the DOS/Windows world.

Anyways, I thought I was running on a TRIM-less SSD, which meant my performance was going to suffer over time.   Luckily,  at the end of last year Cosair released a firmware update for the both the P and X series which adds the TRIM command.  It just took me a while to remember to check for it.  I was able to verify the SSD firmware version using a clever tool called Crystal Disk Info.   Unfortunately, I only have the “after” screen shot.   In the before shot, the work TRIM was faded/stippled, like the APM in this one.

That’s the good news, the bad news is that the firmware upgrade ERASES THE ENTIRE DISK!   That meant I need to explore Windows 7 backup and restore options a little more.

I was pleasantly surprised.   Backing up an image SSD to the HD was just a few clicks using the windows backup tool (OK, I did have to delete a number of old episodes of Ace of Cakes and Project Runway to make space [ sorry honey ] ).   The one hiccup I had was creating a bootable recovery CD.    After telling you to insert your CD, the create recovery disk program would hang and eventually error out with an Optical Drive error.   The problem turned out to be an old version of Virtual Clone Drive which was giving the system fits when trying to identify the disk devices.  Removing it solved the problem, and I wasn’t able to repro it after installing the latest from Slysoft.

The most challenging part was that firmware upgrade documentation insisted that the installation program was only supported when running from a bootable USB flash drive.   This turned out to require a bit more research than I expected.    I found a number of links with a number of different methods for creating a bootable flash drive.   The simplest one I actually found on a German website I translated through Google.   But after a quick search today, I found the same instructions on a native english site as well. The bottom line is you grab the HP Flash Format program and a copy of the DOS system files.     The HP program is fairly idiot proof, and will allow you to browse for the DOS system files you want to load.

After copying the P128 firmware files to the USB drive (after formatting it with the bootable OS) it was amazing how quick and painless it went.    I did have to muck with the PC Bios to tell it to boot off the flash drive, but once I did, every thing went quick and easy. I actually wasn’t sure it had worked, but running it the second time it said there was nothing to do.   I then booted off my Windows recovery disk, and it automagically found my backup on the HD, and asked me if I wanted to restore the SSD.   It really couldn’t of been any easier.

Now, if I could just get the latest version of Arcsoft TMT to play BDs on my system.. but that’s a story for another time.   For now, learn from my trials and tribulations and DO NOT try to use your HTPC as your primary BD player.   It will cost you at least $400, and you can buy the same thing for $99 at Best Buy.   As you can guess, there’s a 1000 word rant waiting to be released about this one.

Comments are closed.