Taming Resource-Intensive Desktop Apps with cgroups on Linux

Introduction to cgroups

I’ve found that managing resources on Linux systems can be a real challenge, especially when dealing with resource-intensive desktop apps. That’s where cgroups come in - a powerful tool that allows you to allocate and manage system resources such as CPU, memory, and I/O for a group of processes. In my experience, cgroups can be a game-changer for keeping your system running smoothly.

Creating a cgroup

To get started with cgroups, you’ll need to create a new group using the cgcreate command. This command not only creates the group but also specifies the subsystems that will be controlled. For example, to create a cgroup that controls CPU and memory usage, you can use the following command:

[Read More]

Taming System Load Spikes with nice, ionice, and cgroups on a Home Server

Introduction to System Load Spikes

I’ve had my fair share of system load spikes on my home server over the years. These spikes can be caused by resource-intensive applications, misconfigured services, or even malware. I recall one particularly nasty spike that brought my server to its knees - it was a real wake-up call. Since then, I’ve been exploring ways to manage system load on my Linux home server. In this article, I’ll share my experiences with using nice, ionice, and cgroups to tame these spikes.

[Read More]