The Explorer: Real-World Answers About Virtual Memory - InformationWeek
Software // Enterprise Applications
02:59 PM
Fred Langa
Fred Langa

The Explorer: Real-World Answers About Virtual Memory

The previous System Setup Secrets column generated a boatload of responses and sparked some great questions-and-answers. But some of the follow-on topics were extremely complex and practically begged for a more in-depth discussion on their own: Windows' Virtual Memory was at the top of the list. That's what this column is about.

In that previous column, I said that you can go to "... My Computer, Properties, Performance, Virtual Memory, set virtual memory the way you want. In systems with abundant disk space, I place the swap file out of the way on the second partition, and set a minimum size equal to the amount of RAM, with no maximum size set."

Here's why: Virtual memory is a "swap file" on your hard drive that acts as an extension of your RAM. When Windows runs short of RAM, it uses the virtual memory space to free up RAM by temporarily moving -- swapping -- chunks of data temporarily to your hard drive until they're needed again.

On its own, Windows creates what's called a dynamic swap file: the file grows and shrinks as needed. (In fact, if your hard drive has ever suddenly come to life with a long burst of activity that has no apparent cause, it's probably Windows automatically adjusting the size of your swap file.)

Trouble is, growing and shrinking the swap file takes time and CPU cycles, and prevents your hard drive from doing anything else until the resizing is complete. And as a swap file grows, piecemeal, it can end up scattered in several locations across your hard drive. Combined, the extra housekeeping needed to monitor and manage the size of the file and the time lost in dealing with swap file fragments can make Windows seem sluggish.

Take Control Of Your Virtual Memory
One way to help overcome this is to manually set a generous minimum swap file size. This ensures you have plenty of virtual memory to start with, and that Windows won't have to waste time growing and shrinking the swap file with every app you run. Plus, if your swap file doesn't have to grow or shrink, it can be defragged once and then will tend to stay that way. With a large-enough, unfragmented (contiguous) swap file, Windows can spend its time using the swap file instead of managing it: Your system may operate noticeably faster -- especially if you use a defragger like Norton's Speed Disk that places the swap file at the front of your hard drive, for fastest access.

In systems with more than one physical hard drive, you also can manually assign the swap file to whichever drive is the fastest, further boosting performance (the swap file doesn't have to be on the drive that contains Windows). And on systems with more than one drive or partition, you also can move the swap file to a location where it won't be included in your routine backups; this can make your system backups go faster, and save space in your backup media. (The swap file doesn't need to be backed up, ever.)

That's all fine, but several readers wrote to say they either couldn't change their virtual memory settings (the option was grayed-out) or that the settings would not "stick" and would revert to the default settings on reboot.

1 of 2
Comment  | 
Print  | 
More Insights
Threaded  |  Newest First  |  Oldest First
How Enterprises Are Attacking the IT Security Enterprise
How Enterprises Are Attacking the IT Security Enterprise
To learn more about what organizations are doing to tackle attacks and threats we surveyed a group of 300 IT and infosec professionals to find out what their biggest IT security challenges are and what they're doing to defend against today's threats. Download the report to see what they're saying.
Register for InformationWeek Newsletters
White Papers
Current Issue
2017 State of the Cloud Report
As the use of public cloud becomes a given, IT leaders must navigate the transition and advocate for management tools or architectures that allow them to realize the benefits they seek. Download this report to explore the issues and how to best leverage the cloud moving forward.
Twitter Feed
InformationWeek Radio
Archived InformationWeek Radio
Join us for a roundup of the top stories on for the week of November 6, 2016. We'll be talking with the editors and correspondents who brought you the top stories of the week to get the "story behind the story."
Sponsored Live Streaming Video
Everything You've Been Told About Mobility Is Wrong
Attend this video symposium with Sean Wisdom, Global Director of Mobility Solutions, and learn about how you can harness powerful new products to mobilize your business potential.
Flash Poll