@cryptotaxi247 / kubo / commits / 22a03bda6

Increase MaxMemory param to use half of total memory.

Previously it was using 1/8 of the total memory. Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>

Antonio Navarro Perez committed Dec 2, 2022 at 12:23 UTC 22a03bda6da3b4a11d26589bc65a848540d04859
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()) / 8)
48 + maxMemoryDefaultString := humanize.Bytes(uint64(memory.TotalMemory()) / 2)
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]/8`
1878 +Default: `[TOTAL_SYSTEM_MEMORY]/2`
1879 Type: `optionalBytes`
1880
1881 #### `Swarm.ResourceMgr.MaxFileDescriptors`