Skip to content

Commit

Permalink
Added analysis data, automated the whole process of running benchmark…
Browse files Browse the repository at this point in the history
… with bash script
  • Loading branch information
michelkaporin committed Dec 7, 2017
1 parent a81c773 commit 4accc28
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 1 deletion.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_STORE
temp/*
Binary file modified Main.class
Binary file not shown.
2 changes: 1 addition & 1 deletion Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

public class Main {
public static void main(String[] args) {
System.out.println("Hello, Solitude!");
AvaData avaData = new AvaData();
int[] maxBlockSize = { 1, 1000 }; // Fix the block size per chunk
boolean[] twoDimensions = { false, true }; // First run the retrieval from the key (single dimension), then over
Expand All @@ -29,6 +28,7 @@ public static void main(String[] args) {
List<Chunk> chunks = avaData.transferData(blockSize);

for (boolean twoDimensional : twoDimensions) {

System.out.format("Block size per chunk: %s, Two Dimensional Benchmark: %s\n", blockSize,
Boolean.toString(twoDimensional));
System.out.format("Num Chunks: %d, Num Entries: %d\n", chunks.size(), avaData.counter);
Expand Down
Binary file added analysis/Hyperdex Benchmarks.xlsx
Binary file not shown.
33 changes: 33 additions & 0 deletions scripts/hyperdex_benchmark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

# Arguments: server number - $0

# Clean up coordinator and daemons' data
tempDir="./../temp"
rm -rf $tempDir/HyperDex_Da*/*

# Run coordinator
hyperdex coordinator -l 127.0.0.1 -p 1982 -D $tempDir/Hyperdex_Data &
coordinatorPID=$!
echo "PID of the coordinator: $coordinatorPID"

# Run daemons
for i in $(seq 1 $1)
do
echo "Starting a daemon #$i in $tempDir/HyperDex_Daemon/$i"
mkdir -p $tempDir/HyperDex_Daemon/$i
hyperdex daemon --listen=127.0.0.1 --listen-port=201$i --coordinator=127.0.0.1 --coordinator-port=1982 --data=$tempDir/HyperDex_Daemon/$i &
done

# Setup spaces
python setup_spaces.py

# Run benchmarking
pushd ..
java -classpath '.:/usr/local/share/java/org.hyperdex.client-1.8.1.jar' -Djava.library.path=/usr/local/lib Main
popd

# SIGTERM background HyperDex coordinator, daemons terminate themselfes after coordinator is down
kill -15 $coordinatorPID

test
48 changes: 48 additions & 0 deletions scripts/setup_spaces.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/python
import sys
sys.path.append('/usr/local/lib/python2.7/site-packages') # Link the right library on Mac OS

import hyperdex.admin
a = hyperdex.admin.Admin('127.0.0.1', 1982)

a.add_space('''
space chunked
key time
attributes data
tolerate 2 failures
''')
a.add_space('''
space compressed_c
key time
attributes data
tolerate 2 failures
''')
a.add_space('''
space encrypted_cc
key time
attributes data
tolerate 2 failures
''')


a.add_space('''
space chunked2
key time
attributes data, temp_skin
subspace temp_skin
tolerate 2 failures
''')
a.add_space('''
space compressed_c2
key time
attributes data, temp_skin
subspace temp_skin
tolerate 2 failures
''')
a.add_space('''
space encrypted_cc2
key time
attributes data, temp_skin
subspace temp_skin
tolerate 2 failures
''')

0 comments on commit 4accc28

Please sign in to comment.