I use Continuous integration as part of an Agile development cycle. I constantly struggle to make functional tests run fast enough. Ideally they are run after every build and at the very least they are run every night. I have quite a few functional tests, which are I/O bound, so I’m going to try and install SQL Server on a RAM Drive.
Step 1: Install Ram Disk Software
After a quick google Data Ram’s Ram Drive appears to be the best RAM Disk out there… or at least their website has the best SEO. They have a 4 GB free version so I figure I’ll give that a try.
Download and run the installer from here: http://memory.dataram.com/products-and-services/software/ramdisk
The installer is straight forward. The configuration is easy too. Here are the configuration settings I entered. I created a 2 gig disk and saved it to C:\RAMDisk.img. Click [Start RAMDisk] to begin.
Step 2: Format the Drive
Now we have a 2 gigabyte un-formatted drive. The next step is to format it! Select Start Menu > Disk Management.
Click on the partition and then “New Simple Volume…”
Select NTFS and use all default settings. That’s all!
Step 3: Create SQL Instance
Run SQL Server Management Studio. Create a new database.
Specify the F:\ Ram Disk.
That’s it! Create tables and insert data freely. Remember to save the RAM Disk periodically from the DataRam Configuration Utility used above. Todo: Compare database dependent functional tests before and after the RAM Drive.