NOTE: Although this system is intended & recommended to run on different machines for scale factors greater than 2, we can still run all processes on the same machine.
- Ansible
- Cmake-3.5+
- Thrift RPC library (https://thrift.apache.org/)
- Go >= 1.23
- Redis-Server >= 7.0 (https://redis.io/docs/getting-started/installation/install-redis-on-linux/)
- Clone the repository onto your machine(s).
- Download the DB Tracefiles available here.
- Go into the waffle folder.
sh build.sh
- You should be able to execute waffle/bin/proxy_server
- Go into the cmd folder.
chmod +x ./build.sh && build.sh
- You should be see all executables populate in each of the indivdual folders.
We provide ansible playbooks to run processes.
- Download Waffle tracefile folder from the provided link. (These are not uploaded to github due to new file size restrictions)
- Create tracefiles folder in /waffle/
- Move unzipped tracefiles here.
- Go to /AnsibleScripts/WaffleData/
- Each folder here contains a
deploy.yml
andinventory.ini
file. - You can adjust the
inventory.ini
for your machines (Ip addresses or aliases). Note: If you are running multiple processes on the same machine, please make sure to port number do not conflict. - Make sure
redis-server
is running on the available port you specify ininventory.ini
Run:
sh bench.sh --s-values <in-flight request list>
(Example: sh bench.sh --s-values 1000,2000,3000)
- This will sequentially run benchmarks for the specified in-flight requests (Concurrent requests)
- After completion of each benchmark, a new file will be generated containing total # of requests performed in 30 seconds along with average latency
- By default we use the epinions dataset. To run the Big Data Benchmark, please pass
-bdb
to the resolver process and-q bdb
to the benchmark process. This is already done in all ansible files provided for big data benchmark.
Note: Due to high overhead incurred by ORAM, we provide redis-snapshots that contain the correct dataset and position map. This improves loading time from hours to a couple of minutes.
- Download ORAM tracefiles from the provided link.
- Copy content from
Maps
to /cmd/oramExecutor - Copy
EpinionsSnapshots
andsnapshot_rankings
to a folder on the machine that will have redis running on it. - Specify the location of these folders under the oramDeploy.yml playbooks. Redis should be able to load these tracefiles directly.
- Follow instructions
6 - 10
specified above.
We provide a tests that cover various queries. These are available under /pkg/resolver/resolver_tests.go
. We provide instructions to run these tests on Scale-1. These can be extended to further scales as needed.
- Run the key/value store you want. For this tutorial we'll use waffle.
./bin/proxy_server -l <TRACE_FILE> -b <BATCH_SIZE> -r <SYSTEM_PARAMETER> -f <FAKE_QUERIES_FOR_DUMMY_OBJECTS> -d <NUMBER_OF_DUMMY_OBJECTS> -c <CACHE_SIZE> -n <NUM_CORES> -h <STORAGE_SERVER_IP> -p <STORAGE_PORT>
(Example: ./bin/proxy_server -l ./tracefiles/serverInput.txt -b 3000 -r 2000 -f 170 -d 2000 -c 2 -n 4 -h 127.0.0.1 -p 6379)
tracefile would point to serverInput.txt
under tracefiles.
- Run the Batcher:
./cmd/batchManager/batchManager -p <Batcher_Port> -R <Batch_Size> -Z <Timeout> -num <Scale_Factor> -T <Type> -X <Batch Workers> -hosts <KV Hosts> -ports <KV Ports>
(Example: ./cmd/batchManager/batchManager -p 9500 -R 2000 -Z 500 -num 1 -T Waffle -X 2 -hosts 127.0.0.1 -ports 9090)
- Run the Resolver:
./cmd/resolver/resolver -p <Resolver_Port> -bh <Batcher_Host(s)> -bp <Batcher_Ports>
(Example: ./cmd/resolver/resolver -p 9600 -bh 127.0.0.1 -bp 9500)
You can optionally add -bf
to enable bloom filters. You can add -bf -jo
to enable hybrid bloom filter joins.
- Running Benchmarks/Tests
To Run Tests:
go test ./pkg/resolver/resolver_tests.go
To run benchmark:
./cmd/benchmark/benchmark -h <Resolver_Host(s)> -p <Resolver_Port(s)> -s <In-flight requests> -t <Benchmark Time> -q <Query Type>
(Example: ./cmd/benchmark/benchmark -h 127.0.01 -p 9600 -s 1000 -t 30 -q scaling)
You can also just run Join and Range bloom by passing - jr <TYPE>
where Type=1
is for Join Query and Type=2
is for Range.
If you are running Type=2
then also pass range size -rs <SIZE>
. It will default to 5.