# Cloudflare Computer Workspace Storage Limits and Memory Considerations

> Understand Cloudflare Computer Workspace storage limits & memory constraints. Learn how 10GB durable storage & RAM usage impact agent-scale workloads, not large monorepos.

- Repository: [Cloudflare/computer](https://github.com/cloudflare/computer)
- Tags: deep-dive
- Published: 2026-08-16

---

**Each Cloudflare Computer Workspace supports approximately 10 GB of durable SQLite storage within a Durable Object, but container backends materialize the entire filesystem tree in RAM, restricting practical usage to agent-scale workloads rather than large monorepos.**

The `cloudflare/computer` repository implements a **Workspace** as a durable, SQLite-backed virtual filesystem that lives inside a Cloudflare Durable Object (DO). Understanding the interplay between the 10 GB storage ceiling and the in-memory container representation is essential for designing performant agent architectures that avoid resource exhaustion.

## Storage Architecture and the 10 GB Limit

The Workspace persists all file metadata and bytes to the same SQLite database that powers its host Durable Object, creating a hard boundary on capacity.

### The SQLite Storage Ceiling

According to [`packages/computer/README.md`](https://github.com/cloudflare/computer/blob/main/packages/computer/README.md), each Workspace shares roughly **10 GB** of storage with its host DO. This limit is not arbitrary; it reflects the maximum SQLite storage capacity of a single Durable Object. The schema documented in [`docs/03_filesystem_schema.md`](https://github.com/cloudflare/computer/blob/main/docs/03_filesystem_schema.md) stores file contents in the `vfs_blob_bytes` table, confirming that the Workspace consumes the same storage quota as other DO state like KV entries or Durable Object metadata.

### Shared Resource Constraints

Because the Workspace and the host Durable Object share a single SQLite database, any storage consumed by DO state or other metadata directly reduces the free quota available for filesystem data. Architects must monitor total DO storage usage, not just Workspace files, to avoid hitting the ceiling.

## Memory Considerations for Container Backends

While storage is durable and disk-backed, the runtime memory profile depends entirely on the selected backend implementation.

### In-Memory Filesystem Trees

When using a **container-backend**, the entire filesystem tree—including all metadata and in-memory inode structures—is loaded into the container's RAM before being exposed through FUSE. As implemented in [`packages/computer/src/workspace.ts`](https://github.com/cloudflare/computer/blob/main/packages/computer/src/workspace.ts), this design makes metadata operations like `stat`, `mkdir`, `rm`, and directory traversal extremely fast, but it consumes memory linearly with the number of files and directories.

### Agent-Scale Design Philosophy

The system is explicitly optimized for **agent-scale** workloads ranging from a few hundred megabytes to a few gigabytes. It is *not* intended to host multi-gigabyte monorepos, full source trees, or large media archives. While metadata operations remain fast due to RAM caching, heavy sequential I/O still hits the underlying SQLite storage and can be slower than native disk.

## Optimizing Storage with Chunked Blobs and R2

To remain within the 10 GB SQLite limit while handling larger datasets, Cloudflare Computer employs a hybrid storage strategy that offloads bulk data to object storage.

### Content-Addressed Chunking

Files are broken into **512 KiB** chunks stored as content-addressed blobs in the SQLite database. Small, frequently changed files stay fast and atomic, but large binary blobs can quickly exhaust the 10 GB quota if stored directly in the Workspace.

### Offloading to R2 Mounts

For datasets exceeding agent-scale limits, mount an R2 bucket as a read-only filesystem within the Workspace. As detailed in [`docs/03_filesystem_schema.md`](https://github.com/cloudflare/computer/blob/main/docs/03_filesystem_schema.md), R2 mounts appear as directories (e.g., `/workspace/r2`) and store their payload in R2 rather than SQLite, freeing the 10 GB quota for metadata and small files. The Workspace treats these mounts as read-only, allowing agents to reference large datasets without loading them into the DO's SQLite database.

## Practical Implementation Examples

Monitor your Workspace size programmatically and migrate large assets to R2 to stay within limits.

### Calculating Workspace Size

Recursively traverse the filesystem to sum file sizes before they impact container memory:

```typescript
// Example: checking the overall size of a Workspace (agent-scale approach)
using ws = await getWorkspace(env.MyDO.get(id));

// Walk the tree and sum file sizes (bytes)
async function totalSize(dir = "/"): Promise<number> {
  let size = 0;
  for (const entry of await ws.fs.readdir(dir, { limit: 500 })) {
    const path = `${dir}/${entry.name}`;
    if (entry.isDirectory) {
      size += await totalSize(path);
    } else {
      const info = await ws.fs.stat(path);
      size += info?.size ?? 0;
    }
  }
  return size;
}

const bytes = await totalSize("/workspace");
console.log(`Workspace holds ${(bytes / 1_048_576).toFixed(2)} MiB`);

```

### Migrating Large Files to R2

Offload large binaries to R2 mounts to preserve SQLite space and avoid memory pressure:

```typescript
// Example: off-loading a large file to an R2 bucket to stay under the 10 GB limit
// (Assumes a read-only R2 mount at /workspace/r2 configured in the Workspace)

// Avoid writing large files directly to SQLite
// await ws.fs.writeFile("/large-data.bin", someHugeUint8Array); // Risky

// Instead, configure the Workspace with an R2 mount
new Workspace({
  storage: ctx.storage,
  mounts: { "/workspace/r2": R2Bucket(env.BUCKET) },
});

// Now read large files from the mount without consuming DO storage
const file = await ws.fs.readFile("/workspace/r2/large-dataset.bin");

```

## Summary

- **10 GB storage cap**: Each Workspace shares approximately 10 GB of SQLite storage with its host Durable Object, as defined in [`packages/computer/README.md`](https://github.com/cloudflare/computer/blob/main/packages/computer/README.md).
- **In-memory container overhead**: Container backends load the entire filesystem metadata into RAM, limiting practical Workspace size to a few gigabytes for comfortable memory usage.
- **Chunked storage**: Files split into 512 KiB content-addressed chunks in the `vfs_blob_bytes` table, optimizing small file performance.
- **R2 offloading**: Mount R2 buckets for large, read-only datasets to avoid SQLite storage limits and memory pressure.

## Frequently Asked Questions

### What is the maximum size of a Cloudflare Computer Workspace?

Each Workspace can store approximately **10 GB** of data, shared with the host Durable Object's SQLite storage. This limit includes all file bytes, metadata, and any other DO state stored in the same database.

### Why does my Workspace consume so much RAM?

When using the container backend, the entire filesystem tree is materialized in-memory to enable fast FUSE operations. This design prioritizes metadata operation speed over memory efficiency, making the system suitable for agent-scale workloads of a few hundred megabytes to a few gigabytes, but not for massive file trees.

### Can I store large media files in a Workspace?

You *can* store files up to the 10 GB limit, but large binary blobs are better suited for R2 mounts. The Workspace supports mounting R2 buckets as read-only directories (e.g., `/workspace/r2`), keeping the SQLite database free for metadata and small files while avoiding the memory overhead of loading large inodes into RAM.

### How do I check my current Workspace storage usage?

Use the `ws.fs.readdir()` and `ws.fs.stat()` methods to recursively walk the filesystem and sum file sizes. For production monitoring, implement periodic checks using the traversal pattern shown above to ensure you remain below both the 10 GB storage cap and comfortable memory thresholds for your container size.