> ## Documentation Index
> Fetch the complete documentation index at: https://docs.novita.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# How much CPU and memory can a Novita Sandbox have?

> CPU and memory limits by tier, template defaults, creation-time resource settings, and runtime expansion with resize.

A sandbox can have up to 8 vCPU and 8 GiB of memory on the Paid tier, or 2 vCPU and 4 GiB on the Free tier, plus 20 GB of disk. Templates provide defaults, and the SDK or CLI can set creation-time resources or expand a running sandbox with [`resize`](https://docs.novita.ai/guides/sandbox-resize).

## Details

| Limit | Free | Paid | Enterprise |
| - | - | - | - |
| Maximum vCPU per sandbox | 2 | 8 | 8 by default, adjustable |
| Maximum memory per sandbox | 4 GiB | 8 GiB | 8 GiB by default, adjustable |
| Disk per sandbox | 20 GB | 20 GB | 20 GB by default, adjustable |

Configuration rules:

* vCPU must be 1 or an even positive integer, for example 2, 4, or 8.
* Template memory is set in 512 MiB increments, between 0.5 and 4 GiB per vCPU. Runtime expansion requires new memory and disk totals in whole GiB, except when keeping an existing allocation unchanged.
* All resource targets must stay within your account quotas. Resize reports failures separately for each requested resource.

## How to

Set defaults when you build a template, then create sandboxes from it. To override defaults per sandbox, pass [creation-time resources](https://docs.novita.ai/guides/sandbox-create.md#specify-cpu-memory-and-disk); to expand a running sandbox, use [Resize Sandbox](https://docs.novita.ai/guides/sandbox-resize.md). The template-based approach remains available:

```python Python icon="python" theme={"system"}
from novita_sandbox import Novita

novita = Novita()
template = novita.template.new().from_python_image("3.12")
build = novita.template.build(template, "big-worker", cpu_count=4, memory_mb=8192)  # Paid tier

sandbox = novita.sandbox.create(build.template_id)
```

```js JavaScript & TypeScript icon="js" theme={"system"}
import { Novita } from 'novita-sandbox'

const novita = new Novita()
const template = novita.template.new().fromPythonImage('3.12')
const build = await novita.template.build(template, 'big-worker', { cpuCount: 4, memoryMB: 8192 }) // Paid tier

const sandbox = await novita.sandbox.create(build.templateId)
```

Learn more: [Quota Limits](https://docs.novita.ai/guides/sandbox-quota-limit.md) · [Build templates](https://docs.novita.ai/guides/sandbox-template-build-operations.md)

## Related questions

* [How much does Novita Sandbox cost?](https://docs.novita.ai/guides/sandbox-faq-pricing.md)
* [How do I increase my Novita Sandbox concurrency limit?](https://docs.novita.ai/guides/sandbox-faq-concurrency-limit.md)
* [How long can a Novita Sandbox run?](https://docs.novita.ai/guides/sandbox-faq-max-runtime.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.