# Configuring Compute Resources for the connectware-agent Helm Chart

Compute resource requests are used by Kubernetes to schedule workloads on a node that has the required resources available. Compute resource limits are used to limit a workloads consumption.

In order to be scheduled in Kubernetes highest Quality of Service class, agents installed through the `connectware-agent` Helm chart come with a default of using the same value for requests and limits. These values are:

| Resource | Value (request and limit) |
| -------- | ------------------------- |
| CPU      | 2000m                     |
| Memory   | 2000Mi                    |

To adjust the compute resources for the agent, specify a Kubernetes Quantity for `cpu` and `memory` for `resources.requests` and `resources.limits` inside the agents entry in `protocolMapperAgents` context of your `values.yaml` file.

**Example**

{% code lineNumbers="true" %}

```yaml
licenseKey: <your-connectware-license-key>
protocolMapperAgents:
  - name: bender-robots
    connectwareHost: connectware.cybus # adjust to actual hostname of Connectware
    resources:
      requests:
        cpu: 1000m
        memory: 1500Mi
      limits:
        cpu: 3000m
        memory: 2500Mi
```

{% endcode %}

Hint: `cpu` is usually specified in `m`, representing “Milli-CPU”, with `1000m` roughly meaning one CPU core. `memory` is usually specified in `Mi`, representing “Mebibytes”.

## Removing Default Values

In order to be scheduled in Kubernetes highest Quality of Service class, agents installed through the `connectware-agent` Helm chart come with a default of using the same value for requests and limits. These values are:

| Resource | Value (request and limit) |
| -------- | ------------------------- |
| CPU      | 2000m                     |
| Memory   | 2000Mi                    |

To remove either you can set the value `resources.request` and `resources.limits` inside the agents entry in `protocolMapperAgents` context of your `values.yaml` file to an empty YAML object `{}`.

**Example**

{% code lineNumbers="true" %}

```yaml
licenseKey: <your-connectware-license-key>
protocolMapperAgents:
  - name: bender-robots
    connectwareHost: connectware.cybus # adjust to actual hostname of Connectware
    resources:
      limits: {} # Limits are removed from this agent
```

{% endcode %}

You can also completely remove resource definitions by setting `resources` inside the agents entry in `protocolMapperAgents` context of your `values.yaml` file to an empty YAML object `{}`.

**Example**

{% code lineNumbers="true" %}

```yaml
licenseKey: <your-connectware-license-key>
protocolMapperAgents:
  - name: bender-robots
    connectwareHost: connectware.cybus # adjust to actual hostname of Connectware
    resources: {} # No resources are specified for this agent
```

{% endcode %}

## Full Example: Individual Resources for a Single Agent

In this example, we will set lower default resources, but for our agent `welder-robots` we will request more resources and remove limits, as we do want it to not be limited for its important work.

**Example**

{% code lineNumbers="true" %}

```yaml
licenseKey: <your-connectware-license-key>
protocolMapperAgentDefaults:
  connectwareHost: connectware.cybus # adjust to actual hostname of Connectware
  resources:
    requests:
      cpu: 500m
      memory: 500Mi
    limits:
      cpu: 1500m
      memory: 2000Mi
protocolMapperAgents:
  - name: bender-robots # this agent will have the default resources
  - name: welder-robots # this agent will have more resource requests and no limits
    resources:
      requests:
        cpu: 2000m
        memory: 2000Mi
      limits: {}
  - name: painter-robots # this agent will have the default resources
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cybus.io/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-compute-resources-for-the-connectware-agent-helm-chart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
