Virtual memory

Why does this Windows XP now inform me of this (low on virtual memory) after I have used it for hours, and then locks up so I can’t do anything but shut it down manually?

Help!

Thanks in advance.

I hate to provide a mostly useless answer, but that’s pretty much what happens with Windows. I have never, ever had this problem is any flavor of Linux, BSD, or OSX, or the various System V based Unix systems I’ve used. FWIW, I haven’t had that specific problem with Windows 7, although I’ve had a number of other issues (probably more related to the craptastic HP hardware it is running on than the operating system itself).

You may have some application hogging up memory and causing a dramatic ramping of virtual mem. What are you running when this happens?

Stranger

Do you have any significant space on the C drive? A few gigs should be sufficient, but if there’s lots less, then windows is trying to store some of what’s going on in the background on the disk drive and there’s not enough space. That’s just one thought off the top of my head.

First off, a definition: Virtual memory (VM) is a way to enable you to run more applications than you have physical RAM to accommodate, based on the very often valid assumptions that most data in RAM is going to be ignored most of the time, and that it’s possible to predict which parts of RAM a given program will want to use next.

VM works by moving blocks of data from RAM to a special place on disk called ‘swap’ or ‘swap space’ and back, based on access patterns*. This works as long as you have a lot of swap and it’s helped by the OS knowing how to manage it in a close-to-optimal fashion. It’s possible for swap to be used up if an application keeps requesting RAM and never giving it back: This is commonly a symptom of a memory leak, where the program loses track of RAM due to shoddy programming, but it’s possible the application really and truly does need that much RAM and your machine can’t accommodate it.

You can likely alleviate this problem by closing applications you aren’t using, or by finding different applications to use, but you might really need to buy more physical RAM chips to do what you want your computer to do.

*(This is kind of an involved topic. Generally, a ‘least recently used’ algorithm is used, such that the data in the block of RAM which was used least recently is the one that gets shuffled to disk when a block of RAM needs to be filled with different data.)

I googled it and it is caused by vsmon.exe which is zone alarm and someone said they recently updated it.

I checked the processes and it uses more memory than firefox. What would happen if I clicked end process? No more protection?

Right. If you stop a process, it stops doing whatever it was doing. That’s the very essence of the nub of the definition of ‘stop’, after all.

That said, I ran Zone Alarm for years and it never caused me any problems. I’m not all that convinced it did me any good, though, now that I know what I know about computer networking. This article has a pretty good rundown.

It’s possible that you have some kind of malware on your system, either eating up memory, or keeping connections open and inflating Zone Alarm.

It’s also possible that you don’t have enough free disk space, or that your virtual memory isn’t configured properly. Make sure you have at least 10% of your hard disk free, and that you have at least three times as much free disk space as you have computer memory. You may also need to defrag – I don’t remember whether swap space is immune to disk fragmentation, but unless your disk is at least 33% free, it’s probably a good idea to defrag anyway.

If you have plenty of free disk space, the next thing to check is the virtual memory settings. You didn’t identify which version of Windows, but in general, right click on My Computer and look for it. On my Win7 computer, it’s My Computer -> Properties -> Advanced System Settings-> Advanced -> Performance -> Advanced.

Hit Change and make sure it’s set to Automatic, unless you have a good reason for doing otherwise.

It’s probably time to add more ram. Spend $20 and give it another stick of a few GB if you can. Should be the easiest solution unless you have some sort of serious malware issue that’s deliberately eating up all your memory.

Tangent here, but relevant (meaning it might not be best to uninstall ZoneAlarm altogether unless you replace it with something else or know what you’re doing):

I’m not a network security expert, but I do study it for fun. I think that article is hyperbolic at best, or missed the point at worst. Software firewalls aren’t necessarily worthless. His main point, that “it provides no real additional security over turning off the services that you don’t use” is just not true because the whole point of them is to alert you of a new program that’s trying to connect to the internet without your knowledge. You can’t turn off a service that you didn’t know was phoning home to begin with. The point of a stateful software firewall like ZoneAlarm isn’t to duplicate your hardware firewall, but to let you know about programs instead of ports. Hardware firewalls cannot do that without deep packet inspection, and very few consumer routers offer that.

The other article he linked to (now dead, but archived) is slightly more on-point, and the basic points there are that 1) users don’t necessarily know enough to tell a legitimate warning from a false positive and 2) it’ll forever be an arms race between firewall manufacturers and malware authors. Both are true, but recent products have gotten both less intrusive and more intelligent, often resorting to crowd-sourced intelligence to determine whether certain behavior is likely suspicious. It’s not perfect because security is forever an arms race, but it’s hard to agree with the basic premise that security software is entirely worthless. It’s one component in safer computing – not to be relied on exclusively, but one part of the arsenal against malware. Sometimes people just need to use a new program from a source that may or may not be reliable, and you can’t expect users to read the source code or check hashes. Anti-malware and personal firewalls (often one and the same nowadays) is the next best thing after Googling for warnings.

Your swap is too small.

Does this problem happen all the time, or just this once? Or once in a while?
Looking at memory usage just once may not tell you much - something could be running and using a lot of memory at that moment.

There are lots of possible reasons. It could be malware. It could be a version of a program with a memory leak (which happens on Linux also) or it could be a weird bug which keeps allocating memory for no good reason.

Assuming you have enough disk space left and have a reasonable amount of memory, I doubt buying more is going to help. If your computer is really old you might have gotten a new version of a program which assumes a lot more memory is there than you have. I’ve seen that happen.
Tell us more about the problem.

Either
(a) your pagefile.sys is too small - expand it if you have space on the C: drive (which is where it usually is) -or-
(b) you swap file pagefile.sys is managed by the system, and what’s happening is your computer freezes up for a while so it can expand pagefile.sys.
© you have too many programs open at once, or doing something with some program that uses too much memory (edit big file, run big video or PDF, etc…)

Right click on (My) Computer. select properties.
You should see the amount of Memory (RAM) you have listed.
If you have WIndows 7, Select “advanced system settings”
On the ADVANCED tab, click “Performance”

In Performance Options, select the ADVANCED tab
Virtual memory, will tell you how big the pagefile is.
Click CHANGE

Set your page file size to 1.5x your amount of memory.
If it’s already this big, set it to 2x. (provided you hae the space on your disk)

If your out of memory error was saying “please wait” and the pagefile is set to “automatically manage”, you may want to unchek and set the size manually to a custom size.
If you have the disk space, set size as mentioned, custom size, min and max the same.

OK your way out and you will need to reboot.

If your XP machine does not have 1GB, or yor win7 does not have 2GB, consider buying extra RAM instead.

I’m not sure this is a cause of VM-loss, but note that Microsoft Outlook is somewhat infamous for leaving multiple processes of itself on your system. That is, when you exit Outlook it doesn’t fully go away but leaves an Outlook.exe process running.

Use Task Manager to look at the processes and you can see multiple copies of Outlook.exe. Maybe a lot if you haven’t rebooted in a while.

If Outlook isn’t ‘open’ on your desktop you can safely delete those extra copies using Task Manager. But as you continue to open/close Outlook new copies will appear.

That’s probably tying up some system resources.