Windows, solid-state disks, and ‘trim’

Fred langa By Fred Langa

It’s a little-known fact that all solid-state disks — all of them — suffer inevitable performance declines over time.

It’s also little known that Windows 7 and Server 2008 are currently the world’s only operating systems to fully implement the new trim command that helps forestall this speed decline.

The Achilles’ heel of all solid-state drives

Reader Peter Jackson is frustrated by the diminishing performance of his solid-state disk drive (SSD):
  • “I have a 64GB solid-state hard drive, but no way to restore it to factory-new condition. It has to do with getting the ‘pages’ to read as empty and not just overwritten. It’s important to all SSD users, as the performance degradation is something [all SSDs] eventually suffer from.

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 10, Windows 8, Windows 7, Firefox, Internet Explorer, Google, etc. Join our 460,000 subscribers!

    Enter your email above to receive messages about offerings by Penton, its brands, affiliates and/or third-party partners, consistent with Penton's Privacy Policy.
    The Windows 7, Vol 3 (Excerpt)

    Subscribe and get our monthly bonuses - free!

    The Windows 7 Guide, Volume 3: Advanced maintenance and troubleshooting provides advanced tools for keeping Microsoft's premier operating system up and running smoothly. Get this excerpt and other 4 bonuses if you subscribe FREE now!

    “The few solutions I’ve found are very complex; so far, I haven’t been able to get any of them to work. My SSD seek times degrading from .1 [millisecond] to .4 or .5 may sound silly, but it’s not.”
Performance degradation over time is a known issue with all SSDs, Peter. There are a number of contributing factors — I’ll come back to this in a moment — but some of the worst culprits are standard disk operating commands that were originally designed for use on magnetic, spinning-platter hard drives. SSDs operate differently, and that leads to problems — especially when attempting to reuse previously accessed data blocks, such as the former location of deleted files.

To correct this problem, most current SSDs support a new command called trim. This SSD-specific command does just what you want — it automatically clears out old, overwritten data.

The trim command specification is being made a computing standard by the International Committee for Information Technology Standards, so all OSes will eventually support trim. But for now, only Windows 7 and Server 2008 fully support the trim command. While Linux 2.6.28 is SSD-aware, its partial implementation of trim falls short of Windows’ full support.

That’s worth repeating: Right now, Win7 and Server 2008 are the only OSes that offer full, native support for trim. They’re the only OSes that let you get the most out of an SSD right out of the box!

Absent a trim-aware OS, you either have to rely on the workaround routines built into some SSD firmware or use add-on trim-ming tools. For example, G. Skill’s Wiper software is designed specifically for its Falcon Series SSDs; you can download and read about the utility on the G. Skill site. “Hdparm,” a Linux-based tool for modifying hard drive parameters, includes experimental trim scripts in version 9.17 and higher. More information is available in an article, and Hdparm itself is downloadable from a SourceForge page.

However, one look at the extensive cautions and warnings on those pages, and you’ll see why having trim baked into your OS is obviously the best way to go.

SSD performance is a complex topic. WindowsITPro’s article 101947 by John Savill explains why all SSDs suffer gradual performance slowdowns. Article 101966 by the same author explains how a trim-aware OS can help.

A longer Computerworld analysis of SSD performance by Lucas Mearian delves more deeply into why SSD slowdowns are inevitable. All three of these articles include links to more information on the subject.

But Peter — and anyone else using an SSD — the bottom line is this: Upgrade to Win7 or Server 2008, pronto!

Dealing with undeletable Registry keys

In my Dec. 3 and Dec. 17 columns, I discussed undeletable files and shortcuts. But Cecil Britton has encountered undeletable XP Registry keys:
  • “My Dell laptop, running XP Professional, had ZoneAlarm Security Suite 9 on it until a few weeks ago, when ZoneAlarm began acting up and wouldn’t run at all. I ran the Windows application-removal applet in Control Panel to remove ZoneAlarm and then tried to reinstall it.

    “The reinstall failed: I got an error message stating that I needed to run the install program with administrator privileges. I knew something was wrong because I already was [signed in] to an administrator account.

    “I contacted Zone Labs support and they suggested that I download and run their cleanup utility. So I did just that. Still following their instructions, I next downloaded the latest version of ZoneAlarm Security Suite and attempted to install it.

    “I got the identical result, so I did some research and came across the location of the Registry keys that control the permissions for the ZoneAlarm installer:

    HKEY_LOCAL_MACHINE / Software / Zone Labs

    “There are three subkeys under Zone Labs. When I attempt to delete or open them, I get the message ‘Cannot open keyname: Error while opening key.’ The only conclusion I can reach is that the Zone Labs key and/or the three subkeys have become corrupted, but I can find no way to remove the key from my Registry.

    “I can, of course, install an old Registry backup copy, and I guess that should fix the one problem while introducing new ones. My question is, do you know of any tool or method of removing corrupt Registry keys?”
