Quantcast

Blogs

Hardware Tips

Keep your PC's internals and externals in tiptop shape by following the sage advice of Contributing Editor Kirk Steers.

Subscribe to this blog

Hardware Tips: Jog Your Memory for Faster PC Performance

Kirk Steers

Not so long ago, having 64MB of RAM on your PC was considered a luxurious excess. Today, it's the bare minimum. Running many programs at once, processing graphics and video, or caching heaps of Web pages--each devours RAM the way TV's Homer Simpson devours donuts at a Krispy Kreme factory.

Insufficient or improperly configured memory can hinder a PC's performance and cause intermittent, hard-to-resolve error messages, or even system crashes. The best way to avoid this, of course, is to add more memory to your system.

RAM prices fluctuate rapidly, but they have trended down in recent years. I recommend upgrading to at least 128MB.

But before you add memory, make the most of your existing RAM. Windows has several settings for optimizing memory performance, as well as tools for finding and fixing memory-related problems.

When your PC runs out of space in standard memory (its RAM chips), it stores overflow data in virtual memory, which is simply a large file--called a swap file--that's located on your hard disk. Data is accessed from a disk slower than it is accessed from standard RAM, so it pays to optimize your swap file's performance.

To view your swap file settings, right-click the System icon on your desktop, select Properties, and choose Virtual Memory under the Performance tab.

Set Your Swap File

By default, Windows automatically adjusts your swap file's size to meet its needs. A nearly full hard disk squeezes your swap file, and this can lead to sluggish performance or sometimes a system crash. So always have at least 100MB of disk space put aside for your swap file.

To set the size of the swap file manually, choose Let me specify my own virtual memory settings in the Virtual Memory dialog box (see FIGURE 1). Select a minimum size and a maximum size, or enter the same number in both fields to fix the file at a constant size. Freezing the swap file's size may increase system performance because Windows no longer has to adjust the file size, but it also increases your PC's risk of running out of memory.

If you have more than one hard disk, place the swap file on the one with the fastest access time. Do so by changing the value in the 'Hard disk' field of the Virtual Memory dialog box and then rebooting.

Defragmenting your hard disk can improve its performance as well. Over time, files get stored on a drive in pieces that may become scattered around the hard disk. A defragmentation utility rearranges the data on the disk to store each file in a single, contiguous block. Applications can access a file that has its pieces stored in close physical proximity on your drive much more quickly than they can access a file with scattered pieces.

To run Windows' Disk Defragmenter utility, select Start, Accessories, System Tools. Unfortunately, that won't defragment the swap file because Windows considers it fixed data that can't be moved. To overcome this hindrance, make the swap file as small as possible before you defragment by restarting your system and closing all apps that launch on start-up.

If you have enough physical RAM installed, you may be able to remove the whole swap file temporarily, defragment the disk, and then replace the swap file. Make sure your system has sufficient RAM to run Disk Defragmenter, however. If your system runs out of RAM and has no swap file, it may crash. See "Mind Your Memory" below for instructions on how to check your available memory.

To remove the file, check Disable virtual memory in the Virtual Memory dialog box and reboot. To reenable it, uncheck Disable virtual memory and reboot.

Mind Your Memory

Worried about running out of memory? To avoid system crashes, keep an eye on how much free memory you have left.

Windows' System Monitor utility shows the level of unused memory Windows has at any given time, along with several other useful performance statistics. To run the utility, choose Start, Programs, Accessories, System Tools, System Monitor (or install it from your Windows CD via the Add/Remove Programs applet in Control Panel). System Monitor displays such real-time statistics as swap file in use, swap file size, and unused physical memory (see FIGURE 2).

Select Edit, Add Item, Memory Manager to choose the memory statistics you want System Monitor to display. Unused physical memory, swap file size, and swap file in use can help you estimate which programs have the biggest appetite for RAM. But there's a way to get a more accurate measure of how much RAM a given program requires. First, determine the amount of memory all your running programs are using by adding the values for 'Other memory' and 'Swappable memory' in System Monitor. Then subtract the value of 'Disk cache'. Now close a program and repeat the same steps. The difference is the amount of RAM used by the program you just closed.

Windows' System Resource Monitor is another excellent diagnostic tool for keeping track of your PC's memory usage. 'System resources' is a 128KB area of memory that current versions of Windows use for compatibility with older apps; if it runs out, Windows displays an 'out of memory' error message, even though you may have plenty of free physical or virtual memory on hand. Resource Monitor places a Resource Meter icon in your system tray. Place your mouse over the icon to see the percentage of Windows' free resources that are available for use, or double-click it to see the amount of available memory as a larger graphic.

If your resources drop below 25 percent, be wary about opening new files and applications. If they drop below 10 percent, you'll see a low-memory warning on your screen. At that point, you're heading toward a system crash. Save your work immediately and close all unnecessary applications and files.

Check for Memory Leaks

Having too many applications or big files open isn't the only reason for low memory. Sometimes poorly written software programs don't release blocks of memory when they're finished using them. Such 'memory leaks' add up quickly and can tie up your RAM and/or your system resources.

You can spot these leaks by monitoring RAM use with the System Monitor and Resource Monitor. Watch for programs that don't return memory to their original levels when you close them. Also, keep an eye on the 'Threads' listing in System Monitor. (To view it, choose Edit, Add Item, Kernel, Threads.) Software operations are broken into threads that your PC's hardware performs. If the number of threads continually increases--especially over the course of minimal computing activity--you've probably sprung a leak.

Unfortunately, leaky software isn't uncommon. If you suspect that a program is leaking memory, check the vendor's Web site for a fix.

You can also recover RAM lost to leaks and unused DLLs with a handy utility called RAMrocket. It was just released at press time so we didn't get a chance to test it thoroughly, but it looks promising. Try it out for yourself: Download a 14-day trial version available exclusively to PC World readers.

  • Recommend this story?
  • 0 Yes
    0 No

With HP wireless printers, you could have printed this from any room in the house. Live wirelessly. Print wirelessly.

Focus on Personal Productivitysponsored by Microsoft

  • Personal Finance 2.0 These free and fee-based Web services not only aggregate data from your online bank accounts, they give you tools for managing your money.
  • High-Tech Travel Tips Plenty of stories provide advice for elite mobile professionals. But what about you, the unproductive traveler?

All PC World Blogs

  • CDW Security Center Is your data protected? Visit the CDW Security Center Learn where you may be vulnerable and how to address those risks.
  • Asus Laptop Showcase Ultra-fashionable thin and light notebooks with SmartLogon Face Recognition. Find out more...
  • Personal Productivity Want to make the most of your limited time? Click here for more info...

PC World's Marketplace

PC World's Free Whitepapers

Name City
Address 1 State Zip
Address 2 E-mail (optional)