This PR introduces a manifest option sgx.trusted_files_cache_size which specifies the cache size allocated for trusted files. A trusted file is cached if the file is opened more than 10 times. Cache eviction policy is Least Recently Used aka LRU. This optimization is used when there are frequently-reused files.
Below are the results with and without this PR for nginx run:
Marit
Threads
Native
SGX (without page cache)
SGX (with page cache)
Degradation without page cache
Degradation with page cache
Requests/sec
64
965844
386647
759754
60%
21%
Fixes #1712
How to test this PR?
Change worker_processes value to auto in CI-Examples/nginx/nginx-gramine.conf.template
Add open_file_cache max=1024 inactive=10s; under http { block in CI-Examples/nginx/nginx-gramine.conf.template
cd gramine/CI-Examples/nginx
make clean && make SGX=1
Initial 1-3 run with gramine-sgx might give low performance results as trusted file chunks are added to the page cache for the first time. After 1-3 iterations results become consistent.
check issue #1712 for details.
This PR introduces a manifest option
sgx.trusted_files_cache_size
which specifies the cache size allocated for trusted files. A trusted file is cached if the file is opened more than 10 times. Cache eviction policy is Least Recently Used aka LRU. This optimization is used when there are frequently-reused files.Below are the results with and without this PR for nginx run:
Fixes #1712
How to test this PR?
Change
worker_processes
value toauto
inCI-Examples/nginx/nginx-gramine.conf.template
Addopen_file_cache max=1024 inactive=10s;
underhttp {
block inCI-Examples/nginx/nginx-gramine.conf.template
Native run:
SGX run:
Initial 1-3 run with gramine-sgx might give low performance results as trusted file chunks are added to the page cache for the first time. After 1-3 iterations results become consistent.
This change is