@cryptotaxi247 / kubo / commits / 7a8639ee3

Apply suggestions from code review

Co-authored-by: Steve Loeppky <biglep@protocol.ai>

Antonio Navarro Perez committed Dec 7, 2022 at 10:18 UTC 7a8639ee336989010dcc941ef7dcdbe803deffaa
2 files changed +2 -2
core/node/libp2p/rcmgr_defaults.go
+1 -1
@@ -45,7 +45,7 @@ var noLimitIncrease = rcmgr.BaseLimitIncrease{
45 // The defaults follow the documentation in docs/config.md.
46 // Any changes in the logic here should be reflected there.
47 func createDefaultLimitConfig(cfg config.SwarmConfig) (rcmgr.LimitConfig, error) {
48 - maxMemoryDefaultString := humanize.Bytes(uint64(memory.TotalMemory()) / 2)
48 + maxMemoryDefaultString := humanize.Bytes(uint64(memory.TotalMemory()) / 4)
49 maxMemoryString := cfg.ResourceMgr.MaxMemory.WithDefault(maxMemoryDefaultString)
50 maxMemory, err := humanize.ParseBytes(maxMemoryString)
51 if err != nil {
docs/config.md
+1 -1
@@ -1875,7 +1875,7 @@ This value is also used to scale the limit on various resources at various scope
1875 when the default limits (discuseed above) are used.
1876 For example, increasing this value will increase the default limit for incoming connections.
1877
1878 -Default: `[TOTAL_SYSTEM_MEMORY]/2`
1878 +Default: `[TOTAL_SYSTEM_MEMORY]/4`
1879 Type: `optionalBytes`
1880
1881 #### `Swarm.ResourceMgr.MaxFileDescriptors`