Wednesday, August 13, 2008

Common Windows Performance Tweaking Myths

Debunking Common Windows Performance Tweaking Myths


As a tech writer, one of my biggest pet peeves is the plethora of bad advice littered across almost every web site dedicated to system tweaking. Besides the tweaks that simply don't work, some of them will actually cause your computer to run even slower—or worse. Let's examine some of the most offensive myths out there regarding PC performance tweaking, and debunk them once and for all.

Disabling QoS to Free Up 20% of Bandwidth

This tip made the rounds with people believing that Microsoft always allocates 20% of your bandwidth for Windows Update. According to the instructions, you were supposed to disable QoS in order to free up bandwidth. Unfortunately this tip was not only wrong, but disabling QoS will cause problems with applications that rely on it, like some streaming media or VoIP applications.

Rather than taking my word for it, you can read the official Microsoft response: "There have been claims in various published technical articles and newsgroup postings that Windows XP always reserves 20 percent of the available bandwidth for QoS. These claims are incorrect... One hundred percent of the network bandwidth is available to be shared by all programs unless a program specifically requests priority bandwidth."

Make Vista Use Multiple Cores to Speed Up Boot Time

boot_option.jpgThis bogus tip made the rounds recently and almost everybody got caught including Lifehacker and big brother site Gizmodo... although commenters called it out quickly on both sides, and the editors updated the posts. (That's yet another reason to always participate in the comments here.)

According to this tip, you were supposed to use MS Config to modify the "Number of processors" drop-down on the Boot tab. The problem is that this setting is only used for troubleshooting and debugging, to be able to determine if there is a problem with a single processor, or for a programmer to test their code against a single core while running on a multi-core system. Windows will use all your processors by default without this setting.

Clearing Out Windows Prefetch for Faster Startup

The Prefetch feature in Windows XP caches parts of applications that you frequently use and tries to optimize the loading process to speed up application start time, so when a number of sites started suggesting that you clean it out regularly to speed up boot time it seemed like good advice... but sadly that's not the case, as pointed out by many Lifehacker commenters.

The Prefetch feature is actually used as a sort of index, to tell Windows which parts of an application should be loaded into memory in which order to speed up application load time, but Windows doesn't use the information unless it's actually starting an application. There's also a limit of 128 files that can be stored in the prefetch folder at any point, and Windows cleans out the folder automatically, removing information for applications that haven't been run as frequently. Not only that, but a well-written defrag utility will use the prefetch information to optimize the position of the files on the disk, speeding up access even further.

Windows expert Ed Bott explains it:

The .pf files don’t get used at all until you run a program. What actually happens when you click an icon is that Windows uses the information in the Prefetch folder to decide which program segments to load and in what order to load those pages.

Cleaning the Registry Improves Performance


The Windows registry is a massive database of almost every setting imaginable for every application on your system. It only makes sense that cleaning it out would improve performance, right? Sadly it's just a marketing gimmick designed to sell registry cleaner products, as the reality is quite different... registry cleaners only remove a very small number of unused keys, which won't help performance when you consider the hundreds of thousands of keys in the registry.

This isn't to say they are completely useless, of course. I'd still recommend cleaning the registry when you are trying to troubleshoot a problem caused by uninstalling buggy software that leaves entries behind, but even then you should be very careful to use a reputable application like previously mentioned CCleaner and review the entries before deleting anything.

Ed Bott weighs in with a stronger opinion:

I’d go a step further: Don’t run registry cleaner programs, period. I won’t go so far as to call them snake oil, but what possible performance benefits can you get from “cleaning up” unneeded registry entries and eliminating a few stray DLL files?

Clear Memory by Processing Idle Tasks

By this point you should be starting to get the picture... if something sounds too good to be true, it likely is. This well-traveled tip usually claims that you can create an "undocumented" shortcut to Rundll32.exe advapi32.dll,ProcessIdleTasks that will clear out memory by processing all of the idle tasks wasting memory in the background.

What's the problem? Those idle tasks aren't actually waiting in the background... what you are effectively doing is telling the computer that you've walked away so it can now do other processing while you are idle. Except you aren't. The real purpose of this functionality is to finish all processing before running benchmarks to ensure consistent times, and according to the Microsoft documentation there's a whole different story:

When called from the command line, the ProcessIdleTasks work is done in the background asynchronously. It can take 10 to 15 minutes for idle tasks to complete. Task Manager will report processes running, and the disk will likely be active during this time.

Read more at The Life of a Techno-Guru blog in a post called Response to Digg Article Claiming to Free up Memory.

Clean, Defrag and Boost Your RAM With SnakeOil Memory Optimizer

Just take a quick look at any download site, and you'll find hundreds of products that claim to "optimize RAM to make your computer run faster". Give me a break! Almost all of these products do the same things: they call a Windows API function that forces applications to write out their memory to the pagefile, or they allocate and then deallocate a ton of memory quickly so that Windows will be forced to page everything else.

Both of the techniques make it appear that you've suddenly freed up memory, when in reality all you've done is trade in your blazing fast RAM for a much slower hard drive. Once you have to switch back to an application that has been moved to the pagefile, it'll be so slow you'll be likely to go all Office Space on your machine.

Windows expert Mark Russinovich agrees:

At best, RAM optimizers have no effect, and at worst, they seriously degrade performance.

Disabling Shadow Copy/System Restore Improves Performance

I've barely come across a Windows Vista tips site that doesn't tell you to disable System Restore to speed up performance, because it takes up to 15% of your hard drive by default, which sounds like good advice. Except it's not.

The reality is that System Restore only actually kicks in when you are installing updates or applications, or at pre-scheduled times in the day, and the automatic checkpoints will only happen when your computer is not being used. These checkpoints allow you to easily roll back your system to a pre-crash state, and I can tell you from experience that System Restore is a critical feature when your Vista machine has problems, allowing you to easily get back to a working state.

Instead of disabling System Restore to free up space, Ed Bott suggests that you simply use Disk Cleanup to remove all but the most recent restore point. (Under the More Options tab, you'll find a Clean up button).

Enable SuperFetch in Windows XP

Somebody decided to start spreading the myth that you could enable SuperFetch in Windows XP by adding the same EnableSuperfetch key into the registry that Windows Vista has, and it spread like wildfire. Naturally, this tip was completely bogus.

The good news is that this tip is one of the few that will not harm your system in any way, as long as you don't break something while editing the registry. If you insist on using it, I won't complain.

If you want some proof, you can use the strings.exe utility to see that "superfetch" doesn't exist anywhere in the XP kernel, or you can believe Ed Bott and Mark Russinovich, who have already debunked this myth.

Disabling Services to Speed Up the Computer

Perhaps the most common myth is the advice to disable all services that you aren't using. I realize this will generate some controversy, so let me clarify: Disabling non-essential services that are NOT part of Windows will sometimes yield a performance gain if you have identified those services as causing a problem. You can identify or disable those services by opening msconfig.exe and checking the box for "Hide all Microsoft services" on the Services tab:

The problem with disabling services is that your devices will often not work once you do: for instance, I disabled the "Unknown" dlbt_device service in the list above, and could no longer print to my Dell printer... disabling the VMware services made VMware unable to run, and so forth.

You should be even more careful to not disable built-in Microsoft services in Windows, except for a select few under certain circumstances:

  • SuperFetch—This caching service preloads applications into memory, and actually does work. The problem is that it can cause your hard drive to do a lot of grinding while it's working, which is especially irritating on a laptop.
  • Windows Search—If you don't use the Vista search or you use an alternate desktop search engine, you really don't need this service and can increase performance quite a bit by disabling it.
  • Windows Defender - If you are already using another anti-malware product, you really don't need this running as well.
Ed Bott's summary speaks for itself:
If someone tries to talk you into disabling a bunch of other services, ask them what you stand to gain. I’ll bet they can’t tell you.

Editor: Readers should note that a recent Windows Vista tweaking guide, offered for download by Microsoft, does suggest disabling unneeded services.

When it comes to performance tweaking, a very large amount of testing is required each and every time you make a change. The better option is to simply install more RAM and clean up your PC if you are having performance problems, and perhaps demand a little more proof before applying secret hacks.

The How-To Geek is a tech writer and geek enthusiast who loves to tinker with hidden settings that actually work. More of his tips and tweaks can be found daily at Howtogeek.com.

No comments:

How to Get files from the directory - One more method

 import os import openpyxl # Specify the target folder folder_path = "C:/Your/Target/Folder"  # Replace with the actual path # Cre...