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 (https://www.usenix.org/conference/nsdi18/presentation/honda)
Code: https://micchie.net/paste/
- 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, https://github.com/wg/wrk) 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.
Note: prompt host%
indicates commands to be executed at the host, and vm%
indicates those to be executed at the VM
host% git clone [email protected]:micchie/paste-demo.git
host% cd paste-demo
host% vagrant up
SSH to the VM (or just go to the VM console)
host% vagrant ssh
Setup emulated NVMM, NICs etc.
vm% sudo bash -x ./setup.sh
Confirm your host can talk to this VM with the experiment NIC
host% ping 192.168.33.34
Edit Vagrantfile and setup.sh 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 http://192.168.18.18:60000/ -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).
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] sfc.wide.ad.jp or twitter: @michioh)