Apply suggestions from code review

Co-authored-by: Steve Loeppky <biglep@protocol.ai>
This commit is contained in:
Antonio Navarro Perez 2022-12-07 10:18:31 +01:00
parent 22a03bda6d
commit 7a8639ee33
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ var noLimitIncrease = rcmgr.BaseLimitIncrease{
// The defaults follow the documentation in docs/config.md.
// Any changes in the logic here should be reflected there.
func createDefaultLimitConfig(cfg config.SwarmConfig) (rcmgr.LimitConfig, error) {
maxMemoryDefaultString := humanize.Bytes(uint64(memory.TotalMemory()) / 2)
maxMemoryDefaultString := humanize.Bytes(uint64(memory.TotalMemory()) / 4)
maxMemoryString := cfg.ResourceMgr.MaxMemory.WithDefault(maxMemoryDefaultString)
maxMemory, err := humanize.ParseBytes(maxMemoryString)
if err != nil {

View File

@ -1875,7 +1875,7 @@ This value is also used to scale the limit on various resources at various scope
when the default limits (discuseed above) are used.
For example, increasing this value will increase the default limit for incoming connections.
Default: `[TOTAL_SYSTEM_MEMORY]/2`
Default: `[TOTAL_SYSTEM_MEMORY]/4`
Type: `optionalBytes`
#### `Swarm.ResourceMgr.MaxFileDescriptors`