atxgeek 


just one more geek in a sea of austin techies

May 7, 2013

TIP: RAM and Virtual Machine Speed #VMGeek

"More is better" as the current pitch line of a certain US cellular carrier says.  For computers the "more" benefits are obvious for things like disk space, memory, CPU cores and network bandwidth.  The same holds true in the virtual world:  virtual PCs like to have more as well.

As a point of interest I recently conducted a very informal speed test between two identical virtual machines.  My only (big) variable?  RAM.  One machine had twice as much RAM as the other.  My goal was to see how much the extra RAM would benefit me during set up of a new virtual machine (even if that machine were destined to be allocated less RAM once it was up and going).  Temporarily adding RAM should translate to a shorter set up time but would it be enough of a difference to bother with?...

Test Rig
I ran my test VMs using the open source Oracle VirtualBox platform under Windows 7 64-bit.  The virtual hard disks were located on the same physical drive as the host OS (it was a laptop) with 12GB of host system RAM and an Intel Core i7 CPU.



Each virtual machine was a freshly-installed copy of Windows Server 2012 Standard -- no other software installed and no additional server roles configured.  Virtual server #1 had 1.5 GB of RAM allocated while server #2 had 3.0 GB of RAM allocated.  Each virtual system was loaded during the test but I paused (gotta love VMs) whichever system was not being timed at the moment.

Chosen Test Activity
I opted to track the time of the real-world activity of installing 400MB of Windows updates.  Because the downloading of updates can vary quite a bit based on network traffic I timed various milestones during the actual installations (once downloads were complete).

Results
Of course the VM with 3GB of RAM was faster than the VM with 1.5GB of RAM, but how much faster?

Server 2012
(3.0 GB)

Installing 401.4 MB
of updates
(KB2756872, KB2785094, KB2770917, KB2779768)

15:31 Download complete
------------------------
 17:04 
 Update 1 of 4 complete
 17:36 
 Update 2 of 4 complete
 19:27 
 Update 3 of 4 complete
 20:56 
 Update 4 of 4 complete
------------------------
 Installation time:
 5 minutes, 25 seconds
Server 2012
(1.5 GB)

Installing 401.4 MB
of updates
(KB2756872, KB2785094, KB2770917, KB2779768)

20:29 Download complete
------------------------
 23:36 
 Update 1 of 4 complete
 24:30 
 Update 2 of 4 complete
 27:02 
 Update 3 of 4 complete
 29:24 
 Update 4 of 4 complete
------------------------
 Installation time:
 8 minutes, 55 seconds

Result:  Adding 1.5 GB of RAM saved
3 minutes, 3 seconds of installation time.


The download times can't be reliably compared based just on this one test (I later repeated the 3.0 GB system update and completed the download in only 11:39).  The entire test including the download resulted in the 3.0 GB system finishing 8.5 minutes faster -- only 70% of the time it took for the otherwise-identical 1.5 GB system.  Ignoring the download portion, the installation results pegged the 3.0 GB system at only 60% of the time needed by the 1.5 GB system for a 40% time savings.

30% to 40% faster? Allocate That RAM!
Considering how simple it is to to adjust virtual machine RAM settings we can safely state that it is probably always worth the extra few steps to temporarily over-allocate RAM when installing and updating a virtual system.  While I never doubted that more RAM was better, I now have a good grasp of the potential time savings (about 33%) to be enjoyed when setting up new virtual machines or performing large installations and updates on virtual systems destined to have limited amounts of RAM.  I would guess that systems with plenty of RAM to start with (say, 16GB or more) would likely see little benefit in temporarily increasing allocated RAM but that's a test excercise for another day (Have you tried it? Comment below!)

No comments:

Post a Comment