[LibOS] Add Page Cache feature for trusted files#2011
Open
sahason wants to merge 1 commit intogramineproject:masterfrom
Open
[LibOS] Add Page Cache feature for trusted files#2011sahason wants to merge 1 commit intogramineproject:masterfrom
sahason wants to merge 1 commit intogramineproject:masterfrom
Conversation
The Page Cache feature for trusted files has been implemented using a Least Recently Used (LRU) eviction policy. Files that are accessed more than 10 times will be cached to enhance performance. Additionally, a new manifest option `sgx.trusted_files_cache_size` has been introduced to specify the size of the cache allocated for trusted files. Signed-off-by: Sonali Saha <sonali.saha@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
check issue #1712 for details.
This PR introduces a manifest option
sgx.trusted_files_cache_sizewhich 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_processesvalue toautoinCI-Examples/nginx/nginx-gramine.conf.templateAdd
open_file_cache max=1024 inactive=10s;underhttp {block inCI-Examples/nginx/nginx-gramine.conf.templateNative 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