Coming from How to increase the network bandwidth I want to improve local network performance for communication between containers/instance. The docs say:
You must also change the txqueuelen value for all Ethernet interfaces in your instances, in the same way as described for the LXD host.
What would be the best place to do this automatically for all instances? I thought about putting it into the lxd profile but I did not find an option that would allow this in the documentation.
Is it possible to add ifup commands via lxd profile or run some commands after container startup automatically?
Should this be implemented to allow setting ifup and ifdown commands or only for txqueuelen? ifup and ifdown would add a lot more flexibility with only two configuration options.
However in your case you maybe able to utilize a systemd-networkd config to configure the host-side interface (but not the instance side one) by setting a static host-side name by setting host_name setting in LXD for the NIC.
Or you could use the events API as described in that issue.
Thanks for the quick answer. For the host-sides I simply add the required code to my provisioning scripts. Containers are created dynamically on demand so I wanted them to have the setting automatically without the need to add additional provisioning or create custom images.
I understand your point on not supporting hook scripts, stability is a valuable good to keep
Thanks for the hint about events, that’s very useful to me for some other things I’m going to build!