How to Test Intel's Cache Aware Scheduling on Your Linux System

By ● min read

Introduction

For over a year, Intel engineers have been developing a feature called Cache Aware Scheduling for the Linux kernel. This technology optimizes how the kernel distributes tasks across CPU cores by taking into account each core's cache topology—especially the shared L2 and L3 caches. Early tests on both Intel and AMD processors show significant performance gains in multi-threaded workloads. The patches are now nearing acceptance into the mainline kernel, making this an exciting time for Linux enthusiasts to try them out. This guide will walk you through obtaining the latest Cache Aware Scheduling patches, compiling a custom kernel, and running basic benchmarks to verify the improvements.

How to Test Intel's Cache Aware Scheduling on Your Linux System

What You Need

Step-by-Step Instructions

Step 1: Obtain the Latest Kernel Source

Clone the mainline Linux kernel repository from kernel.org. Open a terminal and run:

git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

This will create a directory named linux. Move into it:

cd linux

Step 2: Fetch the Cache Aware Scheduling Patches

Intel engineers maintain a public Git branch with the patches. Add their remote and fetch the relevant branch:

git remote add intel-cas https://github.com/intel/linux-cas.git
git fetch intel-cas

Then create a local branch based on the cas-core branch (the name may change, check Intel's documentation):

git checkout -b my-cas intel-cas/cas-core

You now have a kernel tree that includes all the Cache Aware Scheduling patches applied on top of a recent mainline base.

Step 3: Configure the Kernel for Cache Aware Scheduling

Before compiling, you must enable the feature. Use the kernel configuration interface:

make menuconfig

Navigate to:

If you don't see this option, ensure you are on the correct CAS branch. Also verify that SMP (Symmetric Multi-Processing) is enabled, as CAS relies on it. Save and exit.

For a quick test, you can accept the defaults for all other options. But to get the best results, consider enabling NUMA and SCHED_MC (multi-core scheduler).

Step 4: Compile the Kernel

Compilation can take 30 minutes to a few hours depending on your hardware. Use as many CPU cores as possible:

make -j$(nproc)

If you encounter missing dependencies, install them and re-run. Once finished, compile the kernel modules:

make modules_install

Step 5: Install the New Kernel

Copy the compiled kernel image and generate the initial RAM disk (initramfs):

make install
update-initramfs -c -k $(make kernelrelease)

On Fedora, use dracut instead. Update your bootloader (GRUB):

update-grub   # Ubuntu
# or on Fedora: grub2-mkconfig -o /boot/grub2/grub.cfg

Step 6: Reboot and Select the CAS Kernel

Restart your system. In the GRUB menu, choose the kernel with my-cas or the version you just compiled. If no menu appears, hold Shift (BIOS) or press Esc (UEFI) during boot. After logging in, verify the kernel version:

uname -r

It should match the release from the CAS branch.

Step 7: Confirm Cache Aware Scheduling Is Active

Check the kernel boot messages for CAS-related entries:

dmesg | grep -i cache-aware

If you see lines like “Cache Aware Scheduling: enabled”, the feature is active. You can also look at /proc/schedstat or run cat /sys/kernel/debug/sched/debug for more verbose output.

Step 8: Run Basic Benchmarking

To see the performance impact, compare a multi-threaded workload with and without CAS. Install the Phoronix Test Suite or use simple tools like stress-ng and perf.

Example using stress-ng to measure cache thrashing:

stress-ng --cache 4 --cache-ops 1000000 --cache-level 3 --metrics-brief

Run the same test on the stock kernel (before applying CAS) and on the CAS kernel. Note the throughput and latency differences.

For more realistic results, test with Phoronix Test Suite:

phoronix-test-suite benchmark cache

The suite includes memory‑sensitive benchmarks like pts/cache and pts/stream.

Tips for Success

Tags:

Recommended

Discover More

Why Choosing a Smart Home Platform Beats Buying a Hub FirstFamily Reunion: A Child's Dinner Table Adventure Captures the Chaos of YouthPython 3.15 Alpha 6 Drops with JIT Speed Boost and New ProfilerReact and React Native Ecosystem: Key Updates on TanStack, Remotion, and MoreKey Takeaways from Appian World: How Process-Centric AI is Reshaping Enterprise Automation