# How do I configure the CPU/Memory resources of my development environments?

**URL:** <https://community.okteto.com/t/how-do-i-configure-the-cpu-memory-resources-of-my-development-environments/826>\
**Category:** How Do I?\
**Created:** [May 20, 2023, 8:28am UTC](https://community.okteto.com/t/how-do-i-configure-the-cpu-memory-resources-of-my-development-environments/826 "2023-05-20T08:28:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pchico83](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/pchico83/32/25_2.png) [@pchico83](https://community.okteto.com/u/pchico83)\
**Post date:** [May 20, 2023, 8:28am UTC](https://community.okteto.com/t/how-do-i-configure-the-cpu-memory-resources-of-my-development-environments/826/1 "2023-05-20T08:28:41Z")

</div>

I am having bad performance in my development environments, and my pods aren’t balanced across nodes

---

<div class="post-metadata">

**Author:** ![pchico83](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/pchico83/32/25_2.png) [@pchico83](https://community.okteto.com/u/pchico83)\
**Post date:** [May 20, 2023, 8:31am UTC](https://community.okteto.com/t/how-do-i-configure-the-cpu-memory-resources-of-my-development-environments/826/2 "2023-05-20T08:31:33Z")

</div>

Okteto leverages the concept of [Kubernetes resources](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) to decide on which node to place each container.

When you specify a resource `limit` for a container, Okteto enforces those limits so that the running container is not allowed to use more of that resource than the limit you set.  
Okteto also reserves at least the `request` amount of that system’s resources specifically for that container to use.

## Best Practices

It’s strongly recommended that you configure your CPU and Memory `requests` to align with your container’s actual resource utilization.  
By doing so, you ensure that your containers always have sufficient resources available for optimal development speed. This information is also used by Kubernetes to balance pods across your cluster nodes.

## Resource Consumption

The Okteto UI shows information about the memory and CPU that deployments and statefulsets are using:

 ![container-resources](https://us1.discourse-cdn.com/flex019/uploads/okteto/original/1X/995a00196eb643dcf9c082a22b24804e2913f826.png)

## Access your Metrics with kubectl

If you require more detailed data on your containers’ resource consumption, you can use the `kubectl top pods` command.

Fetch your kubectl credentials with `okteto kubeconfig` and run `kubectl top pods` to access your container’s metrics:

```console
$ kubectl top pod

```

```auto
NAME CPU(cores) MEMORY(bytes)
api-7cc77bcdcb-pm72j 89m 66Mi
frontend-78b8b698cf-5wb5p 1m 2Mi
mongodb-0 5m 160Mi

```

## Configure your Development Environment Resources

There are three different ways to configure the container resources for your development environments:

- [Kubernetes manifest](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)
- [Docker Compose](https://www.okteto.com/docs/reference/compose/#resources-object-optional)
- [Okteto Manifest](https://www.okteto.com/docs/reference/manifest/#resources-object-optional)

As an admin, you can also define the quotas and default resources for all your containers.
