Merge pull request #8180 from subhamkrai/mds-resource-limit

ceph: give resource request preference for mds_cache_memory_limit
This commit is contained in:
Travis Nielsen authored and GitHub committed 2021-07-01 09:08:17 -06:00
commit 5dde16fcf7
2 files changed
+5 -1

No files matched your search

+3
View File
@@ -74,6 +74,9 @@ func (c *Cluster) setDefaultFlagsMonConfigStore(mdsID string) error {
if !c.fs.Spec.MetadataServer.Resources.Limits.Memory().IsZero() {
mdsCacheMemoryLimit := float64(c.fs.Spec.MetadataServer.Resources.Limits.Memory().Value()) * mdsCacheMemoryLimitFactor
configOptions["mds_cache_memory_limit"] = strconv.Itoa(int(mdsCacheMemoryLimit))
} else if !c.fs.Spec.MetadataServer.Resources.Requests.Memory().IsZero() {
mdsCacheMemoryRequest := float64(c.fs.Spec.MetadataServer.Resources.Requests.Memory().Value()) * mdsCacheMemoryResourceFactor
configOptions["mds_cache_memory_limit"] = strconv.Itoa(int(mdsCacheMemoryRequest))
}
// Set mds_join_fs flag to force mds daemon to join a specific fs
+2 -1
View File
@@ -37,7 +37,8 @@ const (
// MDS cache memory limit should be set to 50-60% of RAM reserved for the MDS container
// MDS uses approximately 125% of the value of mds_cache_memory_limit in RAM.
// Eventually we will tune this automatically: http://tracker.ceph.com/issues/36663
mdsCacheMemoryLimitFactor = 0.5
mdsCacheMemoryLimitFactor = 0.5
mdsCacheMemoryResourceFactor = 0.8
)
func (c *Cluster) makeDeployment(mdsConfig *mdsConfig, namespace string) (*apps.Deployment, error) {