Unfair by design: eBPF-based scheduling of mixed database workloads

📅 2026-05-04
📈 Citations: 0
Influential: 0
📄 PDF

career value

198K/year
🤖 AI Summary
This work addresses the challenge of interference from background tasks on latency-sensitive workloads in hybrid database environments, a problem inadequately mitigated by existing operating system schedulers due to ineffective isolation and susceptibility to priority inversion. The paper proposes UFS, a selective unfair scheduler built upon eBPF and the sched_ext framework, which introduces application-aware scheduling into the kernel for the first time. UFS dynamically restricts background tasks to idle CPU cycles via eBPF and enables immediate preemption upon the arrival of high-priority tasks. It further incorporates an application-level hinting mechanism to alleviate priority inversion. Evaluated under PostgreSQL mixed workloads, UFS achieves up to a 2× improvement in throughput for latency-sensitive tasks and reduces tail latency by 50% compared to the default Linux scheduler.
📝 Abstract
Modern database systems increasingly co-schedule time-sensitive and background tasks. In such mixed workloads, background tasks should ideally utilize only spare CPU capacity without interfering with latency-critical requests. While some database-level solutions address this challenge, many database systems still rely on operating system (OS) schedulers, which, despite supporting priorities, do not reliably isolate high-priority tasks. Furthermore, they remain vulnerable to priority inversion, where preempted background tasks can delay other work. We present UFS, a selectively unfair scheduler implemented as an eBPF-based sched_ext scheduler in the Linux kernel. UFS restricts background tasks to idle CPU capacity and preempts them immediately when time-sensitive tasks arrive. To address priority inversion, UFS incorporates application-level hints via eBPF maps, ensuring that background tasks are not unnecessarily delayed should time-sensitive tasks wait for them to release locks. Our integration of UFS into PostgreSQL demonstrates that, under mixed workloads, UFS improves throughput for time-sensitive tasks by up to 2X, while reducing tail latency by half, compared to existing scheduling options in Linux.
Problem

Research questions and friction points this paper is trying to address.

mixed workloads
priority inversion
CPU scheduling
latency-critical tasks
background tasks
Innovation

Methods, ideas, or system contributions that make the work stand out.

eBPF
scheduler
priority inversion
mixed workloads
database