Social Icons

Tuesday, March 10, 2015

Windows Vista: Tweaks to boost performance

 Windows Vista: Tweaks to boost performance

Our tips on finding and weeding out system performance hogs, optimizing memory, and restraining Vista's features will make your system soar.

Soon after Windows Vista came out, many suggestions for tweaking the operating system to improve performance emerged. Unfortunately, most of those tweaks turned out to be pretty disappointing: they either provided the illusion of better performance but did nothing of substance, or they were rehashes of existing Windows XP tips that might note even be valid on Vista. 

Still, there are plenty of things that can be done to make Vista run better. Over the past several months I've kept an eye peeled as to what actually works, what doesn't, and why. With less work than you might think, it's entirely possible to have Vista running quite snappily.

I've assembled here the fruits of that personal research into what works when it comes to making Vista run well. I've listed these in roughly descending order of effectiveness, with most effective first.

1
Add Memory


2 Gbytes of memory is plenty for 32-bit Vista.

There is one undisputed Vista performance tweak that works: add memory.
Yes, I know; Vista requires a lot of memory. You need at least 512 Mbytes of RAM to install Vista -- a lot more than Windows XP required. Debatable or questionable as this may be, it is simply the way Vista works, and there is no dancing around the issue. (Actually, you need 512 Mbytes to install Vista, but I've found that you can run Vista after the initial installation with less memory -- although that's something of a losing proposition.)
In all fairness, six years have gone by since XP came out, and the baseline memory allotment for new systems is 512 Mbytes or more. Memory is now dirt cheap compared to what it was even a couple of years ago, so there's little reason to not load a system with a generous amount of memory. Everything, not just Vista itself, will run better as a result.
The baseline for good day-to-day performance in Vista seems to be about 1 Gbyte. If you have 512 Mbytes, bring that up to a full gig or more. My Sony VAIO notebook, for instance, runs Vista nicely with 1 Gbyte of memory, although I also don't run games or other extremely demanding applications on it. (Office 2007 runs very well, though.)
There are reasons why adding memory may not be immediately practical or possible. One is cost, especially if the only way to upgrade the current system is to replace all the existing DIMMs rather than add new ones. The strongest suggestion I can give here is: save your money. If you sock away $10 a week, then in about two months you've got enough money to pick up a very good set of matched 1-Gbyte DIMMs by current market value.
One question that I've been asked: Is it true that 32-bit Vista doesn't work well with more than 3 Gbytes of memory? The answer is, sadly, yes. If you're running the 32-bit edition of Vista, even if you have the physical capacity for more than 3 Gbytes of RAM, Vista won't use more than 3 Gbytes anyway. The memory space above 3 Gbytes in a 32-bit system is eaten into by system devices (like the video card) and cannot be effectively mapped out for user applications.
Boot 64-bit Vista, however, and the way memory is allocated changes radically enough to work around this problem. The one big thing holding back many people from using 64-bit Vista, even if they have a 64-bit machine, is device driver support -- most legacy devices will probably never have 64-bit Windows drivers available for them.


Summary of advice: if you're using 32-bit Windows, you can top things off at 2 Gbytes and not feel like you're missing much of anything. Depending on what you're doing, you might not need even that much anyway.
A trick I've seen bandied around a lot is to save memory by shutting off unneeded system services. This is a bad idea for many reasons, not the least of which is it's entirely too easy to shut something off, forget about it, wonder why the system is behaving bizarrely, and then realize too late that it was actually needed for something. The total amount of memory you get back from shutting off assorted system services is not going to make a major impact on performance, except on a severely memory-constrained machine -- which you shouldn't be running Vista on anyway.
However, one Vista program that I have absolutely no problem with people shutting off is the Sidebar. It's entirely optional anyway, and unless you're actually getting some use out of it there's no overriding reason to keep it running. (I personally don't use it at all.)


2
Find Out What's Hogging Your System

On current hardware, Vista should not be slow. If your system runs slowly, something is wrong, and you owe it to yourself to find out what. To that end, you need to do some research and see where all of your CPU and I/O are going. Don't guess; investigate. Sometimes the answer is surprisingly simple.


Use Process Explorer to investigate what's running.

