Open
Conversation
jenoudet approved these changes Apr 26, 2023
elega approved these changes Apr 28, 2023
| return lockManager -> new RocksInodeStore(baseDir); | ||
| } else { | ||
| return lockManager -> new CachingInodeStore(new RocksInodeStore(baseDir), lockManager); | ||
| if (Configuration.getBoolean(PropertyKey.MASTER_METASTORE_INODE_CACHE_BASIC)) { |
elega reviewed Apr 28, 2023
| + "or when individual directories contain large numbers of files.") | ||
| .setConsistencyCheckLevel(ConsistencyCheckLevel.ENFORCE) | ||
| .setScope(Scope.MASTER) | ||
| .build(); |
Contributor
There was a problem hiding this comment.
also update line 2689 correspondingly
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.
This adds an alternative inode/edge cache that only stores inodes.
It can be enabled using
alluxio.master.metastore.inode.cache.basicIt is recommended to be used when the master has either limited memory or when directories have large number of files, as the current inode cache must load all edges for a directory in memory.
Caching the inodes is advantageous as they are large objects with expensive serialization/ deserialization, while the edges are only made up of a string (the name) and a long (the id) and are thus faster to load from RocksDB.
Using this cache appears to have a 5-10% slowdown in performing GetStatus operations, but can also improve the performance greatly when the system is under load as there will be less cache thrashing on directories and less long GC pauses.