New Article: The Linux RAM Disk
Back in April, I had written about Linux+ magazine publishing my article, Linux Storage Management in their 3/2009 issue. This has hit the shelves earlier this month. This post is to note that Linux+ is publishing another article of mine, The Linux RAM Disk for their 4/2009 issue. For those interested, it may be worth the read. The article is broken down into:
- the original Linux RAM disk
- Linux RAM-based file systems (ramfs and tmpfs)
- tips for using tmpfs to tune your system (included Firefox caching to RAM)
- data synchronization techniques
- hardware implementations of RAM disks and DRAM Solid State Disks (SSD)
While not part of the original article I also decided to write a generic RAM disk block device module which can be written to/formatted and mounted like a normal Linux block device. Note that you can download a *.tar.gz file containing the source code and Makefile here (included is a README with basic instructions for compilation and initialization). This exercise was an excellent learning experience on how Linux block devices functions.
The block device driver is limited to a size of 64MB and can be altered within the source file rxd.c. You can write to the physical device node /dev/rxdev or write an ext2 file system and mount it locally where you can read/write files to it. All files will remain on the RAM disk until the module is removed.