If you’re running Red Hat Enterprise Linux for Microsoft SQL Server—especially in containers or Kubernetes—there’s a nifty update you should know about. With SQL Server 2025 and SQL Server 2022 CU 20, Microsoft has added full support for cgroup v2, which is a big step forward for memory management on RHEL.
What is cgroup v2, and why does it matter?
On Red Hat Enterprise Linux (RHEL) and other modern Linux distributions, control groups (cgroups) help you control how much CPU, RAM, and other resources each process or container can use. It’s like putting fair limits in place so no single workload can monopolize your entire server.
cgroup v2 is the modern version. It’s more efficient and provides more precise control. This matters even more if you run SQL Server inside containers on Red Hat OpenShift or Kubernetes clusters.
Want to check if cgroup v2 is enabled on your RHEL system? You can verify this in your system configuration or follow Red Hat’s official documentation. To turn it on manually, add systemd.unified_cgroup_hierarchy=1
to your GRUB settings and run an update. Many current RHEL releases have cgroup v2 enabled by default. See the blog SQL Server on Linux Now Supports cgroup v2 for more specifics.
How SQL Server handled memory before
Here’s the problem this update fixes:
- When running on RHEL, SQL Server has always tried to limit its own memory usage to about 80% of the total system RAM. That makes sense on bare metal or a virtual machine, but not inside a container.
- Previously, older versions of SQL Server didn’t detect cgroup v2 limits. So if you set your container to use only 4 GB of RAM, SQL Server would still try to grab 80% of the host’s RAM. This often led to Out of Memory (OOM) errors and container crashes.
- Back when cgroup v1 was common, Kubernetes and OpenShift used Guaranteed QoS to enforce resource limits, and SQL Server respected those. But once cgroup v2 became the new standard, SQL Server didn’t catch up—until now.
What’s changed with SQL Server 2025 and 2022 CU 20?
Good news: SQL Server is finally cgroup v2-aware. That means:
- It reads the memory limits you set with cgroup v2.
- It adjusts its usage automatically.
- Containers stay within their resource limits, so you’re much less likely to hit OOM errors.
This is a big win for anyone running SQL Server in containers on OpenShift or Kubernetes on RHEL 9 or newer, where cgroup v2 is the default.
Who benefits from this?
This update is especially useful if you:
- Run SQL Server in containers on OpenShift or Kubernetes clusters on RHEL.
- Manage Linux-based SQL Server environments on Red Hat.
- Want to avoid containers fighting over memory on your nodes.
Put simply, this update brings SQL Server closer to the level of resource control you’d expect in a modern, cloud-native, containerized environment.
How to keep an eye on things
To make sure your SQL Server is behaving as expected on RHEL:
- Use
journalctl
for system logs. - Check SQL Server’s logs to track memory usage.
- Use Kerberos logging and
logger.ini
if you run into authentication issues.
Final thoughts
It might look like a minor tweak, but for anyone running SQL Server on RHEL, this is a huge improvement. Better memory handling means fewer crashes, more predictable performance, and smoother operations in your containers or Kubernetes clusters.
If you haven’t already, plan your upgrade to SQL Server 2025 or SQL Server 2022 CU 20 and enjoy the peace of mind that comes with smarter, modern resource management on Red Hat.
Further reading
- SQL Server on Linux Now Supports cgroup v2
- SQL Server on Linux Overview
- SQL Server 2025 Release Notes
- Deploy SQL Server on OpenShift or Kubernetes
- Getting started with RHEL 10
The post Smarter memory control for SQL Server on RHEL with cgroup v2 appeared first on Red Hat Developer.