Network performance while using VXLAN or GRE

 

While using VXLAN, a header is added to all packets sent by your instances.  This information is required by this protocol for VXLAN to do his magic.  Same thing applies to GRE.  This can cause fragmentation (poor network performance) as your packets will be bigger than the default MTU of 1500.

To fix that problem, you can make your instances default interface MTU setting to 1400 instead of 1500.  This way, VXLAN header will not cause fragmentation anymore.  Here is how to do that:

This is achieved by dhcp server sending out 1400 MTU to instances as a dhcp option.

* Create file /etc/neutron/dnsmasq-neutron.conf with below content in it.

dhcp-option-force=26,1400

* Edit /etc/neutron/dhcp_agent.ini and add below.

dnsmasq_config_file=/etc/neutron/dnsmasq-neutron.conf

* Then kill all existing dnsmasq processes and restart dhcp-agent. Or reboot the network node.

# service neutron-dhcp-agent restart

Spin-up a new instance or reboot an existing instance. Verify that your network interface MTU setting is now 1400.