Revisiting software zero-copy for web-caching applications with twin memory allocation

  • Authors:
  • Xiang Song;Jicheng Shi;Haibo Chen;Binyu Zang

  • Affiliations:
  • Institute of Parallel and Distributed Systems, Shanghai Jiao Tong University and Software School, Fudan University;Institute of Parallel and Distributed Systems, Shanghai Jiao Tong University and Software School, Fudan University;Institute of Parallel and Distributed Systems, Shanghai Jiao Tong University;Institute of Parallel and Distributed Systems, Shanghai Jiao Tong University and Software School, Fudan University

  • Venue:
  • USENIX ATC'12 Proceedings of the 2012 USENIX conference on Annual Technical Conference
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

A key concern with zero copy is that the data to be sent out might be mutated by applications. In this paper, focusing specially on web-caching application, we observe that in most cases the data to be sent out is not supposed to be mutated by applications, while the metadata around it does get mutated. Based on this observation, we propose a lightweight software zero-copy mechanism that uses a twin memory allocator to allocate spaces for zero-copying data, and ensures such data is unchanged before being sent out with a lightweight data protection mechanism. The only change required to an application is to allocate zero-copying data through a specific ZCopy memory allocator. To demonstrate the effectiveness of ZCopy, we have designed and implemented a prototype based on Linux and ported two applications with very little effort. Experiments with Memcached and Varnish shows that show that ZCopy can achieve up to 41% performance improvement over the vanilla Linux with less CPU consumption.