RAM Disk and RAID 0

Started by BlackBox

BlackBox

RAM Disk and RAID 0   29 April 2019, 11:10

I'm a relatively new customer and love your RAM Disk.

Any chance you can enhance it to allow user to run two RAM Disks in RAID 0 (without Intel software RAID, etc)? My CPU (Intel i7-7700K) does not seem to support Intel's software RAID, so this would have to be done using the SoftPerfect software directly. If you could do this... it would be bleeding edge fast.

Cheers
SoftPerfect Support forum - Ann avatar image
Ann

Re: RAM Disk and RAID 0   29 April 2019, 11:29

It is an interesting idea to build a RAID 0 array of two RAM disks, but unfortunately it seems not to work as expected. In the case of two physical HDDs, a software RAID 0 writes to the two independent devices in parallel, effectively doubling the speed. However in the case of two RAM Disks, both disks are the same device - RAM; so RAID 0 would be limited by the memory's bandwidth. Considering RAID 0 processing overhead, it would be even slower than the same RAM disk outside the array.

You can re-create the setup for testing and use Windows built-in software RAID:
  1. Create two RAM Disks of the same size with Hard Disk Emulation turned on. The latter is required for the disk to act like a physical device with partitions and be available under Disk Management.
  2. Open Disk Management (Start - Run - diskmgmt.msc) and delete logical volumes from both RAM disks.
  3. Right-click either disk and click New Striped Volume. You will be able to add the second RAM disk to it and create a software RAID 0 with the capacity equal the sum of both.
Unfortunately it will be pretty slow due to the RAID layer overhead, the need for the RAM disk driver to emulate a physical device, and, above all, the memory bandwidth, no matter which drive Windows writes data to.

Instead, the best and fastest way is to use a regular RAM disk without Hard Disk Emulation and with exFAT file system.

The screen shot below illustrates the performance difference between Windows software RAID 0 (1), Underlying RAM disk performance (2), and a RAM Disk without HDD emulation formatted as exFAT (3):

SoftPerfect support forum
BlackBox

Re: RAM Disk and RAID 0   01 May 2019, 10:48

Thanks for the prompt reply, I appreciate the clarification - while I have already disabled hardware emulation, I did not know that exFAT was faster and that gave me another small bump in IOPS.

I was hopeful that RAM Disk Software could be enhanced to leverage disparate RAM Disks (RD) that were assigned to different channels of memory (presuming an RD capacity less than that channel is equipped with, of course), given that most workstations have 2 or 4 (if not more) memory channels on the motherboard multi-channel memory architecture (Channel 1: slots A1-A2, channel 2: slots B1-B2, etc). Are you saying that, given an RD of sufficient capacity (in my case 12 GB of 32 GB RAM), this RD is already being 'striped' across both memory channels so-to-speak? Just looking for the best way to extract every ounce of performance I can get, which I hope you can appreciate.

Also, would it be possible to create a new Image file during the Add/Edit Disk dialog (green plus sign)?
The current workflow requires one to first use Image menu > 'Create Image...' menu item, before clicking the green plus 'Add a new disk mounted on boot' button.

Thanks for your time and consideration!
SoftPerfect Support forum - Ann avatar image
Ann

Re: RAM Disk and RAID 0   01 May 2019, 11:03

Currently, there is little room for further optimisations as our RAM Disk already outperforms competition in most tests. It is possible to allocate all memory from a specific NUMA node on a multiprocessor system and this should improve performance, but this setting would do nothing on a single processor machine. All available memory channels are used automatically, be that 1, 2 or 4 channel machine; my understanding is the OS and BIOS are controlling this. Having said that, we will review the RAM Disk core code to see where else we can improve its performance a little.

Regarding creating an image during RAM Disk creation - it's easy. Just click the "new document" icon on the left side of the Image File Name edit field as shown below. If you intend to use images, we recommend periodically backing up the image files with their contents, to protect yourself from accidental data loss, for example in case of a system failure or disk error occurring during writing to the image.

SoftPerfect support forum

Re: RAM Disk and RAID 0   08 May 2019, 23:08

Just read through the whole "Software-RAID" idea built of RAMDISKS ... This is actually brilliant, peaked my interest to play around with, and will be leading into seconding the OP's suggestion of having this as an official feature. Specifically in the case of machines with multiple NUMA nodes without registered DIMMs, as a way to exceed the memory of a single-node in a disk without fully saturating that node (i.e. keeping the cores on that node fast for software in not forcing remote memory access).

I've actually been looking for a way for awhile now to create "large" scratch-disks on a Threadripper (in excess of 50GB) for deploying full OS installations, updates, software under VM's, and then "re-packaging" the finished image for bulk deployment. Could use an SSD ... yet boy does that rack up terabytes of disk writes fast. Can use SoftPerfect, though this results in node-saturation.

Any chance that we could have a NUMA split-allocation mode added?
-- Not even for the sake of performance per-say, yet for instance to allow a TR 1950X with 64GB per node, to handle an 80GB RAMDISK allocation {40GB per NUMA node}.
SoftPerfect Support forum - Andrew avatar image

