Creating a RAMDisk in Server 2016 for IO Benchmarking

Posted by | No Tags | Uncategorized | No Comments on Creating a RAMDisk in Server 2016 for IO Benchmarking

Hi Again everyone!  This post I’ll be showing some PowerShell commands for creating a RAMDisk.  Recently I was engaged at a client site where we were baking off Hyper-V vs VMware.  The Host and Network Stacks consisted of the same fabric but the storage back end were placed on different block level arrays with different specifications and running workloads so we needed a way to do an apples t.

We wanted our test results to have as few variables as possible so we decided to store our SQL dbs in a RAM Disk.  Follow the steps below if you ever have a need for it!

 

 

Here is the PowerShell for easy Copy/Paste

New-iscsiservertarget -TargetName “testramdisk”

Set-IscsiServerTarget -TargetName “testramdisk” -InitiatorId “IQN:*”

New-IscsiVirtualDisk –Path “ramdisk:test.vhdx” –Size 20MB

Add-iscsivirtualdisktargetmapping -targetname “testramdisk” -Path “ramdisk:test.vhdx”

First to Prepare your VM Make sure you have the iSCSI Target Server Role installed

Also make sure you have your local IP listed for the Target Portal under the iSCSI Initiator

Run the PowerShell Commands listed above

You should now see an Inactive iSCSI Target

Choose to Connect to this new target

Once you do you will see a new disk that is offline in Disk Management

Choose to Online the disk, Initialize the Disk, and Format the Disk with a drive letter.  You now have a functioning RAM Disk!


No Comments

Comments are closed.