VMware Communities
ajbrehm
Enthusiast
Enthusiast

Memory configuration on 8 GB machine

I am wondering, what's the best memory configuration for two Windows VMs on a Mac Pro with 8 GB of memory?

The two VMs are Windows Vista 64 bit and Windows XP 32 bit. The Windows XP machine won't run as often as the Windows Vista machine.

How much memory should I assign to each VM, considering that Vista will run almost all the time and XP not so often and how should I configure the swap files? Should I assign more memory and let Mac OS X do the swapping or should I assign very little memory and hope that the Window swap files will be held in OS X' disk cache?

The two VMs with the two extreme configurations:

Vista 64: 6 GB and no swap file <-> 2 GB and swap file

XP 32: 4 GB and no swap file <-> 512 MB and swap file

Which of the two extremes should I chose or which compromises between the extremes should I use?

0 Kudos
4 Replies
cdc1
Expert
Expert

Well, assigning 4GB of memory to a 32bit guest will waste some RAM as it can't really use anything past somehwere around 3.75GB. For that one, I would think that 2GB would be more than enough. If it were me, though, I wouldn't give it anymore than 1GB, but it really depends also on what applications you intend to run inside that guest, as that can have an afect on the total RAM needed as well.

For the 64bit, I wouldn't give it anything more than 4GB. That way, if you ever need to have both of those VMs running at the same time for whatever reason (2GB for XP 32bit + 4GB for 64bit VIsta = 6GB RAM used), you're not stealing too much memory from your host, and for MAC OS, I wouldn't leave it with anything less than 2GB.

In either case, for swap, I would just let Windows manage the pagefile, unless I were feeling a bit adventurous and wanted to tweak them myself to see if I couldn't get a boost in performance somehow.

Also, pre-allocate the disks for your guests. It won't be fun sitting there waiting for the pre-allocaiton to complete, but I believe the performance benefits far outweigh the initial setup delay. To go even a bit further on this, if you can, I would even place the VMs on separate physical disks if I could. That way, it would decrease any possible performance hit due to disk I/O constraints happening if they were both stored on the same physical drive.

ajbrehm
Enthusiast
Enthusiast

Well, assigning 4GB of memory to a 32bit guest will waste some RAM as it can't really use anything past somehwere around 3.75GB. For that one, I would think that 2GB would be more than enough. If it were me, though, I wouldn't give it anymore than 1GB, but it really depends also on what applications you intend to run inside that guest, as that can have an afect on the total RAM needed as well.

Yes, that makes sense. Actually, I think 1 GB would be enough for 32 bit XP. One problel with lots of memory is that it takes a long time to restore a VM from hybernation. This won't be an issue vor the 64 bit Vista VM as I can simply leave it running most of the time. The XP machine is really just running games, and most games really don't need more than 1 GB of RAM, even today.

All VMs will also be located on the second hard drive (which will also be exempt from Time Machine).

+For the 64bit, I wouldn't give it anything more than 4GB. That way, if you ever need to have both of those VMs running at the same time for whatever reason (2GB for XP 32bit + 4GB for 64bit VIsta = 6GB RAM used), you're not stealing too much memory from your host, and for MAC OS, I wouldn't leave it with anything less than 2GB.+

Good point. Note that I will also have three our four minor VMs that I will run even less often than the 32 bit XP VM: one SuSE Linux box, probably just the one with Mono pre-installed from the Novell Web site, and one or two plain DOS VMs (PTS-DOS). The Linux VM is for testing REALbasic and .NET applications, the DOS VM for ancient DOS programs I might run into. (Any idea how to copy files to a DOS VM? Can I open the disk images from Mac OS if they are FAT or FAT32?)

In either case, for swap, I would just let Windows manage the pagefile, unless I were feeling a bit adventurous and wanted to tweak them myself to see if I couldn't get a boost in performance somehow.

I hope I catch that during setup. Anyway, the two Windows VMs already exist. They will move from my current iMac (2.16 GHz Core 2 Duo, 3 GB).

Memory configuration plans now:

64 bit Vista: 4 GB

32 bit XP: 1 GB

Linux: 1 GB or 2 GB

PTS-DOS: 16 MB or 24 MB or why not 32 MB for the heck of it

FreeBSD: 1 GB or 2 GB (also for .NET/Mono testing)

Thanks for the tips!

0 Kudos
gbullman
Expert
Expert

The answer to your question really depends on what you do with the VMs, your typical working set. You have the tools at your disposal to figure out how much memory you should be giving each. In my opinion no Operating System performs very well if you force it in a situation where it has to swap so you should divide up the 8 Gig to keep all 3 happy (and that should not be an issue).

Apple recommends 2 Gig as the preferred minimum for Leopard and I believe it will effectively use more than that if available so don't starve your Mac.

Unless you are doing some really memory intensive activities in Windows XP 1 Gig should be plenty, you can probably get bye with less. I run 2 32-bit XP VMs with 640 MB each with fairly heavy use of MS Office applictions + web browsers with multiple sessions and even occasionally modest sized SQL Server and Oracle databases and have not run out of memory yet (ie Commit Charge Stays below Total Physical Memory in Task Manager).

I'm not as familiar with Vista Memory needs, but I would start with 2 Gig and see how it goes monitoring the system with Task Manager for a while. You should be able to determine if you need to adjust up or down from there by monitoring the difference between Commit Charge and Total Physical Memory.

I had read many years ago that it was better from a performance perspective to set a custom Virtual Memory sized (essentially the pagefile.sys file) when first setting a computer up, or after defragmenting the disk so it would have as few fragments as possible. The rule of thumb with NT, and I believe it is still true with XP was set the minimum 12 meg above the amount of physical memory in the machine. I typically set the maximum to twice the physical memory but that is probably somewhat arbitrary since it would hopefully never grow that big. As far as I know it is not recommended to run any Windows without a swap file, I only do it when I'm defragmenting a relatively full drive.

I have used those recommendations with my VMs and I'm quite happy wth the performance overall.

Similar to the use of Task Manager in Windows to see your actual memory use you can use Activity Monitor in Mac OS to see your Memory utiization. With the System Memory tab selected at the bottom of the window figure your available memory is approximately the total of the Free + Inactive memory. Mac OS is a different beast when it comes to Virtual Memory and Swap so I would not pay too much attention to the number shown there,

You want to try to achieve a balance where Mac OS has a decent amount of Free + Inactive (I'm typically close to 1 Gig on my 4 Gig machine so you should easily be able to keep that 1 Gig or somewhat above). In your Windows XP VM hopefully the Commit Charge stays a couple hundred Meg below the Total Physical memory. In your Vista VM I'm guessing you should aim for a couple hundred meg to maybe 500 Meg or so less Commit Charge than Total Physical Memory.

Try some of these suggestions to see how they work for you. I have a very good performance with my Mac, and 2 VMs not matter what work load I throw at them.

ajbrehm
Enthusiast
Enthusiast

This is how I ended up configuring things:

I have three VMs so far, mostly migrated from my iMac (Core 2 Duo, 3 GB) and I modified the memory settings. Smiley Happy

a) Vista 64: 4 GB, two logical CPUs

b) XP 32: 2 GB, one logical CPU

c) SuSE Linux 64: 1 GB, one logical CPU

0 Kudos