You are not logged in.

#1 2016-09-12 06:24:48

Stitch
Member
Registered: 2009-06-10
Posts: 23

Systemd nspawn container networking performance issues/delays.

I've been doing some testing with systemd nspawn containers and encountered a strange performance issue that I cannot fix. Host, VMs and containers are all with systemd networking setup.
This happens when a container has a static IP address and connected to a bridge

The host is setup for KVM virtualisation so that physical interfaces are connected to bridges which in turn have IP addresses configured. Bridges are setup by the host with systemd-networkd.
The setup has no problems with KVM VMs once they are plugged into the bridges. No performance issues or anything.

If I start an nspawn container with "systemd-nspawn -bD ./container --network-bridge=br0" connecting it to the same bridges and give the container a static IP address (as with all the VMs) I experience strange delays.

Simple ping from outside the host takes about 8-10 seconds to locate the container. Once found it pings normally. Any consequent pings, if done right away, work fine.
If I wait for a bout a minute and try pinging again, the delay is back. So I have to wait for 10 seconds for the container to be found. Then everything is normal... Any connection to any service on the container has this initial delay.

Any ideas would be greatly appreciated.

Maybe it is something to do with the fact that KVM uses taps and nspawn uses veth pairs to setup internal networking?

Thanks.

Offline

Board footer

Powered by FluxBB