StarWind Enterprise Server
Request a Quote
Feel free to contact us:
USA and LATAM:
1-617-449-7717
EMEA and APAC:
+44(0)2071936727
+44(0)2071936350
+33(0)977197857 (French)
+49-1715109103 (Germany)
Voice Mail:
1-866-790-2646
Email:
sales@starwindsoftware.com
 
 

Crazy HA RAM disk idea

iSCSI Target for Microsoft Windows.

Moderators: anton (staff), Max (staff), Constantin (staff)

Crazy HA RAM disk idea

Postby Aitor_Ibarra » Fri Oct 08, 2010 12:12 am

I can't actually try this as the moment as one of my servers is out for repair.

Anyway, I've had this idea...

Currently, you can't have an HA target that uses a RAM disk, and write performance of the Write Back cache is held back a bit by writes not being acknowledged until both nodes have written to disk, not just cache (less cautious option is coming soon).

But what if you had a small target that had to be HA but needed maximum write performance? Could you hit both 1 million IOPS and 1GB/sec?

1) Take 2 servers with at least six cpu cores, and 3GB of RAM more than you need for your target. E.g. if you want a 5GB target, you need 8GB of RAM. You also need 10GbE NICs, or better still 40GbE...
2) Install Windows 2008 R2 and the hyper-v role and the free Starwind RAM disk. Create a Ram disk that automounts on startup. Format it as NTFS and give it a drive letter, let's say R:/
3) write two batch files, startup_ram.bat and shutdown_ram.bat:
Code: Select all
REM startup_ram.bat
COPY c:\ramdisk.vhd r:\ramdisk.vhd /y

Code: Select all
REM shutdown_ram.bat
COPY r:\ramdisk.vhd c:\ramdisk.vhd /y

4) Use the Hyper-V manager or whatever to create a fixed size vhd as c:\ramdisk.vhd
5) run startup_ram.bat - and time how long it takes (speed will be limited by your HD)
6) Create a new VM, with a virtual scsi controller and r:\ramdisk.vhd as a disk on that controller
7) Set the VM startup properties to delayed start, using the thime you got in 5) plus a few extra seconds/minutes
8) Create a group policy / local system policy / scheduled task to run startup_ram.bat at startup and shutdown_ram.bat at shut down
9) Give your VM four cores and 1GB RAM, and set up the virtual NICs
10) Install WIndows and Starwind in the VM

11) Repeat on other server

12) In Starwind, set up an HA target with the img stored on the ram disk.

Now...
if you restart the server gracefully, the VM will be shut down gracefully, and all writes will be finished to the img, the VM will close the VHD, and the batch file will copy the VHD to the hard drive. When the server starts, the RAM disk is created, the VHD is copied, and then the VM starts, and Starwind will resync the target.

Who needs a TMS RAMSAN?!

...and you could probably do this without virtualising, providing Starwind doesn't mind storing the img on a ram disk (in hyper-v, it won't be able to tell!)

- store img on R:\ , not vhd - adjust bat files
- set Starwind service to manual and add a net start to startup_ram.bat after the copy and a net stop to shutdown_ram.bat before the copy
User avatar
Aitor_Ibarra
 
Posts: 161
Joined: Wed Nov 05, 2008 1:22 pm
Location: London

Re: Crazy HA RAM disk idea

Postby anton (staff) » Mon Oct 25, 2010 8:58 pm

I don't think it sounds like a production environment (as RAM is still gigabytes and data turns out to be terrabytes if not petabytes) but I think it's not going to take us a lot of time to have something like this implemented in the software. So I think we'll put this one into the roadmap as a "test task" for one of the newly hired software developers. Thanks a lot for this suggestion!
Regards,
Anton Kolomyeytsev

Chief Technology Officer, StarWind Software

Image
User avatar
anton (staff)
Site Admin
 
Posts: 2153
Joined: Fri Jun 18, 2004 12:03 am
Location: British Virgin Islands


Return to StarWind

Who is online

Users browsing this forum: Google [Bot] and 3 guests