IRamDisk 3.0.0 – Create a RAM disk. January 17, 2012 iRamDisk uses a block of memory to creates a virtual RAM Volume displayed like real disk by Mac OS X. Data into memory are written and read more quickly than the system disk. Superior Imaging Functions 1. Capable of rapidly imaging the RAM-disk contents to a persistent file and restoring contents when needed. In this way RAM-disks perform like persistent storage and retain contents across computer restarts, even though the system memory is volatile. SoftPerfect RAM Disk is a RAM disk application of high-performance application and is distributed for free. With this tool, you can create virtual disks that will reside on the RAM of your computer and one which can be accessed from Windows explorer. With this, you can place temporary files in.
Note from the editor: There is limited USB support in AIX and only specific devices are supported. Other devices might work, but IBM does not support their usage. JFS2 file systems are not officially supported on USB devices, but you can try this at your own discretion.
Tasks that involve text file data extraction, where performance is of the essence and the text files are to be placed on temporary storage, requires some thought. Typically, one could consider using a RAM disk (file system), a USB memory stick, or perhaps on a more permanent basis using SSD (solid state disk). RAM disk file systems are extremely fast, but at some point you need to move the files from the file system since you could lose everything if the file system is unmounted or the system is rebooted. Plus, you need to have enough memory (pinned) to create the RAM disk in the first place. For SSD, this would be the ideal solution, but these are not as cheap as the USB memory devices (when the requirement is temporary moveable storage). Another consideration is that you cannot place an SSD or RAM disk in your pocket and re-plug it into another machine like you can with a USB (memory) stick. These sticks are also known as:
pen drives;
memory sticks;
USB sticks;
flash drives; and
thumb drives.
In this article, I will demonstrate how to create a USB memory stick file system (hereafter called USB stick) and compare the different speeds on text extraction using a 2MB CSV file. I am using AIX 7.1 with a 4GB Sandisk memory stick. These USB sticks can come in sizes up to 256GB.
Memory sticks are useful in my opinion because:
They are ideal for fast data access.
They can be used in data transfer where network performance is poor.
They are great for scratch or temporary file systems.
They are cheaper than other alternatives.
The only downside is that they do have a limited life in that the write cycles on these drives typically last around 8-10 years, before the memory cells wear out. But as they are cheap to buy, this is really not a concern as you would no doubt replace them within that time period anyway.
The AIX 6.1 documentation states that it supports the following branded USB sticks:
Sandisk
Lenovo
Kingston
However, I have used other branded and non-branded USB sticks with no issues found.
USB sticks are ideal for creating scratch file systems where you want to transfer a large amount of data, via courier, for quick extraction to a remote destination sie cheaply because there is no good network link. As well, you could use them for data manipulation of large text files. USB sticks are great for fast reads but does not offer good performance when writing to them; you need to keep in mind what type of processing task you use it for.
Mounting a USB stick
Be sure to have the correct fileset(s) installed before inserting your USB stick. The following file-sets are required to access a USB stick:
Insert the USB stick and run cfgmgr to discover it:
Once discovered, you have two devices (the block and raw device):
It is also shown in the devices output:
For AIX 5.3, the first USB device is shown as flashdrive0.
At this point, I could treat the USB stick as a raw volume and write data to it. However, in this demonstration, I will mount the USB stick as a file system. I feel there is no need to create a log device for this USB mount, since the purpose of a scratch file system is that it is temporary and thus speed is of the essence when transferring data. To create the USB stick file system use the following command: Gopanel 1 2 2 – manage web servers.
The previous command initialized the USB stick. Select 'Yes' to destroy, or rather initialize, the device. The file system type is of jfs2 type. I do not believe that a type of jfs2 really matters for this task, as the file system is not going to use the jfs2 log device. But as this is the norm when creating file systems, I created it as a jfs2. To ensure the file system is scalable, I specify that with the 'ea' option. In this example, the device to use is the USB stick inserted, which is usbms0.
For AIX 5.3, there is no NOLOG option in the mount command.
If you wish to use a log device to mount the usb stick, use the inline log. This ensures that it is contained within the file system:
Unmounting a memory stick
Once you have finished using the a USB stick file system, unmount it, remove it, then delete the usbms0 device:
Data on the stick
In this demonstration, I am using a CSV text file called plaks.txt. It is an extract from a database, partial contents of the file is shown below:
Earlier I suggested that reading from a USB stick is quick but writing to the USB stick is slower compared to internal disks. This can be somewhat verified by doing an example copy. First, I copied a file from the USB stick to an internal disk. Then, I copied the same file from the internal disk back to the USB stick using the timex command to show the timings of the copy commands. Before both copy operations are carried out, the file systems have been unmounted and re-mounted, so that the operation does not use the file system cache and thus does not blur the timings.
First, the file is copied from the USB stick onto an internal disk to the /holding directory, which resides on an internal disk:
Next, I remove the file from the USB stick and unmount and remount the file systems.
Next, I copied the file back from /holding to the USB stick.
Free lagu boomerang kisah seorang pramuria. The copy of the USB stick takes nearly half the time of the copy from an internal disk. I typically use the USB stick for text extraction. Using awk as an example on data extraction, I extract the pattern 'bravo' contained in the plaks.txt located on the USB stick:
Doing the same operation on an internal disk:
The text extraction is quicker on the stick; in fact, there is a difference of over 3 seconds. Here I am using a relatively small size text file. Though clearly the saving in time is greater when using larger sized exported file, which typically could be up to 8-10MB.
The above, in my opinion, justifies why I choose to use USB sticks for heavy test processing; however, as suggested earlier, if you need to write data you lose out big time. Here I create a 100MB file on the USB stick:
Next, I do it on an internal disk:
As you can see, there is a difference of over 5 seconds in the writing to a USB stick compared to an internal disk.
USB sticks are great for transferring data when there is no real alternative. I recall one incident, where one of our machines located in a remote region where the SAN disks were failing. These SAN disks contained work flow images. This machine did not have a sturdy network, and we wanted to get these images onto another remote machine for business users to be able to continue to work. The only method quickly available was to buy some 64GB USB sticks, mount them, and tar the images up on the USB sticks. The images were then extracted onto our other AIX box. This method worked with no data loss.
Mounting a previous initialized memory stick
If you are in possession of a memory stick that contains data what was previously mounted as a file system, to access it simply mount it. Be sure to create the mount point first. For example, assume the USB device is inserted in the second USB slot, then have the device discovered as usbms1:
Conclusion
Using USB sticks is a great when you want to create a fast read access scratch file system for processing or maybe a raw device to dump some files into for transport to another AIX system. USB sticks offer one solution where you have a poor network, and you need to get a large amount of data transferred.
Iramdisk 3 5 4 – Create A Ram Disk Recovery
Downloadable resources
Related topics
The AIX 7.1 and AIX 5.3 Information Center is your source for technical information about the AIX operating system.
Try out IBMsoftware for free. Download a trial version, log into an online trial, work with a product in a sandbox environment, or access it through the cloud. Choose from over 100 IBM product trials.
Iramdisk 3 5 4 – Create A Ram Disk Drive
Last Updated on August 27, 2019 by
iRamDisk 3.5.1
Description
iRamDisk uses a part of your RAM to create a new volume shown as an ordinary drive that can be mounted and used independently in your Finder.
Since the access time to these datas is way more faster than usual (it can reach over 10 times of the normal speed for some configuration), it lets you do some things you would not be able to realize with a classic hard drive (along with relieving your internal one) such as getting a writing speed amazingly fast or moving the temporary files of some apps (Safari, Xcode,…) over it when you want to optimize their own access time along with minimizing the impact of these files on your SSD.
However, do not forget that your computer does not have as much of RAM as your disk space and that you will lose the data placed on the new volume when you restart it. So, be careful when using it!