Cornflakes: Zero-Copy Serialization for Microsecond-Scale Networking

  • Deepti Raghavan ,
  • Shreya Ravi ,
  • Gina Yuan ,
  • Pratiksha Thaker ,
  • Sanjari Srivastava ,
  • Micah Murray ,
  • ,
  • Amy Ousterhout ,
  • Philip Levis ,
  • Matei Zaharia ,

SOSP 2023 |

Data serialization is critical for many datacenter applications, but the memory copies required to move application data into packets are costly. Recent zero-copy APIs expose NIC scatter-gather capabilities, raising the possibility of offloading this data movement to the NIC. However, as the memory coordination required for scatter-gather adds bookkeeping overhead, scatter-gather is not always useful. We describe Cornflakes, a hybrid serialization library stack that uses scatter-gather for serialization when it improves performance and falls back to memory copies otherwise. We have implemented Cornflakes within a UDP and TCP networking stack, across Mellanox and Intel NICs. On a Twitter cache trace, Cornflakes achieves 15.4% higher throughput than prior software approaches on a custom key-value store and 8.8% higher throughput than Redis serialization within Redis.