Skip to content

Commit d9cd8ff

Browse files
committed
Fix: IPFS Kubo could use unlimited resources
In observations on multiple CRNs and CCNs, it seems to use around 700-900 MB. Limiting the resources to 2GB and hard to 4GB seems therefore sensible.
1 parent 1a38ca7 commit d9cd8ff

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

packaging/aleph-vm/etc/ipfs/kubo.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@
99
"Strategy": "roots"
1010
},
1111
"Swarm": {
12-
"EnableHolePunching":false,
12+
"EnableHolePunching": false,
1313
"RelayService": {
1414
"Enabled": false
15+
},
16+
"ResourceMgr": {
17+
"MaxMemory": "1GB"
1518
}
1619
}
17-
}
20+
}

packaging/aleph-vm/etc/systemd/system/ipfs.service

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ ProtectHome=true
5050
RemoveIPC=true
5151
RestrictSUIDSGID=true
5252
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
53+
MemoryHigh=2G
54+
MemoryMax=4G
5355

5456
# enable for 1-1024 port listening
5557
#AmbientCapabilities=CAP_NET_BIND_SERVICE

0 commit comments

Comments
 (0)