Skip to main content

What is Ephemeral Storage?

Ephemeral storage is fast, local disk space mounted at /ephemeral on your instance. It uses high-performance NVMe drives directly attached to the host machine, making it significantly faster than the persistent disk for I/O-heavy workloads.
Ephemeral storage is temporary. Data on /ephemeral is lost when you modify, delete, or migrate your instance. It is also not included in snapshots.

When to Use Ephemeral Storage

Ephemeral storage is ideal for data that is large, frequently accessed, and easy to re-download:
  • Model weights downloaded from Hugging Face or other registries
  • Pip/conda caches to speed up environment rebuilds
  • Training checkpoints (back up important ones to persistent disk or cloud storage)
  • Large datasets that can be re-fetched
  • Scratch files from preprocessing or intermediate computation
For data you need to keep, use the persistent disk (your home directory) or snapshots.

Configuring Ephemeral Storage

Ephemeral storage defaults to 0 GB (disabled). You can add it when creating or modifying an instance.
# Create with ephemeral storage
tnr create --ephemeral-disk 200

# Add to an existing instance
tnr modify <instance_id> --ephemeral-disk 200

# Disable ephemeral storage
tnr modify <instance_id> --ephemeral-disk 0

Size Limits

See thundercompute.com/pricing for current ephemeral storage limits by instance mode.

Using Ephemeral Storage

Once configured, the storage is available at /ephemeral inside your instance:
# Check available space
df -h /ephemeral

# Download model weights to ephemeral storage
huggingface-cli download meta-llama/Llama-3-8B --local-dir /ephemeral/llama-3-8b

# Use as pip cache
pip install --cache-dir /ephemeral/pip-cache transformers

What Happens to Ephemeral Data

EventEphemeral dataPersistent disk
Instance runningPreservedPreserved
Modify instanceLostPreserved
Delete instanceLostLost
Create snapshotNot includedIncluded
Restore from snapshotEmptyRestored

Best Practices

  1. Store only re-downloadable data on /ephemeral. Anything important should live on your persistent disk or be backed up to cloud storage.
  2. Use symlinks to redirect cache directories to ephemeral storage:
    mkdir -p /ephemeral/huggingface
    ln -s /ephemeral/huggingface ~/.cache/huggingface
    
  3. Set environment variables to point tools at ephemeral storage:
    export HF_HOME=/ephemeral/huggingface
    export PIP_CACHE_DIR=/ephemeral/pip-cache
    export TRANSFORMERS_CACHE=/ephemeral/huggingface/transformers
    
  4. Back up training checkpoints periodically from /ephemeral to your home directory or cloud storage if you need to keep them.