Re: RAM Disk and RAID 0   08 May 2019, 23:55

There is a setting accessible via the Advanced button that lets you choose which NUMA node to allocate memory from.

It's only enabled on a multiprocessor machines though. Is this what you were asking for?

SoftPerfect support forum

Re: RAM Disk and RAID 0   09 May 2019, 00:21

Not quite, I'm looking for a way to do cross-node controlled allocation (equal-split) rather than allowing the OS control over where the allocation takes place. Or rather, to allow for an allocation greater than the memory capacity of a single-node, without filling the memory of any given node.

E.g, for a two memory controller system: half from node 1, half from node 2.
Three: 1/3rd from node 1, 1/3rd from node 2, 1/3rd from node 3
and so on.

It could honestly be a span across the NUMA nodes rather than trying to swizzle the access per the RAID-0 / striping remarks, the idea is just to extend the usable capacity for disks.

I realize that I could just script this myself as described earlier in the thread using Windows Dynamic Disks along with the CLI options of ramdiskc, yet it would be absolutely awesome if we could just create disks that behave this way directly via SoftPerfect {unified in a single tool}.

Also thanks in advance for considering this!

For the sake of clarity:
SoftPerfect support forum

Re: RAM Disk and RAID 0   09 May 2019, 01:22

Side note: my assertion that I could automate this using ramdiskc might've been a bit too hasty. I notice in the software help (user-manual, website, printed output of ramdiskc) that there's no option for specifying a NUMA node via cmdline (at least that I can see).

RAM Disk Console 4.0.8

Syntax:
 ramdiskc /add:driveletter /param:value,...
 ramdiskc /del:driveletter /param:value,...

Options for adding a RAM Disk
===================
 /fs    Disk file system FAT, FAT32, exFAT, NTFS or NTFSC (compressed).
 /size  Disk size as a number followed by a multiplier, e.g. 10M, or 1G.
 /label Optional volume label. Valid when a file system is created.
 /hdd   Enable Hard Disk Drive emulation (slower).
 /rem   Mount the disk as a removable device.

Examples:
 ramdiskc /add:R /size:100m /fs:fat32
 ramdiskc /add:K /size:1g /fs:ntfsc /label:MyCompressedDisk

Options for deleting a RAM Disk
====================
 /force Forced deletion even if the disk has open files.

Examples:
 ramdiskc /del:R
 ramdiskc /del:K /force

An option to do something such as /node:0, /node:1, /node:split would also be great for VM spin-up scripts.
SoftPerfect Support forum - Andrew avatar image

Re: RAM Disk and RAID 0   11 May 2019, 18:15

A possible implementation of the "split" mode looks a little complicated. As there seems to be no way to find out how much memory can be allocated from a specific node, we wouldn't know how much to ask for to ensure the allocation succeeds.

Let's say, we have a 100 GB RAM 2 CPU machine, 90 GB are free and we want a 85 GB RAM Disk. Things might proceed this way:
  • Node A has 50 GB free and node B has 40 GB free.
  • We divide 85/2 to ensure equal split, and allocate 42.5 GB in each node.
  • The allocation would succeed in node A, but not in node B.

To work around this problem, I believe it's possible to ask the system to allocate memory from other nodes if the ideal node doesn't have enough capacity, but that requires further research. We may do that at a later stage.

Regarding the missing parameter for a NUMA node setting, this is easy to add. We will include it in the new release due in a few days.

Re: RAM Disk and RAID 0   11 May 2019, 23:50

That's a fair point on that the allotment of memory between nodes (physically installed RAM) may not be equal pending the user's configuration. They might have 64GB on one node, and 32GB on the other (a total of 96 in the system instead of 128). Hadn't given occupancy much thought either, since I was considering spinning up a disk before launching other software whenever everything is relatively free. It's also certainly true that they may have software running at the time that allocation is attempted that happens to be occupying most of a given node.

Perhaps a simpler way to go about this would be to just lay full-control in the user's hands. e.g, to expand the UI and cmdline args such that a person could 'manually' define how much memory to use on a per-node basis rather than simply specifying the size of a disk upfront. Or rather, instead of saying that I want an "80GB disk", defining it as 40 from one node, 40 from the other -- or a 60GB disk as 40 from one and 20 from the other.

Then again from the performance front there's probably benefits to an equal split that can be leveraged, though yes I certainly agree that SoftPerfect's software would be more potent accommodating all scenarios. You're right on that this sounds quite complicated on giving it a bit more thought, heh.

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

  ******   **     **  **     **  **     **   ******   
 **    **  **     **  ***   ***  **     **  **    **  
 **        **     **  **** ****  **     **  **        
 **        *********  ** *** **  **     **  **   **** 
 **        **     **  **     **   **   **   **    **  
 **    **  **     **  **     **    ** **    **    **  
  ******   **     **  **     **     ***      ******   

Message: