![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Using swap file or not for VM Before I have always setup the o/s in the guest environment with it's own swap file, but is it really necessary? Would it perhaps be better to setup the guest VM to use no swap and with a sufficient mempory setting like 2 GB (or maybe even 4 GB) and instead let the host manage the virtual memory. Otherwise you will have virtual memory management in both host and guest. Or does Virtual PC somehow grab physical memory without going through the host o/s (don't think that is possible though). I am currently running a VPC session with XP with no swap file with the VM setup to use 1 gb RAM. Witin the VM 300 MB is allocated however the Virtual PC session in the host is only using 50 MB ram or so. I am using Vista as Host o/s on a laptop with 4 GB memory and using XP in my VMs. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Using swap file or not for VM Magnusb wrote: Quote: > Before I have always setup the o/s in the guest environment with it's > own swap file, but is it really necessary? have enough RAM. -- Robert Riebisch |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Using swap file or not for VM In article <48f4535a$0$6586$9b4e6d93@xxxxxx-online.net>, Robert.Riebisch@xxxxxx says... Quote: > Yes, because some apps still rely on a swap file present, even if you > have enough RAM. of swap file, just the memory virtual or not. Can you give any example so I can see if it is something I use? |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Using swap file or not for VM On Oct 14, 4:50*am, Magnusb <magn...@xxxxxx> wrote: Quote: > In article <48f4535a$0$6586$9b4e6...@xxxxxx-online.net>, > Robert.Riebi...@xxxxxx says... > Quote: > > Yes, because some apps still rely on a swap file present, even if you > > have enough RAM. > Really? I didn't think that applications cared at all about the presence > of swap file, just the memory virtual or not. * > > Can you give any example so I can see if it is something I use? host. Leave it alone |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Using swap file or not for VM In message <MPG.235e665ebbcb35c3989682@xxxxxx> Magnusb <magnusb@xxxxxx> was claimed to have wrote: Quote: >Before I have always setup the o/s in the guest environment with it's >own swap file, but is it really necessary? > >Would it perhaps be better to setup the guest VM to use no swap and with >a sufficient mempory setting like 2 GB (or maybe even 4 GB) and instead >let the host manage the virtual memory. > >Otherwise you will have virtual memory management in both host and >guest. > >Or does Virtual PC somehow grab physical memory without going through >the host o/s (don't think that is possible though). > >I am currently running a VPC session with XP with no swap file with the >VM setup to use 1 gb RAM. Witin the VM 300 MB is allocated however the >Virtual PC session in the host is only using 50 MB ram or so. > >I am using Vista as Host o/s on a laptop with 4 GB memory and using XP >in my VMs. and I would only allocate the amount of memory needed, I wouldn't recommend over-allocating RAM to a guest under the assumption that the host can move those pages to disk. Windows will attempt to use all of the memory it has available. Free memory is wasted memory. Vista does a better job at this then XP, but in either OS, if the OS knows you have a ton of available memory, Windows will leave more pages in memory devoted to nothing more then disk caching. When a memory shortage does occur in a guest, the guest OS will intelligently dump it's disk cache first, then other pages starting from the least recently accessed. The guest OS also knows which pages are dirty (need to be written to disk) and which can be dumped (already written to disk, were read from disk originally and never modified in memory, etc) painlessly. If the host happens to have a bunch of available memory, it's disk cache will actually catch the guest's pagefile and when the guest goes to bring pages back into memory, it will move from the host's disk cache to the guest's memory far faster then hitting the underlying disk. In other words, a memory shortage in a guest isn't the end of the world. Conversely, the host OS has no idea what is going on within the guest OS, and from the host's point of view, all pages assigned to a VM are dirty and must be written to disk before being dumped. So imagine what happens when the host OS becomes starved for memory and starts paging out a VM, it may actually start writing to disk a copy of a VM's disk cache. Later, when there is activity in the VM, the VM may decide to dump that disk cache and cache a different file, which results in the host reading the pages back from disk into memory, then the guest dumps those pages, reads data from disk into memory, leaving the host OS to start all over again. Now note that I spend most of my time in VMWare, which definitely does allow some VM memory to be paged out. I'm actually not sure if this is even possible in Virtual PC, I have a vague recollection that VPC memory cannot be paged out at all, which eliminates the above described case where a disk cache gets written back to disk. However, VPC's disk access definitely is cached in memory, so having an excess of host memory will definitely include improve a guest's performance. Hopefully I am writing coherently, but if not, it's been a long day and I do apologize. |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Using swap file or not for VM In article <7ae0c67e-62a2-4d3e-9ae0-68e88c293450 @y21g2000hsf.googlegroups.com>, ronald.phillips@xxxxxx says... Quote: > The paging file is needed on the guest just like it's needed on the > host. Leave it alone However, it is still interesting to know which would be most efficient, handling virtual memory in host or both guest/host. I don't see why swap file is needed. Enough memory is needed and if you don't have enough physical memory and no swap file bad things will happen though. But if memory is set high enough for the VM then it would be like a physical machine without a swap file, but with the hist machine providing memory which can be virtual. That is if VPC doesn't do something special with memory by it self. Might still be better to have a swap fil for the VM though. If you are getting low on physcial memory then your entire machine will be less responsive instead of just the VM. |
My System Specs![]() |
| | #7 (permalink) |
| | Re: Using swap file or not for VM In article <gfs8f4dk1shrmgjt5btt41vpfl6att75vr@xxxxxx>, spam_narf_spam@xxxxxx says... Quote: > Hopefully I am writing coherently, but if not, it's been a long day and > I do apologize. right. It is most certainly better to have paging activated for the guest. Not that I actually intended to run without a paging file. But started thinking of it while I was setting up a serie of differencing disks and had swap file turned off to cut down size on parent vhd file. Might still be an option though if you only work within VPC and only using the host as a shell to start VPC. |
My System Specs![]() |
| | #8 (permalink) |
| | Re: Using swap file or not for VM >I don't see why swap file is needed. Enough memory is needed and if you Quote: >don't have enough physical memory and no swap file bad things will >happen though. that, then no page file will be the most efficient, but you run the risk of crashing the VM being doing something even slightly different. Quote: >That is if VPC doesn't do something special with memory by it self. Quote: >Might still be better to have a swap fil for the VM though. If you are >getting low on physcial memory then your entire machine will be less >responsive instead of just the VM. operate efficiently, then I worry about the VM's. I usually allocate less RAM in a VM than I would if I put that OS on a real machine... -- Bob Comer On Tue, 14 Oct 2008 13:03:43 +0200, Magnusb <magnusb@xxxxxx> wrote: Quote: >In article <7ae0c67e-62a2-4d3e-9ae0-68e88c293450 >@y21g2000hsf.googlegroups.com>, ronald.phillips@xxxxxx says... Quote: >> The paging file is needed on the guest just like it's needed on the >> host. Leave it alone >You are maybe right about best thing is to leave it alone. > >However, it is still interesting to know which would be most efficient, >handling virtual memory in host or both guest/host. > >I don't see why swap file is needed. Enough memory is needed and if you >don't have enough physical memory and no swap file bad things will >happen though. > >But if memory is set high enough for the VM then it would be like a >physical machine without a swap file, but with the hist machine >providing memory which can be virtual. > >That is if VPC doesn't do something special with memory by it self. > >Might still be better to have a swap fil for the VM though. If you are >getting low on physcial memory then your entire machine will be less >responsive instead of just the VM. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| swap file priority | Vista performance & maintenance | |||
| Separate partition for swap file | Vista installation & setup | |||
| Bitlocker swap file | Vista security | |||
| Vista Swap File? | Vista General | |||
| swap file | Vista General | |||