My first choice to investigate such problems is Sysinternals' invaluable Process Explorer utility. Download it, unpack it into a directory somewhere in your user profile, and use it as your Task Manager replacement. When I run it, I typically select "Show Details for All Processes" in the File menu to run it as an admin so I can see information from system services, as well as my own applications. I then turn on the CPU History and I/O History (under Options) and run it in the System Tray. If things start to bog down, I glance at the CPU and I/O meters to see if either of them is peaking. If they are, I hover the mouse over the meters to find out what's using the most of either one of those resources.
Constant hard drive activity is one of the symptoms that many people cite as evidence that something is wrong. Using Process Explorer helps you figure out what's causing all that churning, and to what end. If your disk is in use, but the I/O history is flat or very low, that means whatever's running is doing so at such a low level of I/O priority that anything you do is likely to override it immediately anyway. The disk light is something of a red herring.
(Sneaky trick: If your computer is at eye level, try putting the system unit under a desk and see how your perceptions change. I found that when I wasn't paying attention to the hard drive light, the vast majority of the time I had no clue that the system was busy with something, so it didn't matter.)
Some of the programs that might use I/O or CPU are system components. Here's a few of the most common and what they do:
  • TASKENG.EXE: The Task Scheduler Engine. Anything that's run as a scheduled task (such as a defragmentation operation) will typically show up with this as the host process.
  • SVCHOST.EXE: Service Host, a process that runs system services. If you double-click on a SVCHOST.EXE process in Process Explorer and then click on the Services tab, you'll see what services are running under that process. You can also hover the mouse over the SVCHOST.EXE instance in the Process Explorer task list and see a tool tip that lists all of the services running under that process.
  • TrustedInstaller.exe: A system process used to perform installations of system components, such as Windows Updates. Many people have reported that TrustedInstaller.exe starts up, runs very aggressively for a couple of minutes -- sometimes interrupting or slowing down other things, like games -- and then stops. (There's been a huge number of complaints about this, so I suspect it's a candidate for a Service Pack 1 fix.)
Another nice feature of Process Explorer is that you can display a "company name" column for any given executable to find out who made the thing. If you see something doing a lot of grinding, and it's not a Microsoft-branded system component, then chances are you've found one of your culprits.


3
Get Rid Of Anything You Don't Need.


If there's nothing hogging a lot of CPU or I/O time but the system is still slow, the next thing to do is pare out everything you don't need. This rule is a must if you just took possession of a new, factory set-up PC.
Whenever I get a new machine, my first mission is to remove everything that does not absolutely have to be there -- all the trialware, all the little tray applications that have been shoveled into the computer at the factory, and so on. This is an endemic problem which has not improved much with time, although in the last year or so it's gotten incrementally easier to buy a Windows PC not pre-stuffed with junk.


Get rid of applications you don't use.

  • DO remove: Trialware, programs you're not likely to use anyway, or applications whose functionality can be replaced by other things that aren't as onerous. If a system ships with Roxio or some other similarly top-heavy CD burning app, I advise the owner to dump it and replace it with ImgBurn or CDBurnerXP, two programs I use myself to excellent effect. They can do the vast majority of what people need a program like Roxio for in the first place, and don't impose anywhere nearly as much of a system load.
  • THINK ABOUT removing: Security applications that came pre-loaded with your PC. Some of them slow things down terribly and can be replaced with a free equivalent that is much more lightweight and that only gives you what you need, not what they think you need. Grisoft's free edition of AVG, for instance, is an excellent, lightweight antivirus solution, and it doesn't cost a dime.
  • DON'T remove: Applications or drivers that enable hardware or functionality which have no native Vista equivalents. My notebook's touchpad software, for instance, has gestural controls which only work when you install the manufacturer's driver. I like having that feature, so I leave it in, and in this case there are no ill effects.
A key reason why some programs slow things down is not because they use up a lot of memory (although that can happen). It's because they hook into critical parts of the system and force the OS or the shell to wait on the application in question whenever something is invoked. The most prevalent example of this is a program which adds a right-click context menu in Explorer. It's one of the most common places in Windows for a program to add a hook. If the hooking application is badly written, though, the whole shell will seem to hang when you perform a right-click on a file or folder because the app is forcing the shell to wait while it populates that menu.


