GithubHelp home page GithubHelp logo

micchie / paste-demo Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 7 KB

Vagrantfile for a VM with PASTE

Home Page: https://www.usenix.org/conference/nsdi18/presentation/honda

Lua 19.88% Shell 80.12%

paste-demo's Introduction

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 (https://www.usenix.org/conference/nsdi18/presentation/honda)

Code: https://micchie.net/paste/

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)

Prerequisite

  • 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.

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 [email protected]:micchie/paste-demo.git

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 ./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).

More details

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

Contact

Michio Honda (email: micchie [at] sfc.wide.ad.jp or twitter: @michioh)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.