Table of Contents
Fetching ...

eBPF-Based Instrumentation for Generalisable Diagnosis of Performance Degradation

Diogo Landau, Jorge Barbosa, Nishant Saurabh

TL;DR

The paper addresses QoS degradation in online data-intensive apps by introducing $16$ fine-grained eBPF-based metrics that span six kernel subsystems, enabling application-agnostic diagnosis via selective, per-thread tracking. It presents a practical design and architecture for instrumenting kernel interactions (scheduling, VFS, networking, futex, IO multiplexing, and disk IO) with a Rust-based collector that aggregates per-second summaries to minimize overhead. Through extensive experiments on seven diverse applications (databases, Kafka, Solr, Teastore, Redis, and ML-inference), the approach demonstrates its ability to deconstruct degradation into concrete causes such as disk contention, lock contention, CPU saturation, and external service bottlenecks, while highlighting modest instrumentation overhead. The work contributes a reproducible framework and an extensible set of metrics for real-world performance debugging, with future plans to incorporate memory contention analyses and broaden applicability beyond Linux systems.

Abstract

Online Data Intensive applications (e.g. message brokers, ML inference and databases) are core components of the modern internet, providing critical functionalities to connecting services. The load variability and interference they experience are generally the main causes of Quality of Service (QoS) degradation, harming depending applications, and resulting in an impaired end-user experience. Uncovering the cause of QoS degradation requires detailed instrumentation of an application's activity. Existing generalisable approaches utilise readily available system metrics that encode interference in kernel metrics, but unfortunately, these approaches lack the required detail to pinpoint granular causes of performance degradation (e.g., lock, disk and CPU contention). In contrast, this paper explores the use of fine-grained system-level metrics to facilitate an application-agnostic diagnosis of QoS degradation. To this end, we introduce and implement $16$ $\textit{eBPF-based metrics}$ spanning over six kernel subsystems, which capture statistics over kernel events that often highlight obstacles impeding an application's progress. We demonstrate the use of our $\textit{eBPF-based metrics}$ through extensive experiments containing a representative set of online data-intensive applications. Results show that the implemented metrics can deconstruct performance degradation when applications face variable workload patterns and common resource contention scenarios, while also revealing applications' internal architecture constraints.

eBPF-Based Instrumentation for Generalisable Diagnosis of Performance Degradation

TL;DR

The paper addresses QoS degradation in online data-intensive apps by introducing fine-grained eBPF-based metrics that span six kernel subsystems, enabling application-agnostic diagnosis via selective, per-thread tracking. It presents a practical design and architecture for instrumenting kernel interactions (scheduling, VFS, networking, futex, IO multiplexing, and disk IO) with a Rust-based collector that aggregates per-second summaries to minimize overhead. Through extensive experiments on seven diverse applications (databases, Kafka, Solr, Teastore, Redis, and ML-inference), the approach demonstrates its ability to deconstruct degradation into concrete causes such as disk contention, lock contention, CPU saturation, and external service bottlenecks, while highlighting modest instrumentation overhead. The work contributes a reproducible framework and an extensible set of metrics for real-world performance debugging, with future plans to incorporate memory contention analyses and broaden applicability beyond Linux systems.

Abstract

Online Data Intensive applications (e.g. message brokers, ML inference and databases) are core components of the modern internet, providing critical functionalities to connecting services. The load variability and interference they experience are generally the main causes of Quality of Service (QoS) degradation, harming depending applications, and resulting in an impaired end-user experience. Uncovering the cause of QoS degradation requires detailed instrumentation of an application's activity. Existing generalisable approaches utilise readily available system metrics that encode interference in kernel metrics, but unfortunately, these approaches lack the required detail to pinpoint granular causes of performance degradation (e.g., lock, disk and CPU contention). In contrast, this paper explores the use of fine-grained system-level metrics to facilitate an application-agnostic diagnosis of QoS degradation. To this end, we introduce and implement spanning over six kernel subsystems, which capture statistics over kernel events that often highlight obstacles impeding an application's progress. We demonstrate the use of our through extensive experiments containing a representative set of online data-intensive applications. Results show that the implemented metrics can deconstruct performance degradation when applications face variable workload patterns and common resource contention scenarios, while also revealing applications' internal architecture constraints.
Paper Structure (36 sections, 9 figures, 2 tables)

This paper contains 36 sections, 9 figures, 2 tables.

Figures (9)

  • Figure 1: Illustration of a database experiencing lock contention, leading to degraded performance: (a) $95^{th}$ percentile response time; (b) Database threads wait time for a lock; (c) Database threads wake activity for a lock.
  • Figure 2: Instrumentation architecture: Illustration of the required components to monitor a target application. Our instrumentation also accounts for IPC and therefore thread groups that have communicated with the target application will also be monitored.
  • Figure 3: MySQL target metric observation and performance degradation deconstruction: (a) TPCC workload throughput; (b) YCSB read-intensive workload $95^{th}$ percentile response time; (c) Sector requests per device (identified by their major:minor|values; (d) Device request share for MySQL threads; (e) Per thread futexes' (0x76d594012f30, 0x76d594012f34) wait time; (f) Per thread futexes' (0x76d594012f30, 0x76d594012f34) wake activity; (g) Thread 250787's iowait_time; (h) Thread 250787's futexes' (0x76d5fc83c994, 0x76d5fc83c990) wait time; (i) Per thread futexes' (0x76d5fc83c994, 0x76d5fc83c990) wake activity.
  • Figure 4: Kafka target metric observation and performance degradation deconstruction: (a) Ideal/measured throughput; (b) Kafka threads' runtime; (c) Kafka threads' block_time; (d) Thread futexes and wait time; (e) Thread scheduling activity; (f) Wake activity for futex ; (g) Combined connection wait time for epoll ; (h) Thread epoll wait time; (i) Pipe write activity.
  • Figure 5: Cassandra target metric observation and performance degradation deconstruction: (a) YCSB update-intensive workload median response time; (b) Cassandra threads' rq_time throughout the first intervention; (c) Threads' sleep_time throughout the first intervention; (d) Threads' runtime throughout the second intervention; (e) Threads' sleep_time throughout the second intervention; (f) Thread iowait_time throughout the second intervention; (g) Sector requests per device; (h) Device request share for Cassandra threads.
  • ...and 4 more figures