Nice detective work, Cecil! You did exactly the right things in the right order to try to resolve the problem. But no, you’re not out of options yet. (In Windows, never say die!)

First, I suggest you run chkdsk.exe to make sure your disk is healthy and that a mangled file isn’t making the keys undeletable. The item in my Dec. 17 column “Why can’t I delete my desktop shortcuts?” details the use of chkdsk to cure this type of problem.

Next, search your hard drive for any folders with ZoneAlarm or Zone Labs files, and delete any such files or folders you find.

Now start your PC in Safe Mode. (Need instructions? See Microsoft’s XP documentation, “To start the computer in safe mode.”) While in Safe Mode and signed in to an admin account, click Start, Run; type regedit, and press Enter to open the Registry Editor. Chances are, you’ll then be able to whack the corrupt keys.

If the keys still won’t let go, a good Registry-cleaning utility may do the trick. The better ones, such as CCleaner (available from the Piriform site) or the U.S. $29.95 jv16 PowerTools (trial version downloadable from the Macecraft site), often correct even the messiest of Registry problems. Note that Macecraft also offers the free jv16 PowerTools Lite from this page.

I can’t imagine how any errant key could survive after all that!

‘Ghost’ serial ports clutter a Windows XP setup

Bruce Sobut ended up with over 20 bogus com ports in his setup:
  • “I have ghost serial ports on XP. I’ve tested many different USB-serial converters for some legacy products I support, and each one — sometimes the same one plugged into a different USB port — installs as a new com port.

    “I was up over 20 at one point. I could easily delete the com port with the USB-serial plugged in, but I don’t have all the old cables. I tried ‘unhiding’ unused ports — I found out how in Microsoft Knowledge Base article 315539 — and then deleted those.

    “But I still have several com ports (3-9, 12, 14) that show as ‘in use’ when I view the available com port numbers under ‘Communications Port (COMx) Properties, Advanced Settings.’ Any tricks?”
Sure, Bruce! A ModemSite article, “COM port in use,” shows you how to use XP’s Device Manager to reclaim com ports erroneously flagged as in use. It’s a step-by-step, one-port-at-a-time procedure that can take a while if you have lots of bogus ports to kill, but the process is easy and gets the job done.

A second option is Microsoft’s free COMDisable tool for XP. It’s much faster and more direct than the simple-but-laborious point-and-click, click, click of the ModemSite’s procedure, but it’s a little geekier and harder to use. MS KB article 819036 offers a download link and a complete description of COMDisable.

Powerful, free alternative to Device Manager

Robert Gough ran into the same problem with a nonresponsive USB port that I covered in my Oct. 15 column, “USB ports take temporary, unexpected furloughs.” But Robert found a different, very interesting solution:
  • “I had this same problem on my work PC and my home PC. Sometimes it seems to occur for any device I plug in, and other times it seems to be a device-specific issue. Regardless, the following fix works for me every time.

    “I downloaded devcon.exe from Microsoft. After I plug in a device that gets ignored by my system, I execute this program. The ‘rescan’ option causes the system to rescan the USB ports and — so far — this has always resulted in my USB device being acknowledged and usable.”
Nice, Robert! Somehow, I’d never heard of DevCon. Microsoft says:

  • “The DevCon utility is a command-line utility that acts as an alternative to Device Manager. Using DevCon, you can enable, disable, restart, update, remove, and query individual devices or groups of devices. DevCon also provides information that is … not available in Device Manager.”
Complete info and a download link are available in KB article 311272, “The DevCon command-line utility functions as an alternative to Device Manager.”

Very cool — and free!

Have more info on this subject? Post your tip in the WS Columns forum.

Reader Robert Gough will receive a gift certificate for a book, CD, or DVD of his choice for sending a tip we printed. Send us your tips via the Windows Secrets contact page.

Fred Langa is senior editor of the Windows Secrets Newsletter. He was formerly editor of Byte Magazine (1987–91), editorial director of CMP Media (1991–97), and editor of the LangaList e-mail newsletter from its origin in 1997 until its merger with Windows Secrets in November 2006.
= Paid content

All Windows Secrets articles posted on 2010-01-07:

Fred Langa

About Fred Langa

Fred Langa is senior editor. His LangaList Newsletter merged with Windows Secrets on Nov. 16, 2006. Prior to that, Fred was editor of Byte Magazine (1987 to 1991) and editorial director of CMP Media (1991 to 1996), overseeing Windows Magazine and others.