Skip to content

Commit

Permalink
Define custom address pool capacity for docker
Browse files Browse the repository at this point in the history
This commit defines custom address pools to optimize Docker network creation capacity. The pools are set to 172.30.0.0/16 and 172.31.0.0/16 with a /27 subnet size, allowing for up to 4096 Docker networks, each with 32 IP addresses. This change significantly increases the number of available Docker networks, which is crucial for adding large number of apps which are meant to run simultaneously because by default behaviour the capacity would roughly be at 32 networks meaning roughly 32 apps.

(cherry picked from commit 5fd791c)
  • Loading branch information
sonicaj authored and bugclerk committed Aug 30, 2024
1 parent 3464592 commit 6ac1839
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/middlewared/middlewared/etc_files/docker/daemon.json.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ def render(service, middleware):
'exec-opts': ['native.cgroupdriver=cgroupfs'],
'iptables': True,
'storage-driver': 'overlay2',
'default-address-pools': [
{
'base': '172.30.0.0/16',
'size': 27
},
{
'base': '172.31.0.0/16',
'size': 27
},
],
}
isolated = middleware.call_sync('system.advanced.config')['isolated_gpu_pci_ids']
for gpu in filter(lambda x: x not in isolated, get_nvidia_gpus()):
Expand Down

0 comments on commit 6ac1839

Please sign in to comment.