Please use this identifier to cite or link to this item:
https://dl.ucsc.cmb.ac.lk/jspui/handle/123456789/4939
Title: | Affinity Aware CPU Scheduling for Container Hosts |
Authors: | Karunarathne, A.M.S.U. |
Issue Date: | 30-May-2025 |
Abstract: | Abstract Containerization facilitates efficient application deployment by isolating workloads within lightweight environments sharing the host operating system’s kernel. However, the Linux Completely Fair Scheduler (CFS) manages containerized processes as standard user-space tasks, resulting in frequent CPU migrations, cache invalidations, and unpredictable latency in high-density, latency-sensitive deployments. This thesis proposes an affinity-aware CPU scheduling framework for container hosts, integrating queuing theory with eBPF-based monitoring to enhance performance. Kernel-level TCP backlog and application-level request queues are modeled as M/M/c/K systems, with eBPF probes capturing per-container scheduling and connection metrics to analyze queue dynamics and CPU migration patterns. Experiments on a four-core Ubuntu virtual machine, using a custom C-based HTTP server in Docker, reveal that overprovisioning worker threads increases CPU migrations by up to 105% (from 32.15 migrations with 5 workers to 58.65 with 17.5 workers) at a fixed request rate of 10 requests per second, leading to cache misses and reduced throughput. A batched queuing scheme mitigates lock contention, while adaptive worker thread management, responsive to real-time arrival rates, significantly reduces migrations and enhances CPU utilization. However, M/M/c/K queuing models and machine learning approaches, such as Random Forest models, exhibit limitations due to dynamic scheduling patterns and TCP congestion control interference, which introduce variability and reduce predictive accuracy. Key contributions include a low-overhead eBPF monitoring system for per-container queue metrics and a hybrid analytical-empirical approach combining queuing theory with kernel telemetry to optimize server performance. Results underscore the critical role of affinity-aware scheduling and dynamic thread tuning in achieving predictable and efficient performance in containerized environments, while highlighting the need for hybrid models to address the shortcomings of theoretical and machine learning-based predictions. |
URI: | https://dl.ucsc.cmb.ac.lk/jspui/handle/123456789/4939 |
Appears in Collections: | 2025 |
Files in This Item:
File | Description | Size | Format | |
---|---|---|---|---|
20000928-d - Senith Uthsara.pdf | 2.6 MB | Adobe PDF | View/Open |
Items in UCSC Digital Library are protected by copyright, with all rights reserved, unless otherwise indicated.