Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set fs cache limit to 4G by default #735

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion fileserver/option/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func initDefaultOptions() {
WebTokenExpireTime = 7200
ClusterSharedTempFileMode = 0600
DefaultQuota = InfiniteQuota
FsCacheLimit = 2 << 30
FsCacheLimit = 4 << 30
VerifyClientBlocks = true
FsIdListRequestTimeout = -1
DBOpTimeout = 60 * time.Second
Expand Down Expand Up @@ -207,6 +207,10 @@ func parseFileServerSection(section *ini.Section) {
FsCacheLimit = fsCacheLimit * 1024 * 1024
}
}
// The ratio of physical memory consumption and fs objects is about 4:1,
// and this part of memory is generally not subject to GC. So the value is
// divided by 4.
FsCacheLimit = FsCacheLimit / 4
if key, err := section.GetKey("fs_id_list_request_timeout"); err == nil {
fsIdListRequestTimeout, err := key.Int64()
if err == nil {
Expand Down
Loading