We recently were running 5-6 VM's off a Quad-Core Xserve with 48gigs of ram that was hooked up to a 6th G-tech eSata external (which housed all the VM's).
All the VM's were running Windows 7 Professional, with one as the "server host". The server host had one processor and 4 gigs of ram allocated to it. All other VM's had 1 processor with 2 gigs of ram. We were simply running a workgroup. On that "server" was a SQL database, a quickbooks database, and an Oracle based database.
Over time the X-serve just seemed to not handle things anymore (and we needed more vm's for more employees), so we were able to use our video editor's 12-core Mac Pro with 56gigs of Ram for our new "VM server". We recently got him the new Mac Pro.
Now on the 12-core (running OSX 10.8.5 serveR) we are running 9 (newly rebuilt) VMs (all Windows 7 Pro 32bit), except we rebuilt the Windows "server host" to be 64bit and have allocated 4 processors and 6gigs of ram to it. We put the server host on a SSD Hybrid 4th drive in Bay 2, then evenly split the other 8 VM's on the same types of drives in Bays 3 & 4.
We've noticed that the free ram of the 12-core is slowly going away, and I'm curious if turning BUFFERING off would help to basically prolong how long the Mac Pro can stay on before being rebooted to refresh all the resources...
The X-serve was able to stay on for weeks at a time, but as we put more VM's on it, we ended up having to reboot it every evening, in the end.
Now with the Mac Pro, I want to make sure I have this setup properly to keep it running as long as possible and be the most stable. I know the machine can handle all these VM's. I just don't know if I have it configured as "optimally" as possible.
Any advice would be welcomed.
You could try using the purge command instead of rebooting. You could even set purge to run at scheduled times, using launchd, as you feel necessary.
What's the best practice for using the purge script with vmware fusion?
Should it run at night? on weekends?
And will this work using it with fusion?
Okay, here a sample script called purgeim that's run every 2 hours. IMTL (Inactive Memory Threshold Limit) is the value in MB that if exceeded the system.log gets an entry and the purge command is run. I chose 16384 MB (16 GB) because that around half the amount of free memory you'd have with all VM running however obviously you can adjust the amount. Also adjust the name and location of the script and the com.wkz to what's appropriate.
#!/bin/bash
IMTL="16384"
IM=`vm_stat | awk '/inactive/ {print int($3*4/1024)}'`
if [ "$IM" -gt "$IMTL" ]; then
logger -t 'PurgeIM' 'Inactive Memory Threshold Exceeded.'
purge
fi
Here is the com.wkz.purgeim.plist file that's in /Library/LaunchDaemons/ with owner:group set to root:wheel and 644 permissions.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.wkz.purgeim</string>
<key>ProgramArguments</key>
<array>
<string>/scripts/purgeim</string>
</array>
<key>StartInterval</key>
<integer>7200</integer>
<key>KeepAlive</key>
<false/>
</dict>
</plist>
I have been just testing running purge commands using ARD that's on another server.
It appears that won't work, b/c once the free RAM of this Mac Pro gets into the 100's of megs or less, the computer shows as offline to ARD.
So I've been just playing with running purge commands via terminal early in the mornings.
I did so this morning around 5:30am. It had finished purging by 7:15am.
When my VM users came in this morning (@ 8:30am) they all noticed a lot of lag with the direct use of their VM's. As time went on, some sped up, and worked properly connecting to their respective databases, while some did not. We had to reboot those VM's.
I'm kind of at a loss right now on if purging is a good idea or not...
My goal is to just try and get these 9vm's to run Mon-Fri well without needing reboots. We have backups and clones scheduled over the weekend, and we reboot then.
I'm wondering if I should try using the VM's without disk buffering to see if that can help prolong the reboots.... Thoughts?
Or if I'm not doing something right with purging...maybe I should run it at night, to give it more time to "settle" before employees begin using it...
I'm confused. It would make more sense in this use case to utilize the free ESXi software, rather than trying to treat Fusion as ESXi? Is it because you only have Mac hardware lying around?
Correct, we only have Mac hardware to use. And granted it's an amazing machine!
I've looked briefly into ESXi, but considering the rest of our network is all Mac based, I was hesitant about going down that road of having file sharing issues and what not.
Plus having the Mac Hardware handy was a huge plus....so I thought in the beginning.
ESXi doesn't handle any of the file "shares" It would just be the hypervisor, and your VMs running on the machine. I'd definitely look into a cheaper x86 based server that should be able to accomodate your load rather inexpensively, without all the memory management head aches.
Understood it won't handle the file shares. I'm concerned with the Mac file shares being accessible to the Windows based VMs.
Right now with Fusion, we're able to share those Mac file share points through the Share feature built into Fusion.
Changing the hypervisor shouldn't have any impact on that. Windows can mount Apple File Shares, you will just need to configure it.