Autoruns tells you what runs at startup, login, and in the shell.
One way to find out about which programs are doing such things is to use another excellent Sysinternals utility, Autoruns. Run the program (as administrator) and click on the "Explorer" tab to see what shell extensions are installed and might be causing problems. The "Logon" tab is also especially useful, since you can see what might be loading against your wishes. And, like Process Explorer, you can see who manufactured which programs. There's also a menu option (Hide Signed Microsoft Entries under Options) to exclude any Microsoft programs from the list so you can narrow things down to third-party culprits. Any programs that look suspicious or problematic can be unchecked, and later added back in if needed. You can also right-click on any program and run a Web search against the name of the executable. (There's a known bug with the most recent version of Autoruns' Web search and Firefox 2.0, which is currently being examined.) Be sure to reboot after making any changes.
Another fine program you can use to root out badly written shell extensions is Nir Sofer's ShellExView. It's specifically for dealing with shell extensions, though, on the whole, Autoruns is more comprehensive. But it's still tremendously useful for seeing if a given shell extension is a stumbling block without being distracted by toying with other settings.



4
Tune The Vista Search Index


Vista's search system also gets singled out for being slow, or for slowing down the rest of the system, but you don't have to live with that. First of all, ask yourself if you really need it. If you don't use the search service a lot, then by all means turn it off. But if you do want to use the search service, start by checking that the directories being indexed for search (or "crawled") are the ones you actually want to index.
To change the scope of the index, type "Index" in the Start menu search bar and select Indexing Options. Take note of the list of folders in Included Locations; if there's anything being indexed there that you want to change, click Modify -- Show All Locations to bring up a selectable directory tree.


Pare down Vista's search index.


On my system, I have the following folders indexed: my Users directory, my Outlook folders, my music directory (mostly so I can search music metadata without having Windows Media Player running), and some folders on another drive that contains a large number of tagged photos and documents that are synced to my notebook. That covers everything of importance that I need to search, and so the amount of work on the machine's part to keep the index up to date is minimal.
Some general advice for how to set up indexing:
  • Don't select an entire drive when you can simply select relevant folders. Unless you're devoting a whole drive to material which is specifically being crawled for indexing, index specific directories. This narrows the scope of the changes that can trigger a crawl.
  • Do not index program directories. There generally isn't data in there worth indexing in the first place.
  • Be mindful of third-party programs that might repeatedly write data into a crawled directory without you knowing about it, and in turn repeatedly trigger indexing crawls.
