- RAM disk
-
This article is about virtual drives emulated with software. For hardware storage devices using RAM, see solid-state drive. For filesystems without drive emulation, see tmpfs.
A RAM disk or RAM drive is a block of RAM (primary storage or volatile memory) that a computer's software is treating as if the memory were a disk drive (secondary storage). It is sometimes referred to as a "virtual RAM drive" or "software RAM drive" to distinguish it from a "hardware RAM drive" that uses separate hardware containing RAM, which is a type of solid-state drive.
Contents
Performance
The performance of a RAM disk is in general orders of magnitude faster than other forms of storage media, such as an SSD, hard drive, tape drive, or optical drive.[1] This performance gain is due to multiple factors, including access time, maximum throughput and type of file system, as well as others.
File access time is greatly decreased since a RAM disk is solid state (no mechanical parts). A physical hard drive or optical media, such as CD-ROM, DVD, and Blu-ray must move a head or optical eye into position and tape drives must wind or rewind to a particular position on the media before reading or writing can occur. RAM disks can access data with only the memory address of a given file, with no movement, alignment or positioning necessary.
Second, the maximum throughput of a RAM disk is limited by the speed of the RAM, the data bus, and the CPU of the computer. Other forms of storage media are further limited by the speed of the storage bus, such as IDE (PATA), SATA, USB, Serial or LPT (Parallel). Compounding this limitation is the speed of the actual mechanics of the drive motors, heads and/or eyes.
Third, the file system in use, such as FAT, NTFS, HFS, USBFS, ext2, etc, uses extra accesses, reads and writes to the drive, which although small, can add up quickly, especially in the event of many small files vs. few larger files (temporary internet folders, web caches, etc).
Because the storage is in RAM, it is volatile memory, which means it will be lost in the event of power loss, whether intentional (computer reboot or shutdown) or accidental (power failure). This is sometimes desirable: for example, when working with a decrypted copy of an encrypted file, or for storing a web cache (doing this on a RAM disk can also improve the speed of loading pages).[2]
In many cases, the data stored on the RAM disk is created, for faster access, from data permanently stored elsewhere, and is re-created on the RAM disk when the system reboots.
Implementation
Software RAM disks use the normal RAM in main memory as if it were a partition on a hard drive rather than actually accessing the data bus normally used for secondary storage. Though RAM disks can often be supported directly from the operating system via special mechanisms in the operating system kernel, it is possible to also create and manage a RAM disk by way of a user space application process.[3] Usually no battery backup is needed due to the temporary nature of the information stored in the RAM disk, but an uninterruptible power supply can keep the entire system running during a power outage, if necessary.
Some RAM disks use a compressed filesystem such as cramfs to allow compressed data to be accessed on the fly, without uncompressing it first. This is convenient because RAM disks are often small due to the higher price per byte than conventional hard drive storage.
History and operation-system specificities
The first software RAM disk for microcomputers was invented and written by Jerry Karlin in the UK in 1979/80. The software, known as the Silicon Disk System was further developed into a commercial product and marketed by JK Systems Research which became Microcosm Research Ltd when the company was joined by Peter Cheesewright of Microcosm Ltd. The idea was to enable the early microcomputers to use more RAM than the CPU could directly address. Making bank-switched RAM behave like a disk drive was much faster than the disk drives - especially in those days before hard drives were readily available on such machines.
The Silicon Disk was launched in 1980, initially for the CP/M operating system and later for MS-DOS. Due to the limitations in memory addressing on Apple II series and Commodore computers, a RAM disk was also a popular application on Commodore 64 and Commodore 128 systems with RAM Expansion Units and on Apple II series computers with more than 64kB of RAM. Apple Computer supported a software RAM drive natively in ProDOS: on systems with 128kB or more of RAM, ProDOS would automatically allocate a RAM drive named /RAM.
Microsoft added a RAM disk to MS-DOS (version 2.0) in 1983. AmigaOS has had a built in RAM disk since the release of version 1.2 in 1986 and still has it in AmigaOS 4.1 (2010). Apple Computer added the functionality to the Apple Macintosh with System 7's Memory control panel in 1991, and kept the feature through the life of Mac OS 9. Mac OS X users can use the hdid, newfs (or newfs_hfs) and mount utilities to create, format and mount a RAM disk.
Many Unix and Unix-like systems provide some form of RAM disk functionality. In Linux and similar systems, besides the more traditional /dev/ram, another way to store files in RAM is provided by tmpfs. RAM disks are particularly useful in high-performance, low-resource applications for which Unix-like operating systems are sometimes configured. There are also a few specialized "ultra-lightweight" linux distributions which are designed to booted from removable media and stored in a ramdisk for the entire session. Puppy Linux is the best-known of these.
See also
- List of RAM disk software
- Cache, an area to store transient copies of data being written to, or repeatedly read from, a slower device
- tmpfs, a common ramdisk filesystem
References
- ^ Kind, Tobias. "RAMDISK Benchmarks". University of California. http://fiehnlab.ucdavis.edu/staff/kind/Collector/Benchmark/RamDisk/ramdisk-benchmarks.pdf. Retrieved 2011-04-22.
- ^ Using a RAM disk for browsing the web on Macs; Using a RAM disk to improve security in firefox
- ^ AppDisk for the classic Mac OS is one example still on the market of a user space ramdisk utility.
External links
- Unix shell script and command line to create a RAM disk on Mac OS X
- Sample code from microsoft to create RAM disk
- [1] Benchmark of some Windows RAM Disks
Main companies Hyperion Entertainment • ACube Systems • A-Eon Technology • (Former license holder: Amiga, Inc.)Compatible hardware A1200(*) • A3000(*) • A3000T(*) • A3000UX(*) • A4000(*) • A4000T(*) • AmigaOne SE • AmigaOne XE • Micro-A1 • Pegasos II • Sam440ep • Sam440ep-flex • Sam460ex • Sam460ex Lite • AmigaOne X1000
(*) PowerPC accelerator board requiredOS4 software OS4 games Abuse • Aquaria • The Battle for Wesnoth • Cave Story • Gorky 17 • Lincity • Lugaru • Monkey Island 3 • Quake II • Stratagus • Warcraft II • more...Technologies AmigaDOS • Amigaguide • ARexx • "The Grim Reaper" • Petunia (JIT) • RAM disk • ReAction GUI • Exec/WarpOS • WorkbenchRelated and historical Amiga • AmigaOS • Amiga history • The AmigaOS 4 dispute • Amiga Forever • Intuition • Models and variants • Kickstart • more...AmigaOS Amiga technologies AmigaBASIC • AmigaDOS • Amigaguide • ARexx • Blitter object • Exec/WarpOS • Guru Meditation • Hunk • Intuition • Kickstart • RAM disk • WorkbenchAmiga GUIs File systems OS versions 68k-based: 1.0, 1.1, 1.2, 1.3, 1.4 (beta) • 2.0, 2.04, 2.05, 2.1 • 3.0, 3.1, 3.5, 3.9
PowerPC-based: 4.0, 4.1Software packs Amiga Forever • AmiKitOther software Influenced Hardware Components File systems Software Games Aquaria • The Battle for Wesnoth • Fortis • Knights and Merchants • OpenTTD • Robin Hood • Quake III • Stratagus • more...Categories:- Solid-state computer storage media
- Linux file systems
Wikimedia Foundation. 2010.