Swap Fairness for Thrashing Mitigation

The swap mechanism allows operating systems to manage more memory than the available RAM space, by temporarily storing unused memory pages on disk. However, disk transfers are way slower than normal RAM operations, and under memory pressure, the system may spend more time in retrieving and storing swapped pages than performing actual computation: this state is called memory thrashing. To reduce thrashing, several ideas were brought up to optimize page replacement algorithms and system-wide load. For instance, Linux currently implements the swap-token, a mechanism designed to immunize the memory pages of the heaviest process against swapping. Such a mechanism eliminates early thrashing peaks and improves general system performance if the process is to finish quickly. The swap-token may however be counterproductive when it is tricked into advantaging malicious or long-standing processes. This is particularily true in the context of shared hosting or virtualization, where multiple users run uncoordinated and selfish workloads. In this paper, we present an accounting layer that forces swap fairness among processes competing for main memory. It ensures that a process cannot perform longer swap operations than others, and delays the swap operations of processes abusing the swapping mechanism. With such a layer, we are able to significantly reduce the dispersion of execution times under memory pressure, and generally improve the performance of legit, memory-heavy processes running concurrently with abusive ones.

Data and Resources

Additional Info

Field Value
Source https://inria.hal.science/hal-00879084
Author Goichon, François, Salagnac, Guillaume, Frénot, Stéphane
Maintainer CCSD
Last Updated May 9, 2026, 04:25 (UTC)
Created May 9, 2026, 04:25 (UTC)
Identifier Report N°: RR-8388
Language en
Rights https://about.hal.science/hal-authorisation-v1/
contributor CITI Centre of Innovation in Telecommunications and Integration of services (CITI) ; Institut National des Sciences Appliquées de Lyon (INSA Lyon) ; Université de Lyon-Institut National des Sciences Appliquées (INSA)-Université de Lyon-Institut National des Sciences Appliquées (INSA)-Institut National de Recherche en Informatique et en Automatique (Inria)
creator Goichon, François
date 2013-07-09T00:00:00
harvest_object_id a36f4f97-4132-4e32-a284-da31a0ce62d3
harvest_source_id 3374d638-d20b-4672-ba96-a23232d55657
harvest_source_title test moissonnage SELUNE
metadata_modified 2025-10-06T00:00:00
set_spec type:REPORT