RAMDisk

MDT Performance Boost Part 1

I need all the help I can get in terms of speeding up the build or build & capture process so I leverage the available hardware to help speed things up.  But before we get to it, let’s give credit where it’s due!

Recommended Reading

I can’t recall exactly when I first discovered those posts, but I didn’t have robust hardware at the time; In fact, I didn’t have SSD’s but I did have access to servers with significant amounts of RAM which is why this was so attractive.  I do want to warn you however that you should curb your expectations as your mileage may vary.

Speedup Process Overview

  • Use a RAM Disk or SSD
  • Give your B&C VM plenty of resources

It’s all About the Hardware

I’m blessed in that I do a lot of my development work on fairly robust hardware:

  • At home: Dell PowerEdge R710 with Dual E5649’s, 192GB of RAM and 8x146GB 15K SAS Drives in a RAID 10 configuration
  • On the go: Lenovo W541 i7-4810MQ with 32GB of RAM, 2x Sandisk Extreme Pro SSD’s in RAID 1 for dev work (VM’s, MDT etc.)
  • At work: Lenovo P500 E5-1620 v3, 128GB of RAM, 2x SSD’s in RAID 1 for dev work (VM’s, MDT etc.)

All of this allows me to leverage the additional cores and RAM to squeeze a bit of extra performance in build & capture scenarios.

Hyper-V Host Configuration

Because my host has gobs of RAM, I create a RAM Disk (or RAM Drive if you prefer) that is ultimately used to store ‘build & capture’ virtual machine’s .VHDX.  I typically allocate 60GB becuase I’m testing full load out scenarios but you can get away with considerably less for more bare bones builds.  There are a variety of RAM Disk solutions out there including, but not limited to:

  • ATI Radeon RAMDisk / DataRAM
  • ImDisk
  • MSI RAMDisk
  • SoftPerfect RAM Disk
  • StarWind RAM Disk

I landed on the no-frills StarWind RAM Disk product because it’s been maintained over the years and at the time of writing – as well as for the past several years – StarWind’s RAM Disk product has made available free of charge, doesn’t have any limitations I’m aware of and most importantly it just works.  Oh – and by “free of charge” I mean yes it doesn’t cost any money but they do ask that you offer up your personal details (name, email address etc.) “to accommodate your requests, keep in touch with you, and offer a better customer experience.

I know I know, this may be a pain point for you but this is a requirement as the download link comes via email.  I can say that I personally can’t remember the last time StarWind emailed me so I feel comfortable offering it up.  If you don’t like sacrificing personal details, consider the other products on the market most of which offer additional features like being able to save and restore the state of your RAM disk.

I do want to point out that this only works if you have excess RAM to spare.  If you don’t have enough RAM to create a RAM Disk for VM use, the next best thing would be to add an SSD to your machine or swap your mechanical drive for an SSD.  In a pinch I suppose you could use a large (64GB+) microSD/SD card or USB 3.0 thumb drive, but I don’t recommend that as a long term solution.  Just because you can doesn’t mean you should though! (^_^)

Virtual Machine Configuration

When creating a ‘build & capture’ VM, I typically give it 4 virtual processors and 8GB of RAM.  I’ve done B&C’s with 1 & 2 virtual processors an 2-4GB of RAM and the performance isn’t great.  You might be asking yourself:

Why not use 8 virtual processors and 16GB of RAM?

You absolutely can, but there is a point where the performance increase levels off at which point the resource cost outweighs the benefit. (i.e.: you’re not making good use of your resources.)  This 4 virtual CPU and 8GB of ram has worked well for me so far which is why I haven’t bothers measuring the performance benefits of 4+ virtual processors and 8+ GB of RAM.  If you’re feeling up to the task, I’ll leave you to do that and you might as well play around with the scheduler to ensure that B&C machine has the highest priority.

Putting It All Together

Installing StarWind RAM Disk

Download & install StarWind RAM Disk – it’s very much double click the EXE and Next, Next, Next to completion.

Configuring StarWind RAM Disk

Launch RAM Disk

StarWind_RAMDisk001

Click ‘Add Device’ to create a new RAM Disk and configure it to your liking

StarWind_RAMDisk002

The process may appear to hang while it creates the RAM Disk.  Go refill you cup of water or visit the loo and it’ll be done by the time you get back.

StarWind_RAMDisk003

When it’s complete you’ll see the new device and you should receive a notification

StarWind_RAMDisk004StarWind_RAMDisk005

Configuring the RAM Disk

After creation the new RAM disk will be offline so fire up Disk Management (or Server Manager whatever) to finish configuring it:

  1. Online the disk
  2. Initialize the disk
  3. Select GPT (or MBR if you prefer)
  4. Create a new simple volume
  5. Assign it a letter – I like to use R: for RAM Disk
  6. Use the NTFS file system
  7. OPTIONAL: Set the volume label – I like to use RAMDisk
  8. Select quick format

StarWind_RAMDisk006

Configuring Your B&C VM

Now that the disk is ready for use, it’s time to configure your B&C VM

If you don’t already have a B&C VM

  1. Create a new BnC VM
  2. Give it at least 8GB of RAM
  3. When asked where to place the .VHDX, change the path to the RAM disk
    • StarWind_RAMDisk007
  4. Once finished, edit the VM settings and give it at least 4 virtual processors

If you already have a BnC VM

  1. Edit the VM settings
  2. Give it at least 2 virtual processors; 4 if you can spare it
  3. Give it at least 4GB of RAM; 8 if you can spare it
  4. When asked where to place the .VHDX, change the path to the RAM disk
    • StarWind_RAMDisk008
    • StarWind_RAMDisk009
    • StarWind_RAMDisk010

That’s it – now you’re cooking with gas!  Start your VM and test an image.

In Closing

When I initially did this, I did notice an appreciable decrease in machine build out time.  We’re not talking going from 60 minutes to 20 minutes, but it was a noticeable improvement nonetheless.  If I can improve my build times by up to 15-25% then I’ll take it!  Now that we have a mostly automated build process, speeding it up it just gravy allowing for more B&C’s throughout the day.

In any event, I hope you find this tip as useful as I do!

Good Providence to you!

Advertisements