This microbenchmark compares socket latency of standard inet/loopback vs. host to nitro enclave communication over vsock.
To list all the available workflows and config variables implemented in the Makefile, run:
make helpBefore you continue on the EC2 instances, ensure you have prepared the requirements.
Benchmark inet/local-loopback vs vsock latency with varying packet sizes, via:
./run.shBenchmark NIC vs. NIC + tcp/vsock proxy + vsock latency with varying packet sizes. Both scenarios need to be executed seperately:
- Start the server on 1 EC2 instance:
or
source prepare.sh && ./expose-host-server.sh
source prepare.sh && ./expose-enclave-server.sh
- Start the client on the other EC2 instance with the peer's aws-internal ip-address and the according result identifier
cross_instance_host2hostorcross_instance_host2enclave:source prepare.sh && ./run-cross-instance.sh [server-ip-address] [result-identifier]
For profiling the proxy overhead the client-server rountrip can be extended with a tcp-proxy in between as baseline against the vsock/tcp-proxy.
- This can be run either on a single instance:
source prepare.sh && ./run-proxy-local.sh
- or across EC2 instances:
- On the server Instance:
source prepare.sh && ./expose-host-proxy.sh
- On the client Instance:
export CLIENT_PORT=5006 source prepare.sh && ./run-cross-instance.sh [server-ip-address] "cross_instance_proxy"
- On the server Instance:
The results can be combined and plottet via:
make plotWe have added our results used in the paper to the repository.
If you want to rerun the experiments, see the instructions above to generate your own numbers. You can then download them from your S3 Bucket via:
export S3_BUCKET=[your-s3-bucket]/SockLatency
export S3_PROFILE=[your-aws-profile]
make download-results plotThe entire benchmarking process is automated in the Makefile. See make help to learn about its usage.
All results are written to results/data and plotted to results/img with plot/plot.py via make plot.
The app directory contains the c++ application for latency measurement between 2 peers (client, server)
over inet or vsock.
The execution scripts can be found in scripts. This includes a minimal proxy script, to expose the enclave server for cross-instance experiments.
The deploy directory contains everything related to aws, docker and the enclave build process.
We tested with the following EC2 instances:
Single Instance:
- Instance Sizes:
- c6i.2xlarge
- c6i.4xlarge
- c6i.8xlarge
- c6i.16xlarge
- Instance Generations:
- c5i.2xlarge
- c6i.2xlarge
- c7i.2xlarge
- CPU architecture:
- c6i.2xlarge
- c6a.2xlarge
- c6g.2xlarge
- Premium NICs:
- c6in.2xlarge
- c6in.4xlarge
Cross-Instance (we chose client and server instances symmetrically):
- c6in.16xlarge