Skip to main content
This page provides practical examples of using WinFsp-MemFs-Extended for various use cases.

Basic usage

Create a simple 1GB RAM disk

memefs -s 1073741824 -m R:
This creates a basic 1GB RAM disk mounted to drive R:. The filesystem is case-sensitive by default.

Create a 2GB RAM disk with auto-assigned drive letter

memefs -s 2147483648 -m *
The * wildcard automatically selects the next available drive letter.

Development and compilation

Temporary build cache

Speed up compilation by using a RAM disk for build artifacts:
memefs -s 8589934592 -m B: -i -F NTFS -l "Build Cache"
Then configure your build system:
# CMake
cmake -B B:\build -S .

# Visual Studio
# Set intermediate directory to B:\obj
# Set output directory to B:\bin
Benefits:
  • Significantly faster compilation times
  • Reduced SSD wear
  • Clean state on every boot

Node.js development with node_modules

Store node_modules on a RAM disk to speed up package installation and builds:
memefs -s 4294967296 -m N: -i -F NTFS -l "node_modules"
Create a junction point in your project:
cd C:\Projects\MyApp
mklink /J node_modules N:\MyApp\node_modules

Web development

Local development server cache

Use a RAM disk for temporary files, sessions, and cache:
memefs -s 2147483648 -m T: -i -f -l "Dev Temp"
The -f flag ensures cache is properly flushed on cleanup. Configure your application:
// Node.js/Express
app.use(session({
  store: new FileStore({ path: 'T:\\sessions' }),
  // ...
}));
// PHP
ini_set('session.save_path', 'T:\\sessions');
ini_set('upload_tmp_dir', 'T:\\uploads');

Browser profile for testing

Run browser testing with disposable profiles:
memefs -s 1073741824 -m P: -i -l "Browser Profiles"
Launch Chrome with RAM disk profile:
chrome.exe --user-data-dir=P:\chrome-test

Database development

Temporary test database

Create a RAM disk for fast database testing:
memefs -s 4294967296 -m D: -i -F NTFS -l "Test DB"
SQLite:
sqlite3 D:\test.db
PostgreSQL (configure data directory):
initdb -D D:\pgdata
pg_ctl -D D:\pgdata start
MySQL (configure tmpdir):
[mysqld]
tmpdir = D:\mysqltmp

Media and content creation

Video editing scratch disk

Use a RAM disk for video editing preview files and cache:
memefs -s 17179869184 -m V: -i -F NTFS -l "Video Cache"
Configure your video editor:
  • Adobe Premiere Pro: Preferences → Media Cache → Media Cache Database/Files to V:\
  • DaVinci Resolve: Preferences → Media Storage → Cache to V:\cache

Image processing temporary storage

memefs -s 8589934592 -m I: -i -l "Image Temp"
Configure Photoshop scratch disk to I:\ for faster performance.

Network sharing

Create a network-accessible RAM share

memefs -s 2147483648 -u \\localhost\\RamCache -i -F NTFS -l "Shared RAM"
This creates a UNC path accessible over the network at \\localhost\RamCache.

File transfer staging area

memefs -s 4294967296 -m T: -i -l "Transfer"
Use for temporary file transfers:
# Copy files to RAM disk first, then transfer
copy large-file.zip T:\
robocopy T:\ \\remote\share\ large-file.zip /Z /R:3

Testing and CI/CD

Continuous integration temporary workspace

memefs -s 10737418240 -m W: -i -F NTFS -l "CI Workspace"
Configure CI runner to use W:\ as workspace:
# GitHub Actions (if running on Windows)
- name: Setup RAM disk
  run: memefs -s 10737418240 -m W: -i -F NTFS -l "CI"
  
- name: Checkout
  uses: actions/checkout@v3
  with:
    path: W:\repo

Automated testing

Create isolated test environments:
memefs -s 2147483648 -m T: -i -f -l "Test Env"
Run tests with temporary files:
import os
import tempfile

# Override temp directory
os.environ['TEMP'] = 'T:\\'
os.environ['TMP'] = 'T:\\'

# Run tests
pytest --basetemp=T:\\pytest

Advanced configurations

High-security temporary storage

RAM disk with custom security descriptor:
memefs -s 1073741824 -m S: -i -F NTFS -l "Secure" -S "D:P(A;;FA;;;WD)"
Data is never written to disk and is automatically erased when unmounted.

Multiple RAM disks

Create specialized RAM disks for different purposes:
# Build artifacts
memefs -s 8589934592 -m B: -i -F NTFS -l "Build"

# Temp files
memefs -s 2147483648 -m T: -i -f -l "Temp"

# Cache
memefs -s 4294967296 -m C: -i -F NTFS -l "Cache"

Case-sensitive development environment

For cross-platform development requiring case sensitivity:
memefs -s 4294967296 -m L: -F NTFS -l "Linux Dev"
Note: -i flag is not used, making the filesystem case-sensitive like Linux.

Performance optimization

Maximize performance for intensive workloads

memefs -s 17179869184 -m P: -F NTFS -l "Performance"
Tips:
  • Omit -f flag to avoid flush-on-cleanup overhead
  • Omit -i if case sensitivity isn’t needed (slight performance gain)
  • Allocate sufficient size to avoid out-of-space errors
  • Use dedicated RAM disk for each workload type

Memory-constrained systems

For systems with limited RAM:
memefs -s 536870912 -m R: -i -f -l "Small RAM"
This creates a 512MB RAM disk with aggressive cleanup (-f flag).

Gaming

Game shader cache

memefs -s 4294967296 -m G: -i -F NTFS -l "Game Cache"
Point game shader cache to G:\:
  • Steam: Shader Pre-Caching location
  • DirectX: Shader cache location

Reduce game loading times

Copy frequently-played games to RAM disk:
memefs -s 34359738368 -m G: -i -F NTFS -l "Games"
robocopy "C:\Games\MyGame" G:\MyGame /E /MT:8

Debugging

Enable debug logging

memefs -s 1073741824 -m R: -i -d -1 -D C:\Logs\memefs.log
This enables all debug logs (-d -1) and writes them to a file.

Debug to console

memefs -s 1073741824 -m R: -i -d -1 -D -
The -D - option outputs debug logs to stderr for real-time monitoring.

Build docs developers (and LLMs) love