Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Google Cloud Platform icon
Labs

Managing System Resources Using Control Groups

In this hands-on lab, you will focus on managing system resource limits using `control groups` (`cgroups`). Using `top` or a similar tool, you will review CPU activity and identify the `PID` of a high CPU process, then create a control group and set a limit using the `PID` value and confirm the limits were properly applied. The final task will be to start a service, monitor the CPU utilization, and create a permanent resource limit using a `systemd` control file for the service. *This course is not approved or sponsored by Red Hat.*

Google Cloud Platform icon
Lab platform
Lab Info
Level
Advanced
Last updated
Sep 18, 2025
Duration
45m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Use cgroups to Manage Settings at the PID Level
    1. Launch the cg-review.sh script as a background application.
    2. Launch your preferred utility to monitor processes and monitor CPU and memory utilization, such as top.
      • Identify any processes that are consuming excess CPU and note the PID value.
    3. Configure the limit values:
      • Create a directory called lab in /sys/fs/cgroup/cpu/.
        • Confirm the directory is populated.
      • As the root user, set the limits as follows:
        • cpu.cfs_period_us = 1000000
        • cpu.cfs_quota_us = 200000
        • Confirm the values are configured.
      • Add the process PID to the cpu/lab/cgroup.procs file for the lab cgroup.
        • Confirm the limit was applied by checking in /proc.
      • Launch top and check for the process, confirming the CPU usage has been limited as expected.
    4. Kill the process.
    5. Exit the root account
  2. Challenge

    Manage Resource Limits Using systemd
    1. Enable and start the evotl service.

      Note: This service will cause the systemd-journald service to consume around 50% of the CPU at times. This is ok for the purposes of the lab.

      • This service spawns a tail process that consumes around 2G of memory.
    2. Check the status of the evotl service.
    3. Launch top and review the top memory processes.
      • You should see the tail process consuming approximately 50-55% of the memory.
    4. Use systemctl to set the MemoryLimit property to 1000M.

      Note: This could take a several seconds to complete, be patient.

    5. Check the status of the change.
      • Use systemctl to view the evotl service and confirm a limit file was created.
      • Launch top and confirm the tail process now consumes around 25% of the memory.
  3. Challenge

    Reboot the Lab and Confirm Configuration Persists
    1. Use systemctl to check the status of the evotl service.
      • Confirm the service still has the memory limit in place.
    2. Launch top and monitor the status of the tail process.
      • Confirm the process is currently consuming around 25% of the memory.
  4. Challenge

    Revert the Memory Limit and Disable the Service
    1. Stop the evotl service.
    2. Remove the 50-MemoryLimit.conf file for the evotl service.
    3. Disable the evotl service.
About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight