In this document, we describe how to reproduce the figures in paper Reducing File System Latencies with Chopper. More importantly, the document provides some basic code that you can modifiy to analyze new results from Chopper.
I try to make it easy for you to run the code. The minimum requirement is that you have R and several packages installed (describe in this page). Then you can simply copy and paste the code to R and you will see the figures. This may take some time as it has to download data files from GitHub. If you want it to be faster, you can also download Chopper at https://github.com/junhe/chopper and produce the figures locally (instructions are also available in this page).
Please note that some factor names in source code are different to the paper. And I am too lazy to keep them consistent. But you should map them fairely easy. I provide a mapping table here.
Paper | Code |
---|---|
DiskSize | disk.size |
UsedRatio | disk.used |
FreeSpaceLayout | layoutnumber |
CPUCount | num.cores |
FileSize | file.size |
ChunkCount | num.chunk |
InternalDensity | Fullness |
ChunkOrder | chunk.order |
Fsync | fsync |
Sync | sync |
FileCount | num.files |
DirectorySpan | dir.span |
We wrote the analysis with R. You can download and install R from http://www.r-project.org/ .
If you use Ubuntu, you can install it by:
sudo apt-get install r-base
Run the following script in R to install necessary packages:
install.packages(c("grid", "ggplot2", "combinat", "gridExtra", "plyr", "reshape2", "R.utils", "devtools"), dependencies = TRUE)
If the one above does not work, try the following. I almost ruined my R environment when trying to verify the command. I am not gonna try it again… You get the idea - install these packages listed.
install.packages(c("grid", "ggplot2", "combinat", "gridExtra", "plyr", "reshape2", "R.utils", "devtools"))
We now describe how to reproduce the figures in paper Reducing File System Tail Latencies with Chopper.
You can copy and paste the following code to R to reproduce the figure without downloading the analysis code.
library(devtools)
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/fig-1.layoutnumber.R')
If you have downloaded Chopper to your local file system, you can also copy and paste the following code to R to get the figure.
USE.REMOTE.CHOPPER = FALSE
setwd('/Users/junhe/workdir/chopper/vis-analysis') # Replace the path with yours
source('fig-1.layoutnumber.R')
Figure 2 is diagram showing components of Chopper. So not here.
Copy and paste the following code to R to reproduce figure 3 without local Chopper folder.
library(devtools)
USE.REMOTE.CHOPPER = TRUE
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/common.r')
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/fig-3.cdfs-ext4-xfs.r')
If you have downloaded Chopper to your local file system, you can also copy and paste the following code to R to get the figure.
USE.REMOTE.CHOPPER = FALSE
setwd('/Users/junhe/workdir/chopper/vis-analysis') # Replace the path with yours
source('./common.r')
source('./fig-3.cdfs-ext4-xfs.r')
Copy and paste the following code to R to reproduce the figure without local Chopper folder.
library(devtools)
USE.REMOTE.CHOPPER = TRUE
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/common.r')
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/fig-4.variance.r')
If you have downloaded Chopper to your local file system, you can also copy and paste the following code to R to get the figure.
USE.REMOTE.CHOPPER = FALSE
setwd('/Users/junhe/workdir/chopper/vis-analysis') # Replace the path with yours
source('./common.r')
source('./fig-4.variance.r')
Copy and paste the following code to R to reproduce the figure without local Chopper folder.
library(devtools)
USE.REMOTE.CHOPPER = TRUE
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/common.r')
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/fig-5.tail-distribution.r')
If you have downloaded Chopper to your local file system, you can also copy and paste the following code to R to get the figure.
USE.REMOTE.CHOPPER = FALSE
setwd('/Users/junhe/workdir/chopper/vis-analysis') # Replace the path with yours
source('./common.r')
source('./fig-5.tail-distribution.r')
Copy and paste the following code to R to reproduce the figure without local Chopper folder.
library(devtools)
USE.REMOTE.CHOPPER = TRUE
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/common.r')
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/fig-6.tail-interactions.r')
If you have downloaded Chopper to your local file system, you can also copy and paste the following code to R to get the figure.
USE.REMOTE.CHOPPER = FALSE
setwd('/Users/junhe/workdir/chopper/vis-analysis') # Replace the path with yours
source('./common.r')
source('./fig-6.tail-interactions.r')
Copy and paste the following code to R to reproduce the figure without local Chopper folder.
library(devtools)
USE.REMOTE.CHOPPER = TRUE
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/common.r')
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/fig-7.vanilla-vs-final.r')
If you have downloaded Chopper to your local file system, you can also copy and paste the following code to R to get the figure.
USE.REMOTE.CHOPPER = FALSE
setwd('/Users/junhe/workdir/chopper/vis-analysis') # Replace the path with yours
source('./common.r')
source('./fig-7.vanilla-vs-final.r')
Copy and paste the following code to R to reproduce the figure without local Chopper folder.
library(devtools)
USE.REMOTE.CHOPPER = TRUE
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/common.r')
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/fig-8.effects.r')
If you have downloaded Chopper to your local file system, you can also copy and paste the following code to R to get the figure.
USE.REMOTE.CHOPPER = FALSE
setwd('/Users/junhe/workdir/chopper/vis-analysis') # Replace the path with yours
source('./common.r')
source('./fig-8.effects.r')
Copy and paste the following code to R to reproduce the figure without local Chopper folder.
library(devtools)
USE.REMOTE.CHOPPER = TRUE
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/common.r')
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/fig-9a.randomness-cdf.r')
If you have downloaded Chopper to your local file system, you can also copy and paste the following code to R to get the figure.
USE.REMOTE.CHOPPER = FALSE
setwd('/Users/junhe/workdir/chopper/vis-analysis') # Replace the path with yours
source('./common.r')
source('./fig-9a.randomness-cdf.r')
Copy and paste the following code to R to reproduce the figure without local Chopper folder.
library(devtools)
USE.REMOTE.CHOPPER = TRUE
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/common.r')
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/fig-9bc.randomness-interaction.r')
If you have downloaded Chopper to your local file system, you can also copy and paste the following code to R to get the figure.
USE.REMOTE.CHOPPER = FALSE
setwd('/Users/junhe/workdir/chopper/vis-analysis') # Replace the path with yours
source('./common.r')
source('./fig-9bc.randomness-interaction.r')
Copy and paste the following code to R to reproduce the figure without local Chopper folder.
library(devtools)
USE.REMOTE.CHOPPER = TRUE
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/common.r')
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/fig-10a.effects-of-removing.r')
If you have downloaded Chopper to your local file system, you can also copy and paste the following code to R to get the figure.
USE.REMOTE.CHOPPER = FALSE
setwd('/Users/junhe/workdir/chopper/vis-analysis') # Replace the path with yours
source('./common.r')
source('./fig-10a.effects-of-removing.r')
Copy and paste the following code to R to reproduce the figure without local Chopper folder.
library(devtools)
USE.REMOTE.CHOPPER = TRUE
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/common.r')
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/fig-10bc.effects-of-removing.r')
If you have downloaded Chopper to your local file system, you can also copy and paste the following code to R to get the figure.
USE.REMOTE.CHOPPER = FALSE
setwd('/Users/junhe/workdir/chopper/vis-analysis') # Replace the path with yours
source('./common.r')
source('./fig-10bc.effects-of-removing.r')
Copy and paste the following code to R to reproduce the figure without local Chopper folder.
library(devtools)
USE.REMOTE.CHOPPER = TRUE
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/common.r')
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/fig-11.xSDxSE.r')
If you have downloaded Chopper to your local file system, you can also copy and paste the following code to R to get the figure.
USE.REMOTE.CHOPPER = FALSE
setwd('/Users/junhe/workdir/chopper/vis-analysis') # Replace the path with yours
source('./common.r')
source('./fig-11.xSDxSE.r')
Copy and paste the following code to R to reproduce the figure without local Chopper folder.
library(devtools)
USE.REMOTE.CHOPPER = TRUE
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/common.r')
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/fig-12.xSDxSExSG.r')
If you have downloaded Chopper to your local file system, you can also copy and paste the following code to R to get the figure.
USE.REMOTE.CHOPPER = FALSE
setwd('/Users/junhe/workdir/chopper/vis-analysis') # Replace the path with yours
source('./common.r')
source('./fig-12.xSDxSExSG.r')
Copy and paste the following code to R to reproduce the figure without local Chopper folder.
library(devtools)
USE.REMOTE.CHOPPER = TRUE
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/common.r')
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/fig-13.norm-bug.r')
If you have downloaded Chopper to your local file system, you can also copy and paste the following code to R to get the figure.
USE.REMOTE.CHOPPER = FALSE
setwd('/Users/junhe/workdir/chopper/vis-analysis') # Replace the path with yours
source('./common.r')
source('./fig-13.norm-bug.r')
Copy and paste the following code to R to reproduce the figure without local Chopper folder.
library(devtools)
USE.REMOTE.CHOPPER = TRUE
source_url('https://raw.githubusercontent.com/junhe/chopper/master/vis-analysis/fig-14.latency-reduction.r')
If you have downloaded Chopper to your local file system, you can also copy and paste the following code to R to get the figure.
USE.REMOTE.CHOPPER = FALSE
setwd('/Users/junhe/workdir/chopper/vis-analysis') # Replace the path with yours
source('./common.r')
source('./fig-14.latency-reduction.r')