A DevOps team is deploying microservices within a containerized environment on Linux host servers. The system administrator needs to enforce hard limits on CPU usage and memory consumption for individual containers to prevent a single compromised or misconfigured container from exhausting shared host system resources. Which Linux kernel mechanism should be configured to directly enforce these resource limits?
- Control groups (cgroups)Answer
- BNamespaces
- CType 1 Bare-Metal Hypervisor hardware partitioning
- DPerimeter network firewalls
Answer
Control groups (cgroups) are used to limit and isolate physical resource consumption such as CPU and RAM for container processes.
Control groups (cgroups) are the Linux kernel feature designed specifically to restrict, allocate, and measure hardware resources (CPU, RAM, block I/O) assigned to containerized process hierarchies.
Step-by-Step Solution
Key Concept
Resource isolation and constraint mechanisms in container security (cgroups vs namespaces)