Skip to content

Conversation

@sidkumar99
Copy link
Member

Implement a simple vm.vfs_cache_pressure tuning algorithm. The algorithm works by using a user supplied hint which is the PREFER_OBJECT_CACHING option in the configuration file. This hint indicates if the user would rather have their system preserve dentry and inode object caches at the cost of higher memory utilizaiton. Some workloads are strongly impacted by the level on dentry and inode caching so it may benefit these workloads to have the mm system deprioritize reclaiming these caches. If this option is selected, the inode and dentry numbers are monitored and if they are projected to increase (via the slope of a best line fit), the sysctl is lowered by 10% and if they are projected to decrease, the sysctl is increased by 10%. The opposite behavior occurs if PREFER_OBJECT_CACHING is specified to 0.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Apr 23, 2025
Copy link
Member

@drakenclimber drakenclimber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic looks solid to me. I had a few minor comments but no showstoppers.

@sidkumar99 sidkumar99 force-pushed the vfs_cache_pressure_tuning branch from 056d6ac to 418a8a3 Compare April 23, 2025 20:05
@sidkumar99
Copy link
Member Author

I think I've addressed all your comments from the first review

@sidkumar99 sidkumar99 force-pushed the vfs_cache_pressure_tuning branch from 418a8a3 to 1d65f3e Compare April 23, 2025 20:14
Implement a simple vm.vfs_cache_pressure tuning algorithm. The algorithm
works by using a user supplied hint which is the PREFER_OBJECT_CACHING
option in the configuration file. This hint indicates if the user would
rather have their system preserve dentry and inode object caches at the
cost of higher memory utilizaiton. Some workloads are strongly impacted
by the level on dentry and inode caching so it may benefit these
workloads to have the mm system deprioritize reclaiming these caches. If
this option is selected, the inode and dentry numbers are monitored and
if they are projected to increase (via the slope of a best line fit),
the sysctl is lowered by 10% and if they are projected to decrease, the
sysctl is increased by 10%. The opposite behavior occurs if
PREFER_OBJECT_CACHING is specified to 0.

Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
@sidkumar99 sidkumar99 force-pushed the vfs_cache_pressure_tuning branch from 1d65f3e to 1a17ed7 Compare April 23, 2025 20:15
Copy link
Member

@drakenclimber drakenclimber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Reviewed-by: Tom Hromatka <tom.hromatka@oracle.com>

@sidkumar99 sidkumar99 merged commit 991836e into oracle:master Apr 24, 2025
6 checks passed
@sidkumar99 sidkumar99 deleted the vfs_cache_pressure_tuning branch April 24, 2025 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants