Skip to content
Vagrantfile for a VM with PASTE
Shell Lua
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Trying out PASTE with a VM

This repository contains a Vagrantfile that sets up a VM with PASTE and an example app, which serves requests generated by the host over TCP. Configuration of this VM is also a good reference when installing PASTE in other environments.

PASTE (stands for Packet Store)

  • Enables NIC DMA to Non-Volatile Main Memory (NVMM)
  • Helps apps organize persistent data structures (e.g., WAL, B+tree) on NVMM
  • Lets apps use the kernel TCP/IP and be protected
  • Is a high-performance network stack even without NVMM, making your apps ready to support it.

Michio Honda, Giuseppe Lettieri, Lars Eggert and Douglas Santry, "PASTE: A Network Programming Interface for Non-Volatile Main Memory", USENIX NSDI 2018 (


The VM contains:

  • Linux kernel 5.0-rc7 compiled with necessary configuration (deployed/net-next/.config)
  • PASTE implementation (deployed/netmap) with a test app (deployed/apps/phttpd)
  • Reserved DRAM region for NVMM emulation (/dev/pmem0)


  • Install Virtualbox, Vagrant in your Mac or Linux
  • Install wrk (a popular HTTP benchmark tool, in your Mac (e.g., brew install wrk) or Linux (e.g., apt-get install wrk)
  • Note that the VM will launch with at least 2GB of memory.

How to launch the VM

Note: prompt host% indicates commands to be executed at the host, and vm% indicates those to be executed at the VM

host% git clone

host% cd paste-demo

host% vagrant up

How to run PASTE in the VM

SSH to the VM (or just go to the VM console)

host% vagrant ssh

Setup emulated NVMM, NICs etc.

vm% sudo bash -x ./

Confirm your host can talk to this VM with the experiment NIC

host% ping

Edit Vagrantfile and in the VM (and "vagrant reload") if you want to change this VM's address

Run PASTE server app in this VM

vm% sudo ./deployed/netmap/apps/phttpd/phttpd -i eth1 -d /mnt/pmem/dumb -m -x 768

After starting to see output from nm_main_thread at the VM, Run wrk in your host

host% wrk -d 2 -c 100 -t 100 -s post1280.lua

In this setup the server in the VM runs PASTE with packet buffers backed by NVMM. The client at the host continually generates 1280B HTTP POSTs over 100 TCP connections and threads.

To run the server without NVMM-backed packet buffers (i.e., just as a high performance network stack), change -x to -L, which will copy data from normal (DRAM-backed) packet buffers to an emulated NVMM region. To run it with vanilla socket API (i.e., without PASTE), change -x to -L and remove -i eth1. To run it with busy polling, add -b 0 (no matter with and without PASTE).

More details

See the NSDI paper, and take a look at deployed/netmap/phttpd/phttpd.c to learn how to write app.


Michio Honda (email: micchie [at] or twitter: @michioh)

You can’t perform that action at this time.