How to Implement RamDisk or RamDisk PlusŪ in a Microsoft Cluster

The following information applies only to Microsoft Server Cluster Service (MSCS) or to Windows Server Failover Clustering (WSFC).

On this page:

Preliminary Considerations
RAM Disk Cluster Resource Implementation
The RAM Disk's Size and Drive Letter 
Impact of Reduced Available System Memory on the Cluster Application
Stopping the Cluster Application
How to Implement a RAM Disk in a Cluster
How to Implement a RAM Disk Cluster Resource From the Command Prompt
How to Remove a RAM Disk from a Cluster

Preliminary considerations   Before starting the installation process, we recommend giving due consideration to each of the following points:
  • How RAM disk cluster resources are implemented
  • The RAM disk's size and drive letter,
  • The impact of reduced available system memory on the cluster application,
  • On a production cluster, a convenient time when the cluster application can be stopped
RAM Disk cluster resource implementation   Go to top By convention, storage resources in a Microsoft cluster are shared devices. A shared cluster storage device exists separately from each node in the cluster, but is accessible from each node. A RAM disk, however, is not a shared storage device. Instead, it is maintained locally on a cluster node, and is accessible only to that node.

SuperSpeed's RAM disk cluster resource implementation creates the illusion of a single RAM disk being shared by all nodes in the cluster. As indicated above, a cluster application running on a given node can only access a local RAM disk configured as a cluster resource. However, if each node has its own local RAM disk, a given node's RAM disk can be made available to dependent resources when that node becomes active.

In SuperSpeed's cluster resource implementation, a RAM disk must exist on each node in the cluster. Each RAM disk should be the same size and must use the same drive letter. When a group containing a RAM Disk cluster resource is brought online, the RAM disk local to the node becomes accessible to its dependent applications or resources, also running on the node. When the group is moved to a second node, the RAM disk on the second node becomes accessible to the applications or resources running on that node.

From the above it is clear that whatever has been stored on one node's RAM disk, will not be available on a different node. The RAM Disk cluster resource can only be used by applications or resources that do not require data persistence when moving the resource from one node to another. An ideal candidate for a RAM Disk cluster resource are the tempdb files of SQL Server. These files are re-created each time SQL server starts up. Frequently, they are also the cause of a performance bottleneck which can be eliminated by locating the files on a RAM disk.

RAM disk size and drive letter   Go to top Determining the RAM disk's size is an important consideration. If the size is too large, unused memory will not be available to the application and other system components, effectively wasting the resource. If the size is too small, the performance benefit will be reduced, or the application may even fail to start. The appropriate amount to allocate varies from application to application.

The drive letter to be assigned to the RAM disk must be unassigned on all cluster nodes. Make sure it is not assigned to a network drive, which some tools may display as unassigned.

Impact of reduced available system memory on the cluster application   When memory resources currently allocated to the cluster application are reduced, the typical impact is a reduction in overall performance. To make up for the loss, the resources must be reallocated to the system's bottleneck in an effective manner. Where a system is bottlenecked by access to temporary data, a RAM disk is an effective performance solution.

However, over-allocation of memory resources to the RAM disk can result in a lower overall performance. Frequently, it is necessary to experiment with different allocation sizes to find the best balance and optimize performance.

Stopping the cluster application   Go to topThe cluster application must be made dependent on the RAM Disk cluster resource. This cluster dependency cannot be configured while the application is running - it must be stopped.

Most cluster applications' configuration settings include limits on memory resource allocations. These settings may have to be reduced to free system memory for the RAM disk's allocation. In order to take effect, the application must be stopped to free its resources, the configuration setting changed, and the application restarted afterwards.

Additionally, to take advantage of the RAM Disk cluster resource, the application must be reconfigured to place its temporary data on the RAM disk. Once again, this change requires that the application be stopped, reconfigured, and restarted.


Go to topHow to Implement a RAM Disk in a Cluster
1. Install RamDisk or RamDisk Plus (version 11.1 or greater) on each cluster node. To install RamDisk cluster support successfully, the cluster service must be running on at least one node.
 
2. Stop the cluster application. SuperSpeed recommends stopping the cluster application to ensure that sufficient memory is available to add a RAM disk.
 
3. Add a local RAM disk to each cluster node, using the same parameters on each node. (See command-prompt example.)  
a. Select a size to large enough to contain the temporary data.
b. Select an appropriate drive letter.
c. Select "NTFS" file system, without compression.
d. Optionally, enable "Create '\temp' folder". (Suggested for SQL.)
With RamDisk Plus:
e. Use the default image location.
f. Do not enable "Save at system shutdown" or "Reserve space for full disk".
 
4. Create a RAM Disk cluster resource. (See command-prompt example.)
 
Windows Server 2003 and Windows Server 2003 R2:
a. On the first page of the "New Resource" wizard, enter the name of the new RAM Disk resource, and select the cluster group to which it will belong.
b. Navigate through the wizard, making the appropriate settings. Note: The RAM Disk resource is not dependent on any other cluster resources.
c. On the last wizard page "RAM Disk Cluster Resource Parameters", in the "Id" field, enter the four-digit identifier of the RAM disk added in step 3. Or, instead, in the "Drive" field, enter the drive letter of the RAM disk added in step 3.
 
