Posts Tagged ‘RAMdisk’

Super Simple Mac OS X RAM Disk Tool – rdmanage

 

I’ve ported my Linux RAM disk management simplification tool, rdmanage, to Mac OS X. Now you can enjoy all the benefits of zero seek times and upwards of 1GB/second sequential read speeds on an operating system that humans can use.┬áThe program still has to be launched from the command line, but I’ve kept it very, very simple – all you have to do is specify the size of the drive.

Operation:

To create your RAM disk, open a Terminal window and navigate to where you’ve saved the program. At the command prompt, type:

$ ./rdmanage [size of disk in MB]

For example, to create a 500MB drive, you would type:

$ ./rdmanage 500

When your disk has been created, it will appear on your desktop and in Finder just like a USB or FireWire drive. When you’re done, eject the disk just like you would an external device.

Download:

You can either download the program by right clicking this link and pressing ‘Save As’/’Save Target As’, or if you’re already at a command prompt, use cURL:

$ curl -O http://www.zebpedersen.co.uk/python/mac/rdmanage

Once you’ve downloaded the file, you might have to specify it as executable:

$ chmod +x rdmanage

RAM Disk vs Hard Disk

A couple of days ago I posted a small program that I created to facilitate easy creation and management of RAM disks on a Linux system. At the time, I missed a prime opportunity to do some benchmarking:

Using a RAM disk, you gain a working folder with speed way far in excess of any hard disk or even solid state drive

Just how ‘way far in excess’ is the speed of a RAM disk than a traditional hard drive? Way far indeed, and here comes the proof:

(more…)

Super Simple Linux RAM Disk Manager – rdmanage

I’m currently developing a piece of server software which needs to be able to create, modify, serve up and dispose of many temporary files many times every second. Because a great number of I/O operations will be occurring, the program requires very rapid disk access – ideally, it would run on a RAID array or a solid-state disk. Because the server I’m using doesn’t have either, I’m using RAM disks as a substitute.

RAM disks take a portion of your system RAM memory and make it available for storage by mounting it in your file system. Using a RAM disk, you gain a working folder with speed way far in excess of any hard disk or even solid state drive. The usual rules of RAM apply – this is volatile memory, so anything stored on a RAM disk will be erased when the power is cut – but it’s perfect for temporary file storage.

I’ve written a very simple program for Linux called ‘rdmanage’ to help create and manage RAM disks easily at the command line.

Operation:

There are three modes of operation for this program – create a new RAM disk, create a RAM disk from an existing folder, and remove existing RAM disk. As promised, the program is very simple to operate:

To create a RAM Disk:

$ ./rdmanage create [size in mb]

For example, to create a 100MB RAM disk:

$ ./rdmanage create 100

To create RAM Disk from an existing folder:

$ ./rdmanage from /path/to/folder

For example, to create a RAM disk from the folder ‘/home/randymarsh/sim’:

$ ./rdmanage from /home/randymarsh/sim

To remove an existing RAM Disk:

$ ./rdmanage remove

Notes:

– When using the ‘from folder’ mode, the maximum size of the folder is 512MB

– You will need root permissions to mount the RAM drive

– The ‘remove’ mode will commit the state of the RAM drive to disk in a folder called ‘ramdisk.contents’

– All operations will occur within the current working directory (i.e. the folder you’re presently in). To check which folder you’re in, type ‘pwd’ at the command prompt.

– Depending on how you download the program, you might have to set the file as executable:

$ chmod +x rdmanage

– If you want to check the status of your drive, it will be listed when you use the ‘df’ command

– For program help, type:

$ ./rdmanage help

Download

You can download the program by right-clicking here and selecting ‘Save As’/’Save Target As’, or if you would prefer to download straight to your Linux machine from the command line, use wget:

$ wget http://zebpedersen.co.uk/python/rdmanage

Hopefully this program can save you a bit of time creating and managing your RAM disks. Enjoy!