Requested changes.
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
Antonio Navarro Perez committed
Dec 7, 2022 at 15:23 UTC
a54cf2a95a5e30955a5adfad4b2f3066293e13f8
1 file changed
+4
-4
core/node/libp2p/rcmgr_defaults.go
+4
-4
@@ -69,8 +69,8 @@ Run 'ipfs swarm limit all' to see the resulting limits.
69
70
scalingLimitConfig := rcmgr.ScalingLimitConfig{
71
SystemBaseLimit: rcmgr.BaseLimit{
72
- Memory: rcmgr.DefaultLimits.SystemBaseLimit.Memory,
73
- FD: rcmgr.DefaultLimits.SystemBaseLimit.FD,
72
+ Memory: int64(maxMemory),
73
+ FD: int(numFD),
74
75
// By default, we just limit connections on the inbound side.
76
Conns: bigEnough,
@@ -87,8 +87,8 @@ Run 'ipfs swarm limit all' to see the resulting limits.
87
// Most limits don't see an increase because they're already infinite/bigEnough or at their max value.
88
// The values that should scale based on the amount of memory allocated to libp2p need to increase accordingly.
89
SystemLimitIncrease: rcmgr.BaseLimitIncrease{
90
- Memory: rcmgr.DefaultLimits.SystemLimitIncrease.Memory,
91
- FDFraction: rcmgr.DefaultLimits.SystemLimitIncrease.FDFraction,
90
+ Memory: 0,
91
+ FDFraction: 0,
92
93
Conns: 0,
94
ConnsInbound: rcmgr.DefaultLimits.SystemLimitIncrease.ConnsInbound,