Windows Server 2008 and Windows Server 2008 R2:
a. Navigate to the appropriate group and create a new "RAM Disk (SuperSpeed LLC)" resource.
b. Open the new resource's properties dialog box and select the "Properties" tab. In the "Id" field, enter the four-digit identifier of the RAM disk added in step 3. Or, instead, in the "Drive" field, enter the drive letter of the RAM disk added in step 3.
 
Windows Server 2012 and Windows Server 2012 R2 (PowerShell only):
Use only PowerShell Failover Cluster Cmdlets to create the cluster resource for Windows Server 2012.
a. Create the cluster resource
   Add-ClusterResouce -Name xxxx -ResourceType 'RAM DISK (SuperSpeed LLC)' -Group rrrrr
  xxxx = the desired name for the resource
  rrrrr = the role to which the resource is to be added.
b. Set cluster resource properties
   Get-ClusterResource xxxx | Set-ClusterParameter Id "iiii"
Get-ClusterResource xxxx | Set-ClusterParameter Drive "d"
  xxxx = the name of the resource from step a.
  iiii = Id number from RamDisk
  d = drive letter from RamDisk
c. Bring resource online
   Start-ClusterResource xxxx
  xxxx = the name of the resource from step a.
Go to top
5. Test the RAM Disk cluster resource. (See command-prompt example.)
a. Bring the RAM Disk cluster resource online.
b. Move the group containing the RAM Disk cluster resource to another node.
c. If both these actions are successful, continue with installation. Otherwise, troubleshoot the problem.
 
6. Configure the cluster application to work with the RAM Disk cluster resource.
a. Make the cluster application dependent on the RAM Disk cluster resource.
b. Configure the application to use the RAM disk. (For SQL, see note below.)
c. If necessary, reduce the application's system memory allocation limit.
 
7. Start the cluster application.
 
8. Test the cluster application with RAM Disk cluster resource. (See command-prompt example.)
a. Move the running application to another node.
b. Restart a node that is available to host the application. After restarting, move the running application to that node.
c. If both these actions are successful, the installation is complete. Otherwise, troubleshoot the problem.
Note: SQL Server's tempdb files cannot reside in a volume's root directory; they must be located in a subfolder. SuperSpeed recommends enabling the "Create '\temp' folder" option when creating the RAM disk. Then, configure SQL to locate the tempdb files in the '\temp' folder of the RAM disk.


Go to topHow to Implement a RAM Disk Cluster Resource From the Command Prompt
The following command-prompt examples implement a 16384 MB RAM disk, with drive letter R:, formatted with NTFS, and with a folder named "temp" in the root directory, as a RAM Disk cluster resource named "RAM Disk 0001" belonging to cluster group "SQL" on a failover cluster with two nodes named "NODE1" and "NODE2".
 
To create the RAM disk:
 
    rdcfg -add -sz 16384 -dl R: -fs NTFS -temp
 

 
To create the RAM Disk cluster resource:
 
   cluster res "RAM Disk 0001" /create /group:"SQL" /type:"RAM Disk (SuperSpeed LLC)"
 

 
To link the RAM Disk cluster resource with the physical RAM disk, set either the "Id" or the "Drive" property:
 
   cluster res "RAM Disk 0001" /priv Id="0001"
 
         or
   cluster res "RAM Disk 0001" /priv Drive="R:"
 
 

To display the RAM Disk cluster resource's private properties:
 
    cluster res "RAM Disk 0001" /priv
 

 
To bring the resource online:
 
    cluster res "RAM Disk 0001" /on
 Go to top

 
To take the resource offline:
 
    cluster res "RAM Disk 0001" /off
 

 
To create the cluster group:
 
    cluster group "SQL" /create
 

 
To move the cluster group:
 
   cluster group "SQL" /move:"NODE2"
 

 
To delete a RAM Disk cluster resource:

   cluster res "RAM Disk 0001" /delete

To delete a RAM Disk cluster resource Windows Server 2012 (Use PowerShell Failover Cluster Cmdlets):

   Remove-ClusterResource xxxx (where xxxx = resource name)
 
To remove a RAM disk from the system:
 
   rdcfg -rem 0001
 


Go to top How to Remove a RAM Disk from a Cluster
1. Reconfigure the cluster application.
a. Remove all dependencies on the RAM Disk cluster resource.
b. Reconfigure the application to no longer use the RAM disk.
c. If necessary, increase the application's memory allocation limit.
 
2. Delete the RAM Disk cluster resource. (See command-prompt example.)
 
3. Remove the RAM disk from the system. (See command-prompt example.)
 
4. Uninstall RamDisk or RamDisk Plus on each node. During uninstallation, any RAM disks still present on the node will be destroyed. Also, if the cluster service is running on at least one node, the RAM Disk cluster resource type will be unregistered and the corresponding resource DLL(s) deleted.

See Also:
How RamDisk and RamDisk Plus® Work in a Microsoft Cluster.
Accelerating Application Performance in a Cluster
How to Relocate Microsoft SQL Server's tempdb Files

How the Microsoft Server Cluster Service (MSCS) Works
How Windows Server Failover Clustering (WSCS) Works

 

 

Last update: 1 April 2014


Citrix   HP   IBM

  Home - Site Map - Contact Us - Legal Notices - Privacy Policy  

SuperSpeed LLC is the owner of the following U.S. Patents 5577226, 5606681, 5918244, 6370615, 6629201, 6651136, 7017013, 7039767, 7111129, 7475186, 7594068, 7631139, 7886099 and other patents are pending.

Copyright © 1996-2015 SuperSpeed LLC. All rights reserved.