Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Virtual memory, does 2kpro need it if we have enough ram? 1

Status
Not open for further replies.
Mar 15, 2001
177
US
I have 512 ram in my Win2k Pro workstation. I should not have a need to swap out anything to the hard drive. Why should I have any virtual memory at all? If I do need one, then why can't I make a ram drive of 372mb and use 128 for ram? Or use 256 and 256? I have always thought about this, I tried to do it in 98, but it would only let me make a 16mb ram drive.
 
Windows will always need some sort of swap file. No matter how much RAM you have. Windows (any flavor) thinks it has access to about 4gb of RAM(I think that is the right amount). ANd since almost NO desk top machine has that much RAM windows will always swap out files to virtual memory. RAM drives ar ok but RAM is faster than Hard drives. Creating a RAM drive for RAM is too slow. James Collins
Computer Hardware Engineer
A+, MCP

email: butchrecon@skyenet.net
 
But, if 2Kpro really needs it, how come it will let you change it to 0 without any warnings.
 
It will alow you to change its setting to 0. BUT.....
when you resatart your system it will be VERY slow (even on 768 meg of RAM) also you will get a message after you log on telling you your Virtual Memory setting is too low. The warnings come after you reboot. James Collins
Computer Hardware Engineer
A+, MCP

email: butchrecon@skyenet.net
 
Good call James, I rebooted and it told me it had a problem with the paging file. When going to change settings, it told me it make a 20mb swapfile itself.
Next question.
If it stays at 20mb would it force the OS to use more physical ram? I use about 80mb right after boot and hardly over 140-150mb when doing browsing the web and regular activites on the system.
 
Yes it would force the system to use more RAM. That's a problem. Windows only likes to keep what it needs in RAM and then Swap anything else to virtual memory (VM) (which is slower). If it is in VM for an extended period ( I am not sure of the length of time) it will then place those files back to the hard drive storage. Thats why windows needs a swap file. So it can keep what it REALLY does not need at that moment in the swap. (that is a basic explanation of how it work) James Collins
Computer Hardware Engineer
A+, MCP

email: butchrecon@skyenet.net
 
I guess the idea I have in my brain, is that if windows needs to access data, if it is in ram then it can access it quicker. If there is enough ram, then why don't it just keep it there. I don't care if it doesn't think it needs it in ram or if it hasn't been used in a while. If it needs it, then it can call it back from ram instead of the slower hard drive.
 
Unfortunatly Windows will always require a swap file no matter how much RAM you have. The more RAM you have the use of swip file Windows have. But it (as I stated) will always use a swap file.

James Collins
Computer Hardware Engineer
A+, MCP

email: butchrecon@skyenet.net
 
Well, dangit, maybe I will just have to switch to an OS that will suit my needs.. maybe I will use something like linus, oops, i meant linux.
X-)
 
There you go. :) James Collins
Computer Hardware Engineer
A+, MCP

email: butchrecon@skyenet.net
 
Linux uses the technique of swapping too :)

...unashamed plug for my FAQ on Virtual Memory in the PC Hardware forum...
 
Without trying to sound like a smart-arse, the first line of your FAQ on VM says..

"Virtual Memory is traditionally an area of hard disk space that is reserved for use when physical RAM has been filled up."

If I have enough ram , then why does it need the swap file??
A+ MCP
deans@bellsouth.net
 
Does not matter. Windows will alwasy need a swap file. From what I understand of VM windows will place in VM files that may be needed but not required at that particular instant. Also the more programs you open the more RAM they will take. Eventually the swap file will be needed. James Collins
Computer Hardware Engineer
A+, MCP

email: butchrecon@skyenet.net
 
Note the use of the word "traditionally". For the sake of backward compatibility - and the fact that at some point you WILL run out of physical RAM due to the way Windows "manages" it - this is still pretty much the case!

For example, if you had a brand new PC with 256MB RAM, and ran Windows 2000, you would see around 132Mb taken by the Operating system before you started any actual work/game playing.

If you opened Internet Explorer, Word and a couple of other packages, these all create a shed load of temporary stuff that's saved in various caches all over the disk. Much is sent automagically to the VMM, which stashes it in Virtual Memory, since it knows it might not need it for a while.

This is another strand of Virtual Memory - stuff is put there for later use. The same applies to most caches. The Least-Recently Used algorithm looks around to see what hasn't been used recently, and sticks it somewhere out of the way. Recently can be around 50 m/s, depending on the cache in question.

This is so that you still have a large contiguous chunk of real memory to load that 40Mb Wav file - or 100Mb Video file into.

You can never have "Enough" physical RAM.

:)
 
Excellent Explanation CitrixEngineer. Hope that can clear things up for others. James Collins
Computer Hardware Engineer
A+, MCP

email: butchrecon@skyenet.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top