/mnt/local. Use this storage for temporary data such as intermediate training artifacts, caches, render outputs, or logs. This page is for workload authors who need fast scratch space close to compute and want to understand how to request it safely on CoreWeave Kubernetes Service (CKS).
Pod container filesystems (the writable layer created by the container runtime) and Kubernetes emptyDir volumes are stored on this NVMe-backed storage by default, through kubelet and containerd directories under /mnt/local. As a result, most workloads benefit from local storage without any additional configuration.
Local storage applies to workloads running on CoreWeave Kubernetes Service (CKS). Data is non-persistent and may be lost when a Pod is deleted or when the Node reboots (for example, during maintenance or failure).
Recommended emptyDir volumes
For most scratch-storage use cases, useemptyDir volumes. emptyDir is the standard Kubernetes mechanism for Node-local scratch space. An emptyDir volume is created when a Pod is scheduled onto a Node and is deleted automatically when the Pod is removed.
On CoreWeave, emptyDir volumes have the following characteristics:
-
Backed by NVMe: Data is stored under the kubelet Pod directories on
/mnt/local, an encrypted NVMe RAID array dedicated to ephemeral workload storage. This provides high throughput and low latency for scratch workloads. -
Better for heavy writes: Writes to an
emptyDirvolume go directly to the underlying filesystem, avoiding the copy-on-write overhead of the container image overlay filesystem. For large or write-heavy scratch data, useemptyDirinstead of writing to arbitrary paths in the container root filesystem.
Set the amount of local ephemeral storage
Size youremptyDir volume to match the scratch space your workload needs. This protects the Node from runaway usage and helps the scheduler place your Pod correctly.
The amount of available local ephemeral storage depends on the Node type. For information on ephemeral storage size per instance type, see GPU instances and CPU-only instances.
For ephemeral storage above 20Gi, include the size in the workload’s resource request. This lets the scheduler place the Pod on a Node with enough capacity.
The following example shows where to set the size limit for an emptyDir volume:
Advanced hostPath volumes
hostPath volumes mount a specific directory on the Node’s filesystem directly into a Pod. Usually, emptyDir is the right choice for scratch storage. Use hostPath only when you explicitly need to access a specific path on the Node’s filesystem (for example, a legacy application that expects a hard-coded directory under /mnt/local).
The following example shows where to set a hostPath volume:
hostPath, keep the following points in mind:
- Understand the trade-offs:
hostPathbypasses Kubernetes storage isolation and couples your Pod to a particular Node layout. Volumes aren’t cleaned up automatically, and you’re responsible for managing path uniqueness, cleanup, and avoiding conflicts with other workloads. - Remember data is ephemeral: Data on
/mnt/localdoes not survive a Node reboot. For details on encryption and the data lifecycle, see RAID layout and throughput.
RAID layout and throughput
Local storage is assembled from the Node’s local NVMe drives into a software RAID array, formatted as XFS, and mounted at/mnt/local. The RAID layout depends on how many local NVMe drives the Node has, which varies by instance type:
| Local NVMe drives | RAID layout | Throughput characteristics |
|---|---|---|
| 2 to 3 drives | RAID1 (mirror) | Reads can split across the drives. Writes are about the speed of a single drive, because data is mirrored rather than striped. |
| 4 or more drives | RAID10 (striped mirror) | High parallel read and write throughput that scales with the number of drives and the concurrency of the workload. |
cat /proc/mdstat or lsblk.
Local storage is encrypted at rest with a key held only in memory. The key is discarded when the Node reboots, which crypto-shreds the data and makes it unrecoverable. Combined with the non-persistent nature of local storage, this means data never survives a reboot.
What backs the temporary directory
The directory that backs/tmp depends on the environment, so do not assume /tmp is fast NVMe scratch space. The backing differs across CKS Pods and SUNK Slurm jobs:
| Environment | What backs /tmp |
|---|---|
| Generic CKS Pod | The container’s writable layer (an overlay), which sits on the NVMe RAID under /mnt/local. |
SUNK Slurm, bare srun (no container) | The Node’s local NVMe RAID array (/dev/md127). |
SUNK Slurm, inside an enroot or Pyxis container (srun --container-image) | tmpfs (RAM), sized to a fraction of Node memory. Writing large amounts of data to /tmp consumes RAM, not disk, and can fail with ENOSPC even when disk-usage metrics look clean. |
/tmp on a Node, run findmnt -no SOURCE,FSTYPE /tmp (or df -h /tmp). A tmpfs source means /tmp is RAM-backed.
For deterministic, NVMe-backed scratch space in a CKS Pod, use an emptyDir volume rather than /tmp. For SUNK Slurm jobs, including how to redirect temporary files off tmpfs, see Node-local storage and /tmp on Slurm nodes.
Benchmark local storage
When you benchmark local storage, target the actual NVMe-backed volume and use a concurrent workload. Two common mistakes make local storage look slower than it is:- Benchmarking
/tmpinstead of NVMe. In a SUNK enroot or Pyxis container,/tmpistmpfs(RAM), which inflates results and does not represent NVMe. Point your benchmark at a defaultemptyDir(notmedium: Memory) or a known path under/mnt/localinstead. See What backs the temporary directory. - Using a single stream. A single-stream tool such as
dd, orfiowithnumjobs=1, is latency-bound and understates a striped RAID10 array, which needs many parallel I/Os to reach full bandwidth.
fio command measures write bandwidth with 12 concurrent jobs against a mounted scratch directory. Replace /scratch with the mount path of your emptyDir or NVMe-backed volume.
runtests.sh script, and point its target path at your NVMe-backed volume.