Copier: A First-Class Operating System Service for Asynchronous Memory Copy
-
Abstract
In modern systems, memory copy remains a critical performance bottleneck across various scenarios, playing a pervasive role in system-wide execution such as syscalls, inter-process communication (IPC), and user-mode applications. Numerous efforts have aimed at optimizing copy performance, including zero-copy with page remapping and hardware-accelerated copy. However, they typically target specific use cases. This article argues for copy as a first-class OS service, offering three key benefits: 1) with the asynchronous copy abstraction provided by the service, applications can overlap their execution with copy; 2) the service can effectively utilize hardware capabilities to enhance copy performance; 3) the service’s global view of copies further enables holistic optimization. To this end, the article introduces Copier, a new OS service of coordinated asynchronous copy, to serve both user-mode applications and OS services. The authors build Copier-Linux to demonstrate Copier’s ability to improve performance for diverse use cases, including Redis, Protobuf, network stack, proxy, etc. Evaluations show that Copier achieves up to a 1.8× speedup for real-world applications like Redis and a 1.6× improvement over zIO, the state of the art in optimizing copy efficiency. To further facilitate adoption, the authors develop a toolchain to ease the use of Copier. The authors also integrate Copier into a commercial smartphone OS (HarmonyOS 5.0), achieving promising results.
-
-