---
title: The critical containers should be configured to remain responsive
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > OOTB Rules > The critical containers should be
  configured to remain responsive
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# The critical containers should be configured to remain responsive
Classification:complianceFramework:cis-dockerControl:5.12 
## Description{% #description %}

Containers should have their CPU shares set.

## Rationale{% #rationale %}

CPU shares weigh the containers against each other when the CPU is busy. Set on purpose, they keep a busy container from slowing the critical ones.

## Audit{% #audit %}

Inspect the containers:

```bash
docker ps --quiet --all | xargs docker inspect --format '{{ .Name }}: CpuShares={{ .HostConfig.CpuShares }}'
```

Datadog passes the rule when a container's CPU shares are set to a value other than 0 and 1024 (the default weight), and fails it otherwise.

## Remediation{% #remediation %}

Run the container with `--cpu-shares`:

```bash
docker run --cpu-shares 512 <image>
```

## Impact{% #impact %}

A container with a low weight gets less CPU when the host is busy.

## Default value{% #default-value %}

Every container has the same weight, 1024.

## References{% #references %}

1. [https://docs.docker.com/engine/containers/resource_constraints/#cpu](https://docs.docker.com/engine/containers/resource_constraints/#cpu)
1. [https://docs.docker.com/reference/cli/docker/container/run/#options](https://docs.docker.com/reference/cli/docker/container/run/#options)
1. [https://docs.docker.com/engine/containers/runmetrics/](https://docs.docker.com/engine/containers/runmetrics/)
