Leo, in the Windows XP Task Manager Processes tab, what does the column
“virtual memory size” represent? Is it the amount of virtual memory space the
software has reserved for itself on the hard disk (even though the software may
not actually be using all of that space yet)? I wonder why my anti-malware
software suddenly shows relatively low memory usage, but a virtual memory size
that is nearly ten times larger. Is that considered unusual behavior by
software? When this happens the PC is sluggish.
In this excerpt from
Answercast #15, I look at the complex nature of Window’s memory management
and suggest some ways to work with a sluggish computer.
Become a Patron of Ask Leo! and go ad-free!
Virtual Memory Size
I’ve stated, numerous times, that Windows memory management is phenomenal.
It really is! It is absolutely amazing the kinds of things that they are able
to eek out of your computer in terms of performance.
It’s a very finely tuned, highly effective, and highly efficient memory
management system.
Unfortunately, it is incredibly complex. I have referred to it as being the
stuff of nightmares for the people who understand it. It is that complex!
The reason I say that, the reason I preface my answer with that kind of big
caveat… is that there’s really no easy answer when people say, “What does
virtual memory represent?” or “What does it mean?”
What is virtual memory?
Your first supposition is pretty close. It’s kind-of, sort-of the amount of
‘virtual memory space’ a running program has reserved for itself on the hard
disk.
It may or may not actually be using the hard disk:
- Some of it may be in memory
- Some of it may be in the hard disk
- Some of it may be in transition
It’s really, really difficult to get very specific based on what’s presented
here.
Sometimes, a program will go up and down in terms of memory usage.
Low memory usage, but high virtual memory size usually is not an issue.
It’s very common for programs to kind-of, sort-of be all over the map on memory
usage.
Memory problems
Scenarios that I worry about the most are when either:
- The virtual memory being used is continually increasing for a long period
of time or - When it increases quickly for a short period of time… and only
increases
That typically indicates what’s called a ‘memory leak’ in the program. The
program is asking for more memory and then forgetting to tell Windows when it’s
done with the memory. It keeps asking for more and more and more and more over
time and eventually, of course, the system runs out.
The real RAM will run out: If they keep on asking… then the virtual memory runs
out.
So, the short answer is there is nothing here that really says that, “Yes,
this is problem,” or “No, this isn’t.”
Sluggish PC
“When this happens the PC is sluggish”
That would have me telling you to start firing up tools like Process
Explorer to see what’s going on.
- Is the hard disk thrashing when that happens?
- Is virtual memory really being hogged by this particular program?
- Is the CPU usage very high?
Depending on the anti-malware tool that you’re running, it could simply be
performing a scan and that could be interfering with whatever you’re doing.
It’s very difficult to say without knowing more details about this.
The high level answer is that these kinds of things are normal. These
kinds of things are not unexpected and trying to characterize how much memory
is actually in use by any given program is a very confusing and very difficult
question to even begin to answer.