iTunes is one example of this. If you use iTunes, you should disable indexing of the iTunes Music Library folder. In Windows, this folder is %userprofile%\My Documents\My Music\iTunes\, which has the file iTunes Music Library.xml in it. If you have a lot of music in iTunes, this file becomes quite large, and every time it changes, the Vista indexer will attempt to re-crawl the whole thing from scratch and waste a lot of time. Since there's no particular reason to index this file, it can be excluded.
On the other hand, there are programs like AIM 6, which can write logs of chat sessions to files in the Users directory. I have the crawler turned on for the directory where my instant messenger chat logs are saved, since I want them to be searchable.
If you want to disable Vista search entirely, go to Services (in Control Panel's Administrative Tools), double-click on Windows Search, hit "Stop," and set the service startup type to "Disabled". If you have Outlook 2007 installed on Vista, note that the enhanced search function in Outlook uses Vista's indexing, so if you fire up Outlook with indexing disabled, you'll get a warning about it. You'll still be able to search e-mail -- but e-mail searches will be very slow. Also, any other programs that depend on Vista search to run may balk, so be mindful that you've done this. Of course, another way to "disable" Vista search without actually disabling the service is to just uncheck all the directories that are crawled, which has fewer potentially unexpected side effects.
If you use the Start Menu's search box to only search for programs by name, not e-mail or files, you can speed up the search results by changing the search box's behavior. Right-click on the Start button and select Properties -- Start Menu -- Customize, and uncheck the options "Search communications" (i.e., e-mail) and "Search favorites and history," and under "Search files" select "Don't search for files." This cuts down on the amount of time needed to return results, and you can always use the main Search menu for a more inclusive search.



5
Tune System Restore
There are two basic tweaks you can make to System Restore: changing the size of the System Restore repository, and changing the System Restore schedule. The first affects how much space is set aside on any given disk for System Restore. The second affects how often System Restore runs in the background.
System Restore has been designed to run as efficiently as it can. Still, on machines that don't have as much spare I/O capacity -- notebooks, or some computers that only have one hard drive -- things can slow down when System Restore kicks in. My solution in such a case is to set System Restore to run a little less often -- or, on a non-critical machine, disabling it entirely. On my notebook, for instance, I have a relatively small System Restore repository, and I set it to run only once a week. This machine almost never has original data on it anyway, so if something goes wrong it's not a major loss.


Change your System Restore schedule.
To change the amount of space set aside for System Restore, you'll need to edit that volume's Shadow Copy storage space, which is where System Restore information is kept. Launch an elevated command prompt and type:
vssadmin resize shadowstorage /for=[drive] /maxsize=[size]
where [drive] is the drive letter that you're changing the size of the Shadow Copy storage space for (typically C:), and [size] is the size of the space to allocate (e.g., 16 Gbytes). The default Shadow Copy allocation for any given volume is 15% of that volume's free space, but with this technique it can be ramped up or down to a precise amount if needed.
To change the System Restore schedule, open the Task Scheduler and drill down in the left hand pane to Task Scheduler Library -- Microsoft -- Windows -- SystemRestore (one word). In the top of the center pane you'll see the scheduled task for System Restore; double-click on it and select the Triggers tab. By default, System Restore is triggered on two occasions: 1) 30 minutes after the system is booted, and 2) at midnight every day. In both cases, by default, it'll run as soon as possible if a scheduled instance is missed. You can edit or disable either one of these triggers by double-clicking on them and changing the options.
I edited the System Restore schedule on my notebook, where I set System Restore set to run 12:00 AM on Monday morning, so it doesn't kick in during the rest of the week when I'm actually trying to get things done. Obviously, this means that fewer System Restore points are created -- but again, since there's nothing wholly irreplaceable on that machine, this isn't as big an issue. (My desktop, however, still has the default System Restore schedule.)
Note that if you make changes to System Restore settings (through the System Protection tab in System Properties -- Advanced), these scheduling options may be undone. Also, don't delete the SystemRestore task; you can just disable all the triggers if you don't want to run it for whatever reason. If you delete the task by mistake, you'll need to disable and re-enable System Restore from the Control Panel -- System -- System Protection menu. This will recreate the task with its default scheduling.



6
Use A Second Hard Drive To Parallelize Operations
A second internal hard drive isn't just a "place for your stuff," to quote George Carlin. It's also a way to speed things up. If you place your paging files or index files on those drives, access to them can be parallelized with other things so your system disk isn't bashed quite as hard.


Move most of your paging file to a second drive.
With my systems that have a second drive, I place the biggest slice of the Windows paging file on that drive, and leave a small slice on the system drive for crash dumps. You can turn off the paging file on the system drive altogether as well, although this may limit the amount of information that can be generated when there's an error report.
It's also possible to place the Vista search index on a second hard drive, which also speeds things up. To move the index to another drive, click "Advanced" from the main Indexing Options menu, click "Select New," and you can point to another folder where you want a new copy of the index to be created. You'll need to reboot after doing this, and the index will have to be rebuilt from the ground up -- but after that you should see the index perform a bit better since it won't be overlapping with other system I/O.
I have been warned that if the second drive goes offline you'll get warnings about the index being invalid, but if that happens I suspect you'll have bigger things to worry about than a broken search index.




7
Tune Defrag, But Not To Excess
Defragging is one of those universally recommended system performance tweaks, but it should not be counted on excessively. It will not speed up a hard drive that is already slow, and it's not worth investing a great deal of time and effort in tweaking if the payoff is indiscernible.
Microsoft reworked how Defrag works in Vista -- it now runs by default as a scheduled task without user intervention. These changes inspired a lot of ire, mostly from people who insist on micromanaging defragmentation (whether or not such tweaking actually creates any measurable results), and not from regular users who hate having to remember to defrag.


Fine tune your defragmentation schedule.
Still, there are a few manual optimizations you can make to change the way Defrag runs, mostly to have it complement your work habits. Your best bet is to set Defrag to run during a stretch of time when the system will be running, but idle for at least part of the time. Defrag is designed to run at low I/O priority and not hog the system, but if you want it as far out of your way as possible without having to manually invoke it, then editing the schedule makes sense.
To do this, just type "Defrag" in the main menu's search box, click on "Disk Defragmenter," and click on "Modify Schedule." My choice has been to set the machine up to start Defrag at noon (i.e., when I take lunch); by default the scheduler waits for a three-minute block of idle time before starting Defrag. After using this setup for about a month, my fragmentation stats remained at around a satisfying 1-2%.
Another thing that has been pointed out is that, by default, Defrag does not touch file fragments larger than 64 Mbytes. This is because the vast majority of the time you get no real performance improvement by consolidating those fragments -- you typically spend more effort shoving those pieces around than you get back in speed. I set up a scheduled task to run Defrag with the -w switch once a month, which cleans up any fragments larger than 64 Mbytes -- but it's set to run at a time when I'm not likely to be around (4:00 A.M.), and running it more than once a month would probably not improve anything.
(Sneaky trick: If you lock the workstation [Winkey-L], Vista interprets that as a sign that you're idling, and will let Defrag or indexing operations run that much faster.)
If you still want to manage defrag a little more closely, there are options. The command-line version of DEFRAG can be run from an administrative CLI to give you fragmentation statistics; run it as defrag with no options to get help. You can also always get a third-party defrag tool for free and use it instead if you want more detailed feedback and control -- I've used JKDefrag, which is very nicely done -- but I've found virtually no discernible difference in performance by doing so.
There are two other things you can do that will strongly affect fragmentation. The first is keeping a generous allotment of free space on a given drive; I personally strive for at least 33% free space whenever possible. The second is upgrading to a bigger hard drive -- say, going from an 80-Gbyte or 160-Gbyte drive to a 320-Gbyte or even a 500-Gbyte drive. This will have far more of an impact on performance as a whole, including fragmentation, than anything you could do in software.



8
Try ReadyBoost, But Don't Throw A Lot Of Money At It
One of Vista's features that may help people with less memory than they'd like is ReadyBoost. Plug in a flash drive that Vista certifies as being fast enough, and Vista can use it as a read cache for small randomly read amounts of data normally stored on disk.


A ReadyBoost flash drive can accelerate performance.
Since flash memory can deal with random small reads far more efficiently than big sequential ones, the idea is to use the flash drive as a cache for those kinds of operations. Everything written to the ReadyBoost cache is also backed by what's already been written to disk, so if you yank out the flash drive, the system won't die on you (at the cost of some performance). If you're curious about the technical details of this feature, the best place to start is Mark Russinovich's TechNet article, where he talks about ReadyBoost in the context of a number of other kernel-level changes to Windows.
The big question: Is ReadyBoost a substitute for adding RAM to a system? In short, no. On systems with 1 Gbyte of RAM or better, you probably won't see a discernible performance kick. Notebooks with slower hard drives seem to get the most benefit from ReadyBoost, since ReadyBoost is most directly useful there in offsetting a bottleneck in the system. Also, the performance will vary between different makes of flash drives; not all flash drives are created equal. (Look for drives that are specifically enhanced to work with ReadyBoost.)
My advice is to try ReadyBoost as a provisional way to accelerate performance, but do not spend too much money on it. If there's $50 to spend on either a flash drive or to put towards a RAM upgrade, spend it on the RAM. You'll see more real improvement across the board.



There's a slew of other, smaller things you can do to boost performance in Vista as well.

9
Install Your Updates
I'm talking about updates 938194, 938979, and 941649, which should be installed in that order for the best results. These provide a whole slew of fixes that will also be available with Vista SP1 and do noticeably improve system performance. Don't wait on SP1 to come out to take advantage of them if they aren't already installed. You can find out if you have them already by going to Control Panel -- Programs and Features -- View Installed Updates; each one should be listed as "Update for Microsoft Windows (KBXXXXXX)".







10
Check For Other Driver Updates
Mass-storage controller and chipset drivers can have a major affect on system performance, so it makes sense to have the most recent editions of each. That said, they're not always provided through Windows Update. You may have to go to the manufacturer's website (Silicon Image, in my case) and download them manually.







11
Tune Windows Defender
If you use Windows Defender but don't want it to scan every day, you can always schedule it to run a little less aggressively. The Defender interface lets you run the scan either daily or once a week, but if you want to change it to something else entirely, fire up Task Scheduler, click on View -- Show Hidden Tasks and look for the program's schedule in Task Scheduler Library -- Microsoft -- Windows Defender.







12
Turn Off Some Eye Candy
Those fancy Aero effects are great, but a few of them -- like the flying-windows effects -- can make the system feel sluggish. Go to Control Panel -- System -- Advanced System Settings -- Advanced -- Performance -- Visual Effects, select "Custom," and turn off the effects you find most piggish. The "Fade or slide menus" option is usually the first one I shut off, but I keep the shadow and glass effects on without seeing much, if any, slowdown.

No comments:

Post a Comment