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

# CPU and RAM

## Configuring CPU and Memory

In addition to choosing a GPU, you can choose the amount of CPU and Memory to allocate:

```python theme={null}
from beam import function

@function(cpu=2, memory="2Gi")
def some_function():
    pass
```

*GPU graphics cards* have VRAM and run on *servers* with RAM.

### RAM vs. VRAM

VRAM holds model weights, activations, and GPU working memory. Host RAM is separate and is used by the CPU, model loading, and application processes. Increasing the `memory` argument changes host RAM, not GPU VRAM.

Model fit depends on precision, quantization, context length, batch size, and the serving engine. Measure peak usage for your workload rather than selecting hardware by parameter count alone. Disk capacity is separate again: a streaming download can require substantial disk space without keeping the entire file in RAM.

Numeric SDK memory values are MiB; strings such as `"2Gi"` and `"512Mi"` are also accepted. CPU values represent cores, including supported fractional values. Configuration through the MCP `update_config` tool uses **millicores** for `runtime.cpu` (1000 for one CPU).

### Monitoring Resource Usage

In the web dashboard, you can monitor the amount of CPU, Memory, and GPU memory used for your tasks.

On a deployment, click the `Metrics` button.

<Frame>
  <img src="https://mintcdn.com/slai-beam/vg5aTEbpFmupCYom/img/v2/metrics-page.png?fit=max&auto=format&n=vg5aTEbpFmupCYom&q=85&s=892838046664b631fed15fb59e169347" width="1489" height="393" data-path="img/v2/metrics-page.png" />
</Frame>

On this page, you can see the resource usage over time. The graph will also show the periods when your resource usage exceeded the resource limits set on your app:

<Frame>
  <img src="https://mintcdn.com/slai-beam/vg5aTEbpFmupCYom/img/v2/resource-usage.png?fit=max&auto=format&n=vg5aTEbpFmupCYom&q=85&s=953880a5b2fa49c8894e0d9ff2aa2e96" width="2112" height="718" data-path="img/v2/resource-usage.png" />
</Frame>

See [observability](/v2/operations/observability) for logs and resource timeseries, and [GPU acceleration](/v2/environment/gpu) for live hardware availability.


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