This repository contains a set of scripts to help you replicate Path Queries for Interactive Network Debugging (NSDI '16) on Google Cloud.
Most of the scripts you care about are in the
you will run these on your own computer. The
script determines which tests are run on the VM, so you may want to
plotting subfolder contains scripts which run on the VM to parse
and plot results; they automatically emit charts similar to those in
the paper. The
reference subfolder contains scripts which we used to
set up the VM image or to do other miscellaneous work. You probably
won't need those.
You'll import our VM image, then use the imported image to make a virtual machine, then use our script to run the tests on the machine, then use another script to plot the results.
Import the image
First, you'll import our premade virtual machine image (which has the path query system already set up) into your Google Cloud project.
Log into the Google Cloud console in your browser. You should have accepted the terms of service, set up a project, enabled billing, and wired the project to a billing account -- in other words, you should be in a state where you can make a new instance.
Click on Compute Engine on the left-side menu, then go to the Images section.
Click Create Image in the toolbar at the top.
Let Name be
pyretic-path-queries, and change Source to be 'Cloud Storage file' instead of Disk. Leave the Optional fields blank.
For the Cloud Storage file, type in
path-queries/myimage.tar.gz, which is the public URL for the image we made. (We based it on the Pyretic 0.2.2 VM on their website. We took it and installed extra packages like the Frenetic compiler for path query tests and subsequent analysis.)
Click Create. Wait for the operation to go through; the new
pyretic-path-queriesimage should show up in the Images list.
Create the virtual machine instance
Go to the VM instances section of the Compute Engine console. Click Create to go to the 'Create an instance' screen.
Name the new instance
You should probably choose a zone in a region where you don't have any existing VM instances: if you already had a VM instance in
us-west1-c, for example, then you shouldn't pick any zone in
us-west1here. We're going to spin up an eight-core VM, which is likely to reach your region cap for Google Cloud.
Choose machine type
n1-highmem-8, which has 8 vCPUs and 52 GB of memory.
Change the boot disk: in the boot disk screen that pops up, go to 'Custom images' and select the
If you want, you can go into the 'Management, disk, networking, SSH keys' section and make the instance preemptible to save money, although then you risk having to resume it if it gets terminated.
Click Create. Wait for the operation to complete. When you get an External IP for the new instance in the list of instances, you're ready to run the tests.
Run the tests
Clone this repository on your own computer (not on the VM instance). Go to the
EXTERNALIPis the external IP of the instance you just made.
You may get prompted to approve a key fingerprint (say yes) or to enter a password for user
minineton the machine (the password is
mininet) when each command runs.
If something goes wrong, you can try ssh-ing into
and delete the
path-queries folder, then rerun the replicate
script. At worst, you can make a new instance.
You should see the scalability trend tests running, starting with run 1 of
igen_delauneyon a 20-node network. These tests attempt to compile various path queries on increasingly large synthetic networks (up to 100 nodes); they track how many rules are emitted and how long the compilation takes.
The tests should take about 5-6 hours to complete.
Note that the tests run inside
ssh. If you lose connection, they'll keep running on the instance. You can see a full log in
~/path-queries/screenlog.0on the VM, and you can ssh into the VM and do
screen -xto reattach to the test terminal if you lose the original session.
Plot the results
Once the tests have all completed (signals:
terminated successfully, screen no longer exists, the
shows that a test ended and no further tests ran), we can view the
Go to the
replicate subfolder on your computer. Run
./get-results.sh EXTERNALIP. The result plots will appear in the
Make sure you turn off the giant VM instance when you're done using it!
If you want to run different tests, edit
replicate/replicate-in-vm.sh. You can add different network
NUM_NODES_ARR, for example, or you can remove some of the
OPT_FLAGS. You can try the Stanford or enterprise scripts.
The test scripts from the authors, which our scripts call into, are
all on the VM instance, in
~/pyretic/pyretic/evaluations/scripts/nsdi16. Each test writes raw
output data to the folder
depending on its parameters.