Docker network mtu

ElectricEel-24.10.0.2

Does anybody know how to update the mtu on docker0 network interface?

Updating this file; /etc/docker/daemon.json with “mtu” : 1234
Does not work, as this file is over written during a reboot.

Something along the lines of sysctl or init script maybe?

Thank you.
Chris.

Why do you need that?
Some VPN?

For the file, you can always add a bind to a file in TN that can be set read-only.

To answer your question;
I have some docker containers that perform better with higher MTUS.

Sorry what is a bind to a file? I am not familiar with that, can you please shed, provide more details.

Thank you.

Google has the answer, but here it is:

volumes:
- type: bind
source: ./file-in-truenas.log
target: /var/tmp/file-inside-the-container.log
read_only: true

I have to ask again, what kind of containers you use this for?
And you do have to change the MTU of the physical eth interface right?

(Guessing for big data moves like backups? But with modern CPUs, the difference is not that much, so I would like to know how much better the mtu change does in your case?).

Thanks for this, unfortunately this is not what I am looking for.

In this file,
/etc/docker/daemon.json, you can put “mtu”:1234
or you can start docker with
/usr/bin/dockerd --mtu=1234 -H fd:// --containerd=/run/containerd/containerd.sock

if I put the entry in the file, it is overridden on a reboot.
I could do this;
systemctl edit docker.service

But was trying to see if there is a better option where I can configure it via advanced system settings or something like that, then it becomes part of true nas config as opposed to burying like that.