From 7a8639ee336989010dcc941ef7dcdbe803deffaa Mon Sep 17 00:00:00 2001 From: Antonio Navarro Perez Date: Wed, 7 Dec 2022 10:18:31 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Steve Loeppky --- core/node/libp2p/rcmgr_defaults.go | 2 +- docs/config.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/node/libp2p/rcmgr_defaults.go b/core/node/libp2p/rcmgr_defaults.go index 16aac5289..4283b131e 100644 --- a/core/node/libp2p/rcmgr_defaults.go +++ b/core/node/libp2p/rcmgr_defaults.go @@ -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 { diff --git a/docs/config.md b/docs/config.md index 4819ebc8e..1946d157d 100644 --- a/docs/config.md +++ b/docs/config.md @@ -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`