Posted: 1/2/2005 9:58:38 AM EDT
|
I got an error message on my toolbar stating that my virtual memory was low. It stayed for a few seconds, said that it was expanding to get more, then went away. What is it? How did it get low? Where did it get more? This happened yesterday around lunchtime. Have'nt seen it since. Thanks. |
|
Windows uses part of your hard drive as a swap file to swap things into and out of your RAM--this is virtual memory. It adjusts the size of this file itself, or you can specify a size. If you only get the error once, don't sweat it. If you start getting it more often, you probably need more RAM. I started getting the same thing when I would browse the internet for awhile without shutting down. I noticed it after I installed SP2--don't know if the built in OS "monitoring service" that came with it is a memory hog or what. Anyway, I was in need of RAM anyway (I only had 256MB and 32MB was in onboard video). So I added another 512MB and haven't had any more trouble. If things seem to be slowing down and you see that a lot, get more RAM. Easy as that. |
IF you have XP, it seems like it was set to scale as needed.. no worries. If it happens often, and you hate waiting.. put more real memory in your machine. |
|
If you would like to know more and possibly even get dirty and tweak the way Windows manages memory on your computer I have to recommend Black Viper's excellent XP guide pages. www.blackviper.com/WinXP/supertweaks.htm Can you get rid of the page file? Yes and no. If you have a boat load of memory (greater than 512 MB, but I recommend 2 GB) you may be able to function just fine. Some games REQUIRE a certain amount of swap space to be created to even run, no matter how much RAM is available. Also, under certain conditions, my sound card goes crazy (or does not function) in some games with no swap file (oddly enough, Age of Empires 2). If you decide to test your luck with no swap space or page file, you are on your own. :) Please do not E-Mail me with your war stories about no swap. Every system is different. I usually do not have one "unless something requires it that I am running that day." Where do you find it? With the default Category Control Panel: 1. Head to Start 2. Select Control Panel 3. Select Performance and Maintenance 4. Select System 5. Select Advanced Tab 6. Under Performance, select the Settings button 7. Select Advanced Tab 8. Under Virtual Memory, select the Change button 9. Adjust as needed, or select "No paging File," then select the Set button 10. Select the Ok button to apply the settings 11. You must reboot for the changes to take effect With the Classic Control Panel: 1. Head to Start 2. Select Control Panel 3. Select System 4. Select Advanced Tab 5. Under Performance, select the Settings button 6. Select Advanced Tab 7. Under Virtual Memory, select the Change button 8. Adjust as needed, or select "No paging File," then select the Set button 9. Select the Ok button to apply the settings 10. You must reboot for the changes to take effect Screen shots of the process are also available. If anything, create (preferably on a separate partition), a swap space of constant size. For example, select Custom Size and place 1000 in "Initial" and 1000 in "Maximum" Size boxes, then click Set Button. This will reduce the amount of work needed to dynamically resize the page file, usually when you need it most. Some deffinitions need to be explained: Physical RAM ~ The amount of Memory installed on a system. Physical RAM is "way" faster than a "swap file" or "swap space." Swap File ~ The file that is located on your hard drive that "acts" like Physical RAM but is way slower. Virtual Memory ~ The name used for the sum of Physical RAM and the Swap File. In other words: Physical RAM + Swap File = Virtual Memory. You cannot "disable" Virtual Memory even if you disable the Swap File. Meaning, 2 GB RAM + 0 MB Swap File = 2 GB Virtual Memory. From Fastest to Slowest, these are the configuration you can try: * No swap file at all. Some software may fail. You also need "much" memory to do this. Greater than 512 MB, but I recommend 2 GB. * A static swap file on a separate hard drive (and preferably, controller) from Windows and frequently accessed data. * A dynamic swap file on a separate hard drive (and preferably, controller) from Windows and frequently accessed data. * A static swap file on a separate partition, but on the same physical hard drive as Windows. * A dynamic swap file on a separate partition, but on the same physical hard drive as Windows. * The Default: A dynamic swap file on the same partition and physical hard drive (usually C:) as Windows. Many factors affect performance of the I/O and Hard Drive system. Namely, "where" on the drive the particular swap partition is located, as well as fragmentation of the swap file itself. |
Could be due to use of the swap file APIs to use the swap file--doing I/O using the swap file API under MFC/Direct X is substantially faster than conventional I/O, but I don't know if that would be affected by the Windows Setting. |