# resources

Generated from the code · as of CLI 0.6.0

How much CPU, memory and disk the arc needs.

- **Type:** map
- **Required:** no
- **Errors:** [`overlay-parse`](https://docs.omniarc.eu/errors/overlay-parse.md)

All three keys are optional. A value you leave out is simply not declared for the arc. These describe the arc as a whole, not one container. Limits for a single container stay in compose, with `mem_limit` or `deploy.resources`.

A quantity that cannot be read is refused with the key it was written under.

```yaml
resources: { cpu: "2", memory: 2Gi, disk: 10Gi }
```

## `resources.cpu`

How much CPU the arc needs.

- **Type:** string or number, greater than zero
- **Required:** no
- **Errors:** [`overlay-parse`](https://docs.omniarc.eu/errors/overlay-parse.md)

Whole or fractional cores (`2`, `1.5`), or thousandths of a core with an `m` suffix (`500m`). Zero is refused.

## `resources.memory`

How much memory the arc needs.

- **Type:** string with a unit, `Mi` or `Gi`
- **Required:** no
- **Errors:** [`overlay-parse`](https://docs.omniarc.eu/errors/overlay-parse.md)

A whole number and a unit: `512Mi` or `2Gi`. A bare number such as `1024` is refused instead of guessed at, and so are other spellings such as `2GB`.

## `resources.disk`

How much disk the arc needs.

- **Type:** string with a unit, `Mi` or `Gi`
- **Required:** no
- **Errors:** [`overlay-parse`](https://docs.omniarc.eu/errors/overlay-parse.md)

Written the same way as `memory`: a whole number and `Mi` or `Gi`, for example `10Gi`.

**Example: shop/arc.yaml**

```yaml
arc: shop
edge: { service: web, port: 3000 }
resources: { cpu: "1", memory: 1Gi, disk: 5Gi }
services:
  web:
    kind: web-service
    contains_pii: false
  db:
    kind: database
    contains_pii: true
    anonymize:
      engine: postgres
      database: shop
      user: shop
      rules:
        - { table: customers, column: email, transform: fake-email }
```
