Code Monkey home page Code Monkey logo

scalable-oblivious-primitives's Introduction

Distributed SGX Sort

Dependencies

This project requires Ubuntu 20.04 LTS to run. The following libraries are required:

The install-dependencies.sh script in the scripts folder will set up the required repositories and install the dependencies for you through APT. This script must be run as root If you do not wish to use APT, you may follow the installation guide for each library individually.

Additionally, you must have openssl available in your PATH, which is used to generate the signed enclave object.

Compilation

This project uses Git submodules. If you did not clone recursively, please run, git submodule update --init --recursive to initialize the submodules.

This project uses Make to compile the project. Run make in order to compile the project from the home directory.

Invocation

The usage of this project is as follows:

./host/parallel ./enclave/parallel_enc.signed array_size [num_threads]

This instantiates a array of size array_size and sorts it obliviously. To run a distributed sorting instance, use mpirun:

mpirun [-hosts host_list] ./host/parallel ./enclave/parallel_enc.signed array_size [num_threads]

Make sure that the files are available at the same path for all MPI hosts. An easy way to do this is to use rsync or scp to copy the files to the same path or use NFS to mount a shared volume across all machines.

Profiling

Because profiling cannot be performed from inside enclaves, a host-only version of the binary is available, with adjustable compilation flags. An easy way to compile a host-only version of the binary with gprof is to use

make HOSTONLY_CFLAGS=-pg HOSTONLY_LDFLAGS=-pg hostonly

and invoke with

./hostonly array_size [num_threads]

or

mpirun [-hosts host_list] ./hostonly array_size [num_threads]

The outputted gprof profile may then be analyzed using

gprof ./hostonly

Benchmarking

Benchmarking can be performed with scripts available in the scripts directory. The benchmark.sh script will run all available sorting algorithms from 1 to 32 enclaves, each with 1 to 8 threads. This script assumes that each host will have the hostname enclaveN, where N is the zero-index of the enclave. The benchmarked outputs are placed in a benchmarks folder.

scalable-oblivious-primitives's People

Contributors

x1anwang avatar

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.