Skip to content

Commit

Permalink
Set fs cache limit to 4G by default (#735)
Browse files Browse the repository at this point in the history
Co-authored-by: 杨赫然 <[email protected]>
  • Loading branch information
feiniks and 杨赫然 authored Jan 22, 2025
1 parent 29829b5 commit 4181851
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit 4181851

Please sign in to comment.