Basic usage
The simplest way to create a RAM disk is with a minimal command that specifies the file system type and mount point.Open Command Prompt as Administrator
Right-click on Command Prompt or PowerShell and select “Run as administrator”. Administrator privileges are required to mount file systems.
Run memefs with basic options
Execute the following command to mount a RAM disk on drive R:This command:
-i: Enables case-insensitive file system (Windows standard)-F NTFS: Sets the file system name to NTFS-u "": Uses disk mode (not network/UNC mode)-m R:: Mounts the RAM disk as drive R:
Command-line options
Memefs provides several options to customize your RAM disk:Essential options
| Option | Description | Example |
|---|---|---|
-m | Mount point (drive letter or *) | -m R: |
-F | File system name | -F NTFS |
-i | Case-insensitive file system | -i |
-u | UNC prefix for network mode | -u "\\Server\\Share" |
Memory and performance
| Option | Description | Example |
|---|---|---|
-s | Maximum total memory size in bytes | -s 4294967296 (4GB) |
-f | Flush and purge cache on cleanup | -f |
-l | Volume label name | -l RamDisk |
Advanced options
| Option | Description | Example |
|---|---|---|
-d | Debug flags (-1 for all) | -d -1 |
-D | Debug log file path | -D debug.log |
-S | Root SDDL security descriptor | -S "D:P(A;;FA;;;WD)" |
Common scenarios
Create a RAM disk with size limit
Limit the RAM disk to 2GB of memory:-s 2147483648 parameter limits total memory usage to 2GB (2 × 1024 × 1024 × 1024 bytes).
Create a RAM disk with custom label
Give your RAM disk a recognizable name:Create a RAM disk with all options
A production-ready configuration with 4GB limit and custom label:- Creates a case-insensitive NTFS RAM disk
- Limits memory to 4GB
- Flushes and purges cache on cleanup
- Labels the disk as “RAM Cache”
- Mounts on drive R:
Network/UNC mode
Mount the RAM disk as a network share instead of a drive letter:\\memefs\share.
When using UNC mode with
-u, you can omit the -m parameter or use -m * to skip drive letter assignment.Using with WinFsp launchctl
If you installed the WinFsp Launcher Service component, you can manage memefs using launchctl:Start a RAM disk service
Stop the service
Check service status
Troubleshooting
Drive letter already in use
If you see an error about the mount point being in use, choose a different drive letter:Insufficient privileges
Memefs requires administrator privileges. Always run as administrator or you’ll see access denied errors.WinFsp not found
If memefs can’t find WinFsp, ensure:- WinFsp is installed correctly
- The
winfsp-x64.dllis in the same directory asmemefs-x64.exe - WinFsp is installed in the default location:
C:\Program Files (x86)\WinFsp\
Next steps
Now that you have a working RAM disk:- Configure automatic mounting on startup using Task Scheduler
- Integrate the RAM disk into your development workflow
- Experiment with different memory limits and options
- Monitor memory usage to optimize the
-ssize parameter
For debug logging and troubleshooting, use the
-D option to write logs: