Introduction (1 of 2)
A RAM Disk is a software layer that enables
applications to transparently use RAM, often a
segment of main memory, as if it were a hard
disk or other secondary storage.
Access time may be greatly improved to files held on
RAM disks compared to data held on other secondary
The volatility of RAM means that data will be lost if
power is lost, e.g. when the computer is turned off.
From privacy point of view, RAM disk is also a working
drive for decrypted version of encrypted documents.
08.02.2010 Ram Disk 2
Introduction (2 of 2)
A RAM disk can perfectly be used to store
web content of web servers.
temporary index files and tables of database servers ( MS-SQL-Server,
temporary files ( TEMP and TMP environment variable) and
“Temporary Internet Files”
the scratch disk for Adobe (R) Photoshop (R).
games and installed programs. The startup times of programs may
audio and video capture / editing.
creation and playback of slide shows.
the printer spool folder.
data that has to be written to CD, to prevent underrun during the
as storage of the “ReadyBoost” cache on Vista.
all kinds of data that may be lost (or MUST be lost for security
reasons) at shutdown.
08.02.2010 Ram Disk 3
Computer Architecture Overview
Central processing unit (CPU, or simply a processor)
It actually operates on data, performs any calculations, and
controls all the other components
Processor cache is an intermediate stage between ultra-fast
registers and much slower main memory. It's introduced solely to
increase performance of the computer (primary cache and
Random access memory (usually known by its acronym,
It is directly or indirectly connected to the CPU via a memory bus.
It is actually comprised of two buses (not on the diagram): an
address bus and a data bus.
fast but temporary storage
Hard Disk (Secondary storage)
is not directly accessible by the CPU. The computer usually uses
its input/output channels to access secondary storage and
transfers the desired data using intermediate area in primary
storage. The time taken to access a given byte of information
stored on a hard disk is typically a few thousandths of a second, or
The time taken to access a given byte of information
stored in RAM is measured in billionths of a second, or
08.02.2010 Ram Disk 4
RAM Disk utilities
There are plenty of utilities available in Windows
“RAMDisk” for Windows 2000 / XP / Server 2003 /
Vista / Server 2008 / Windows 7
ImDisk Virtual Disk Driver
Other operation systems
tmpfs - a modern way of using RAM under Unix-like
mdconfig - RAM disk in FreeBSD
08.02.2010 Ram Disk 5
RAM disk utilities: Microsoft Ramdisk (1 of 4)
Microsoft Ramdisk is a sample that demonstrates a
software-only Windows(r) 2000 device driver. This
driver creates a RAM disk drive of a specified size.
You can use this Ramdisk like any other disk, but the
contents of the disk are lost when you shut down
Source code only
DDK is needed (not free)
This sample provides an example of a minimal driver.
Neither the driver nor the sample programs are intended
for use in a production environment. Rather, they are
intended for educational purposes and as a skeletal
version of a driver.
64 Mb size disk limit
08.02.2010 Ram Disk 6
RAM disk utilities: “RAMDisk” (2 of 4)
The RAMDisk “Enterprise” covers following features:
One unique 32-bit and 64-bit versions that runs on all 32-bit (64-bit) versions of Windows 2000 , XP ,
Server 2003/2008 and Vista (monoprocessor or multiprocessor )
Auto formatting to FAT12 , FAT16 , FAT32 or NTFS / NTFS with compression
Auto resizing to the maximal available (or allowed) ramdisk size
Comprehensive fine tuning of the available memory to balance maximal ramdisk size against OS
Easy to use and to configure from within the device tree of Device Manager
Increased ramdisk sizes, theoretically to up to 64 GB using PAE (Physical Address Extension) and if
supported by the OS. (The /PAE switch may be needed in boot.ini on systems that use more than 4 GB
Ability to load a raw disk image to format and populate the ramdisk at driver initialization (load speed
: ~ 30 sec/GB using an image stored on a mode 4 IDE ATA HD with a 1.2 Ghz processor).
Ability to save the content to a raw disk image at shutdown and at regular intervals or at particular
The ramdisk is available for the 32-bit and 64-bit OS's
This RAMDisk has the capability to automatically reload an image file at boot time ( and before other
services / programs are started ) and to save the ramdisk content at shutdown and/or at regular
08.02.2010 Ram Disk 7
RAM disk utilities: Ramdisk (3 of 4)
Freeware RRamdisk.sys, originally written by Gavotte
based on Microsoft’s Ramdisk.sys.
It stable, doesn’t have size limitation, supports popular
FAT16, FAT32, NTFS file systems, and supports Windows
2000 operating system and above including Vista.
Installation is not needed
It doesn’t support command line
Not good documentation
No official web-site (only web-blog is available)
08.02.2010 Ram Disk 8
RAM disk utilities: ImDisk Virtual Disk Driver (4 of 4)
ImDisk is a virtual disk driver for Windows
It can use one or more disk image files to create virtual
hard disk, floppy or CD/DVD drives.
The install package installs a console-mode control
program called imdisk.exe and a Control Panel applet.
Possible to run the ImDisk driver automatically at boot
On Vista (32-bit and 64-bit versions) and Server 2008 you
need to either turn off UAC, User Access Control, or setup
the driver to auto-load on system startup.
08.02.2010 Ram Disk 9
imdisk -a -s 1Gb -m r: (imdisk -a -s 200Mb -m r:)
format r: /fs:FAT32 /V:RamDisk /Q /y
imdisk -d -m r:
08.02.2010 Ram Disk 10
Windows Sysinternals: Junction
Windows 2000 and higher supports directory symbolic links, where a
directory serves as a symbolic link to another directory on the
For example, if the directory D:SYMLINK specified C:WINNTSYSTEM32 as
its target, then an application accessing D:SYMLINKDRIVERS would in
reality be accessing C:WINNTSYSTEM32DRIVERS.
Directory symbolic links are known as NTFS junctions in Windows.
Windows comes with no tools for creating junctions—you have to
purchase the Win2K Resource Kit, which comes with the linkd program
for creating junctions.
Mark Russinovich has written his own junction-creating tool: Junction.
Junction not only allows you to create NTFS junctions, it allows you to see if
files or directories are actually reparse points. Reparse points are the
mechanism on which NTFS junctions are based, and they are used by
Windows' Remote Storage Service (RSS), as well as volume mount points.
> junction.exe x:temp c:temp
08.02.2010 Ram Disk 11
RAM disk utilities
“RAMDisk” for Windows 2000 / XP / Server 2003 / Vista /
Server 2008 / Windows 7
ImDisk Virtual Disk Driver
Memory Support and Windows Operating Systems
Computer data storage
Physical Address Extension
08.02.2010 Ram Disk 12