[ovs-discuss] Poor GRE performance - maybe due to using ip_gre kernel module ?

D3c3 Balus d3c3balus at gmail.com
Mon Jul 4 20:34:36 UTC 2016


Hello,

I’m using 2 Ubuntu Xenial 16.04 LTS with the following:
- kernel:  4.4.0-28-generic
- OVS version:  2.5.0  (installed from ubuntu packages: openvswitch-common & openvswitch-switch)

I’m configuring a GRE tunnel between OVS bridges running on each of the machines with:

ovs-vsctl add-port br0 tun0 -- set Interface tun0 type=gre options:remote_ip=x.x.x.x

and I achieve connectivity between VMs, as desired, via the GRE tunnel.


Problem:  iperf test show really low performance (734 bits/sec !!) considering a baseline that shows  almost 1G over the direct link.

Troubleshooting performed:
1. increased MTU of the physical link on both sides: `ip link set dev enp0s8 mtu 2000`  => same poor perf
2. increased MTU of the br0 on both OVS bridges: `ip link set dev br0 mtu 1700`  => same poor perf

[FYI:   I performed the same operations on an older version of Ubuntu = Trusty 14.04 LTS, kernel 3.13.0-86, and after adjusting the MTU as above, the GRE performance was satisfactory ~ 414 Mbps !! ]

I continued troubleshooting my Ubuntu Xenial 16.04 (kernel 4.4.0-28):
3. I noticed that this system has these interfaces gre0 at NONE, gretap0 at NONE, gre_sys at NONE  (which did not appear on Ubuntu Trusty 14.04, kernel 3.13.0-86) and realized that Ubuntu Xenial 16.04 uses the linux kernel module ip_gre instead of the one provided by Open vSwitch:

SNAPSHOT from Ubuntu Xenial 16.04 (kernel 4.4.0-28):
```
root at xenial ~$ lsmod | grep gre
vport_gre              16384  1
ip_gre                 20480  1 vport_gre
ip_tunnel              28672  1 ip_gre
gre                    16384  1 ip_gre
openvswitch            98304  3 vport_gre

root at xenial ~$ dmesg | grep gre
..
[  379.947836] gre: GRE over IPv4 demultiplexor driver
[  379.955295] ip_gre: GRE over IPv4 tunneling driver
[  379.960352] device gre_sys entered promiscuous mode
```

SNAPSHOT from Ubuntu Trusty (kernel 3.13.0-86):
```
root at trusty ~$ lsmod | grep gre
gre                    13796  1 openvswitch

root at trusty ~$ dmesg | grep gre
[    9.270743] gre: GRE over IPv4 demultiplexor driver
root at box-0 ~$
```

3. It seems that latest OVS version uses vport_gre kernel module for GRE and this one depends on Linux GRE module (ip_gre):

```
root at xenial ~$ modinfo vport_gre
filename:       /lib/modules/4.4.0-28-generic/kernel/net/openvswitch/vport-gre.ko
alias:          vport-type-3
license:        GPL
description:    OVS: GRE switching port
srcversion:     A4455AB407AE7569E81E791
depends:        openvswitch,ip_gre
intree:         Y
vermagic:       4.4.0-28-generic SMP mod_unload modversions
```



Questions:
1.  is this intended - that the latest versions of OVS uses the linux GRE module (instead of its own, as it seem it was the case in the past)?
2. I tried stopping OVS and unloading the Linux GRE module - but that was unsuccessful.  How should I fix my problem in order to achieve satisfactory level of performance over GRE ?


Thank you,


DC


More information about the discuss mailing list