
For any hard disk based PC it is important to understand how the disk works and how your computer uses it.. Inside that little silver box is a spinning circular plate of metal. A magnetic reader/writer (sometimes called a head) swings over that plate to record or read data. The outside of the disc spins at the same speed as the inside but is bigger, so data passes by the magnetic head more quickly when the data is near the outer edge of the disc. To sum it up, the outside of the disc is where you want stuff when it needs to be fast.
The page file is a special file on the hard drive that is used like computer memory. When Windows starts to run out of memory to run programs it moves some of the data in the memory to the page file. The page file is much slower than memory, but it's better than nothing at all. You can choose which hard drive or partition stores the page file and adjust the size of the page file. To do this in Windows XP, right-click on the 'My Computer' icon and click on 'Properties' in the context menu. In the new window, click on the 'advanced' tab, and then the 'Settings' button in the 'Performance' box. You'll get another window (I promise we're almost there), click on the 'Advanced' tab in the new window and then click on the 'Change' button in the 'Virtual Memory' box. In the window that pops up (the last one, I promise) you can adjust the page file settings. I would recommend for most gamers a minimum and maximum size of 2048. If you have more than one hard drive I would recommend putting it on the drive that your games are not installed on. When installing or reinstalling Windows you can set up a partition of about 2GB before your main partition. You can then relocate your page file to it and rest easy knowing that it has the fastest part of the disk to itself.
As you use your PC temporary files can accumulate from crashed programs, web browsers, and installer files. Use CCleaner to clean up junk and fixup any minor registry errors. You may need to run it multiple times to fix all of the registry errors.
If you are sure your PC is in proper working order, you can also eliminate old system restore points to free up even more space. Right click on your C:\ drive in 'My Computer' and click on 'properties'. Just to the right of the disk pie chart you'll see a button marked 'Disk Cleanup'; click it. After a few moments (or a great many moments), a new window pops up with two or three tabs. Click the one marked 'More Options'. The last option you see in that window should be one to remove all but the most recent restore point. Go ahead and click it if you're sure you won't be needing them any longer. Once that has run it's course, go back to the first tab and check all of those boxes except that one marked 'Compress old files'. Compression is the enemy of a fast PC. Click 'OK' and let the PC clean the last bits of junk from your hard drive. Repeat the steps in this paragraph for all of your PC's hard drives.
The next two steps will tune your file system to give priority to your page file and games. First, if you were not able to give the pagefile it's own partition, run PageDefrag and schedule a defrag for your next boot if you have more than one pagefile fragment. This app will schedule a pagefile defrag upon the next reboot (or all boots). A unified pagefile can improve performance if your PC relies on it to handle large apps.
After rebooting to defrag the pagefile, you can use JkDefrag from the Windows command line to sort your files alphabetically by path and file name. All movable files will be placed closer to other files in nearby directories speeding up program load times. For example all Steam files will be placed near one another on the hard disk; whenever TF2 is loaded the drive won't have to seek as much to find each needed file. Just double clicking JkDefrag.exe will make things a whole lot better, but the commands to really sort out your files are:
JkDefrag.exe -a 6 "C:\"
JkDefrag.exe -a 7 "C:\Program Files\Steam"
JkDefrag.exe -a 7 -e "C:\Program Files\Steam"
The first command moves all of the data on the disk to the end of the drive; this will take a very long time. The first step is important only if you are a perfectionist like me, ignore it otherwise. Once you have a large empty space (or not) at the beginning of the disk, the second command moves Steam to the very beginning of the partition. You can adjust the command to fit your needs if Steam isn't at that location, or if you want to optimize another program. The third command moves everything else up to the front of the disk (sorting by path and file name), but does not touch your Steam folder. You can optimize for several programs by using the '-e' option to exclude those files that you have already moved. Another obsessively perfectionist example:
JkDefrag.exe -a 6 "C:\"
JkDefrag.exe -a 7 "C:\Program Files\Steam"
JkDefrag.exe -a 7 -e "C:\Program Files\Steam" C:\Windows
JkDefrag.exe -a 7 -e "C:\Program Files\Steam" -e C:\Windows C:\
Put these commands in a batch file and run it overnight if you prefer. Keep in mind that the "JkDefrag.exe" part needs to be the actual path to the program and not just the program name. Two warnings about this though; JkDefrag can take a really long time to complete the first time, and a damaged hard drive could be damaged further by all that disk activity. Do not ever defrag a hard drive that is suspected of being damaged.
Last, but most important, if you want to prevent certain programs from starting up with Windows, I'd recommend using Autoruns. You can go through and see every startup item including drivers (.sys files) and libraries (.dll files). A quick Google search for any particular one should help you identify whether or not it's vital to your PC's operation. This can also be used to disable malware and trojans if your antivirus program doesn't catch them. Be very cautious with this program. It is very possible to render your PC unbootable with this tool, so when in doubt, don't touch it!
I've had great success with all of these tools. JkDefrag in particular has a fantastic forum that can answer any questions you have. If you have any questions for me or spot any errors, PM me or post a reply.
EDIT: 04/09/08 4:49 PDT
Expanded page file section at Mr.Blah's suggestion.