![]() ESN 47745-090420-394585-18 |
|
Document Name: Windows Performance Boosts Document Description: Windows Performance Boosts2009/04/20 This is about speeding up your Windows computer. I'm assuming that you have sufficient disk space, RAM and that you don't have viruses or spyware running - if you aren't sure about those things, see My Computer is slow!! I need to make a little disclaimer here and a warning. The disclaimer is that I'm not an expert in this area. I know quite a bit about this stuff, and I've often found that I actually know more than some people who are quite willing to tell you that they are experts, but I realize that what I don't know is far, far more than I do know. The warning is that some of the things I'm going to talk about here can get you into big trouble, especially if you don't understand what you are doing and make a mistake. I'll try to warn you about that kind of thing, but I can't think of every silly thing you might accidentally do, so this is definitely proceed at your own risk. Also - and this applies both to the disclaimer and the warning - things change. What was true yesterday might not be true tomorrow. Windows patches can change things, something somebody or something else did to your computer can change things, so what I say here could be wrong, wrong, wrong. Keep that in mind. XP, Vista, Windows 7I haven't had tremendous exposure to Vista or Windows 7. Yes, I have installed and used both of them so when I know that something applies to all of them I'll tell you, but I may just not know. Again, keep that in mind and proceed carefully. It's also possible that something I'd definitely recommend for XP may not be a good idea on Vista even though you'd use the same procedure to change it. The things I mention here are probably fine, but keep that in mind if you go scouting about looking for performance tips. With all that in mind, let's get started. Foreground/Background PriorityYou probably realize that your computer does a lot of background work. While you are reading email, your anti-virus software could be downloading new virus pattern files, your email program may be going out to check for new mail and there are probably several dozen other things going on at any given moment in time. The stuff you are doing (clicking, scrolling) is "foreground". By default, the operating system on a desktop machine is set to pay more attention to those kinds of things. It gives background tasks like the antivirus software less attention. I don't want to get too geeky here - priority scheduling is a pretty complicated subject and I could easily write a dozen pages just on that. Let's just look at it from a ten thousand foot view: If we have you doing clickety-click in your browser and that anti-virus software running in the background, the operating system has to pay attention to both things now and then. Let's say that it's been paying attention to you. What would cause it to give some CPU time to the A/V program? Well, one thing might be if you've asked to do something like save a bookmark. That's going to require writing something to the hard drive and that takes time - very little time from your point of view, but lots and lots of time as the computer sees things. So your browser says to the OS (Operating System), "Here, save this bookmark". The OS in turn asks the hard disk to actually write the information and that's where the time comes in - when the disk is done writing, it will tell the OS (using a "hardware interrupt") but in the meantime, here's an excellent opportunity for the OS to give some time to that background process. After all, you are waiting for the disk to finish up - well, it happens so quickly that you don't even notice but your process was waiting. So the OS gives some time to the background job. If the background job needs to write something to disk, the OS scheduler again sees that as an opportunity to switch back to you if you are done with your write.. and so it goes, except that ordinarily there are a lot more than just two processes to switch between. So what if nobody writes to disk or does anything else that requires waiting? That's another aspect of scheduling - every process only gets so much time before the OS snatches back the CPU and gives it to someone else. So how would you give more priority to the foreground? One way is simply to give it more time than you give to background jobs. We're only talking milliseconds, of course, but if you let foreground jobs run free for 100 milliseconds and limit background jobs to 20, the foreground jobs will be much snappier. Or you could look at actual CPU usage as Vista does now. You'd give foreground jobs more CPU cycles. Have you really sped anything up? No, of course not - you've just slowed down the background work. But it sure feels faster to you. Note that for a server - say something that's not usually used by a person - you'd want the opposite: more priority given to background jobs. In reality, job scheduling is much more complicated than this, but that should give you the idea. Now, how can we tell Windows that we want to give more priority to the things we're doing in the foreground? Here's the funny thing. This is true for XP, Vista and even the early Windows 7 versions I've seen: Windows has already set this to give priority to foreground tasks. If you look in the Control Panel settings (slightly different places in XP and Vista but the same idea), you'll see that it's set to give priorities to programs rather than background processes. However, it's not set to give the MOST priority. That's not what's funny. What's funny is this: if you change the setting to give priority to background processes, apply that and then change it back to "Programs" again, it WILL give maximum priority to foreground processes. How do I know that? Because I looked at the registry key after a fresh install and after making that seemingly non-change. By default, HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\PriorityControl is set to "2" and that is a value that gives priority to foreground. But when you use Control Panel to change this and then put it back to what it was, that key gets changed to 26 (decimal). That setting gives even more boost to your foreground work (if you want the gory details, see Unleash The Beast! ). This setting will definitely make your system feel crisper and faster. Network SearchingShared network printers just show up by themselves. That could be useful, but in an office environment with lots of printers, it can be very annoying. It's also wasting time searching. To disable: Control Panel->Folder Options. I haven't yet been able to find how to disable that in Vista. Unused FilesThis one's simple: goto My Computer, right click on your disk drive (C: ), choose Properties and then Disk Cleanup. The default checkmarks are fine; let it clean up that stuff. That won't clean up Firefox. To get rid of its temporary files, run Firefox, choose Tools, Privacy and then click "Clear Now". You might also consider changing the number of days it keeps history - I have mine at 7 days. The lower the number, the less this stuff builds up and the less there is to search through. IndexingWindows XP has this in Services but it's in Control Panel/System and Maintenance/Indexing Options on Vista. This builds a database that can speed up finding files if you need to go searching for them. It also slows down your machine when it builds or updates that index. For that reason, many people shut it off, figuring that they don't search very often and would rather have more speed now. Vista: How to disable Vista's desktop search indexing XP: Turn off indexing and speed up Windows XP Paging FilesEvery operating system uses a page or swap file to store things when it runs out of RAM. Using that file takes time and slows you down. The first thing to understand is this: the more RAM you have, the less you'll use that file. In theory, if you have enough RAM, you don't even need a pagefile at all (however, most OSes will still use it even when they don't need to to swap out unused code). If you have two hard drives (two real hard drives, not just a C: and a D: on one physical drive), you can improve performance by putting the pagefile on the less active drive. Now we come to the tough question: how big should the pagefile be? You'll often see the recommendation to make the pagefile 1.5 times installed RAM . That's reasonable, but not good for very small amounts of RAM or very large. For example, let's say you only had 64MB of RAM. With a 96MB page file, you'd have 160MB of total available space to run programs. That's not much - a larger pagefile would let you do more, albeit very slowly. As I said above, if you have enough RAM, there's no need to swap anything out. The 32 bit machines couldn't use more than 4GB or RAM, so if you had 4GB installed, the pagefile could be very small (again, in theory, not needed at all). In that case, putting in 1.5 times 4GB gives a total of 10GB. You can't use more than 4GB anyway, so why have it? You may need to have at least something. Let Windows tell you wha it thinks the minimum size is and go with that. Note that's if you have 4GB - that's usually the only time you'd want to pick the minimum size (unless you just can't spare the disk space). Does having too big a pagefile hurt? In a perfect world, no, it wouldn't matter. However, some stupidly designed programs will startup and keep requesting more and more RAM until the OS says "No". If you have 512MB of RAM and a big 4GB pagefile, those programs will eat up the pagefile and they'll slow themselves and everything else to a crawl. With 64 bit machines, you can have a LOT of RAM. Microsoft offers some help if you do: How to determine the appropriate page file size for 64-bit versions of Windows Server 2003 or Windows XP. Note that one of the first things that page says is this: When lots of memory is added to a computer, a paging file may not be required. How do you know if you have a 32 bit or 64 bit machine? For Vista, do Start -> Control Panel -> System and Maintenance -> System. Look for the line that says "System type". For XP, click Start -> Run and type sysdm.cpl. If it says "64 bit", that's what you have, otherwise it's 32 bit. If that doesn't work, see How to determine whether a computer is running a 32-bit version or 64-bit version of the Windows operating system. If you do have a lot of memory, you might want to make a registry change that tells XP not to page out unused kernel-mode drivers and kernel-mode system code. On XP and Vista set HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\ Memory Management\DisablePagingExecutive to 1. Warning: Regedit is dangerous. Stay out of this if you don't know what you are doing. For XP, do Start-Run and type "regedit". For Vista, hold the Win key and hit "r", then type "regedit" in the box that comes up. Navigate to the desired key and change it. Advanced TechniquesDoing these things can help speed up your machine. There are other things that can make a difference, but many of them involve advanced concepts that require too many caveats for an article like this. You can find lots of good and bad advice if you search the Internet, but you have to be careful with some of what you'll find. For example, there are a few commonly recommended actions that might not be such great ideas: Short NamesAnother registry tweak can shut off the creation of DOS compatible names. You probably don't need this but shutting it off doesn't gain much. If you still want to, it's HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation set to "1" (XP and Vista). Get rid of junkwareIf you call up Task Manager (Ctrl-Alt-Delete or run "taskmgre.exe") and click on Processes, you'll see lots of things running. Again, we're assuming that you have already cleaned up viruses and trojans; this is all legitimate stuff, but just because it's not malware doesn't mean you need it. Every unneeded program steals from you, so let's get rid of them. Don't expect miracles, though. Many of these things are sitting idle, waiting for something that needs them. Other than a little RAM, they may be using no resources at all. Still, they add to your startup time, they are using some RAM, so why have them if you'll never need them? Well, because you MIGHT need these things someday. Will you remember that you disabled them or will you be frustrated that you can't make something work as it should? Unless you KNOW that you'll never need a particular service, you should just let it be. You can find some of these things in Control Panel->Administrative Tools->Services. How do you know if a program listed there is not needed? Sometimes it's obvious. For example, you'll have Bluetooth support there. If you don't care about connecting any Bluetooth devices to your computer, you can disable that service. What if you don't know what the service is or whether you need it? You simply have to research it. The Internet is your friend here: you can just type the process name into Google and it will probably identify it quickly. For example, searching for "DCOM service" will quickly identify that service and probably convince you not to disable it. Not all background processes start in Services. You'll see things in the Process list that have nothing to do with this. Again, you just look them up in Google.There are also sites like http://www.systemlookup.com that are designed to specifically help with this. You do have to use some common sense. For example, take "ctfmon". you'll see that on most computers using Microsoft Office. It's not something you probably need, and you can get rid of it but if it's not from Office, it could be something nasty. Remember, though, we're assuming you have already used a virus/spyware cleaner, so it should not be that. Again - you should have already used virus/spyware tools to clean your system before looking at these things. What you are more likely to find is things like "lexpps.exe" (which is a support program for Lexmark printers) or "qbupdate.exe" (Quickbooks update). These are examples of things you may or may not need. If you don't need them, get rid of them.. unless, again, you are not sure that you might not need them someday. If that's the case, leave them alone. How much impact is the process having on your system? Task Manager can tell you that - it shows both the memory and CPU usage for every process. What you hope to see there is the System Idle process sitting at the top when you reverse sort by CPU - that's the process that runs when there is nothing else to do (the OS can't just stop easily, so it runs this). What you'll usually see for all those mysterious background processes is that they are using no CPU and very little RAM - so why bother? Assuming you do decide to get rid of something and can't find it in Services or Add/Remove Programs, a tool that can help with that is HiJack This!. There's a very detailed tutorial at http://www.bleepingcomputer.com/tutorials/tutorial42.html but for the case of just removing a benign but unwanted process, it's very simple: just have it scan your computer, find the unwanted process in the list, click its check box, and then click "Fix Checked". It's that simple, but do keep in kind that HiJackThis doesn't hold your hand - if you tell it to get rid of something (that's what "Fix" means for process startup), that's what happens. If you make a mistake, you can fix it if you made a HJT Backup - see http://www.bleepingcomputer.com/tutorials/tutorial42.html#HTRestore first. As you can see, this sort of thing takes time and effort. Is it really worth it? Usually it isn't. Disable Last Access TimestampIf you go searching for performance ideas, you'll probably find this. I think it's a bad idea. Knowing when a file was last used (even if it wasn't changed) can be very useful information, particularly when troubleshooting. The performance gain from shutting this off would be very, very small anyway - I advise not doing this. Disable Performance TrackingThis is another one you'll sometimes see recommended. Again, I wouldn't do this ordinarily because when you are trying to diagnose performance issues you need this information. Leave it alone. DefraggingThis is not the cure-all that many people think it is. You might get some benefit from defragging, but it's apt to be minor and short-lived. See my Why defrag Windows XP and Vista Desktops for more detail on that. Most people are just wasting time defragging regularly. Disk SettingsOn old machines, you could find your disk set to PIO mode (Device Manager, IDE Properties). That's slow - it should be set to DMA - but it's very unlikely that you'll have this problem today. You'll also sometimes find recommendations for changing disk drive caching. That's a tricky area. Go ahead and try it, but you it could slow things down more than it helps. You might want to read Microsoft's Things to consider before you enable System cache mode in Windows XP first. PatienceLook who's talking - I have very little patience, especially with computers that aren't doing my bidding as quickly as I want. But you really do need to relax a little. I was helping a neighbor do some cleanup on his computer yesterday and watched him start Internet Explorer three times because it didn't come up fast enough for him the first time he clicked. Of course starting up two extra copies didn't help the first one get running any faster.. and then, when it did open up, he started clicking away at bookmarks long before the poor thing was ready for him. We ask a lot of these computers, don't we? Author: Anthony Lawrence - Contact Author Publisher: Anthony Lawrence Licensee Name: Anthony Lawrence Reference URL: http://aplawrence.com/Microsoft/windows_perfamance.html Copyright: All Rights Reserved Registration Date: 4/20/2009 10:19:31 AM UTC Views: 488 |
