host/calico/overlay简单性能测试

目标

对比一下docker overlay、calico和host网络的带宽,延迟。

测试环境硬件

  • 千兆网卡 BCM5719
  • CPU E5-2630 0 @ 2.30GHz

测试环境软件

  • kernel 3.10.0-327
  • docker 1.12.3
  • calico 0.23.0

测试的compose

1. calico compose


netperf1:
  image: netperf:1.0
  net: vnet
  restart: always
  mem_limit: 20480M
  labels:
    - "com.alipay.proj=netperf"
  environment:
    - "affinity:container!=*netperf*"
    - "constraint:node==*test1*"
  command: /sbin/init
netperf2:
  image: netperf:1.0
  net: vnet
  restart: always
  mem_limit: 20480M
  labels:
    - "com.alipay.proj=netperf"
  environment:
    - "affinity:container!=*netperf*"
    - "constraint:node==*test2*"
  command: /sbin/init

2. overlay compose


netperf1:
  image: netperf:1.0
  net: vxlan
  restart: always
  mem_limit: 20480M
  labels:
    - "com.alipay.proj=netperf"
  environment:
    - "affinity:container!=*netperf*"
    - "constraint:node==*test1*"
  command: /sbin/init
netperf2:
  image: netperf:1.0
  net: vxlan
  restart: always
  mem_limit: 20480M
  labels:
    - "com.alipay.proj=netperf"
  environment:
    - "affinity:container!=*netperf*"
    - "constraint:node==*test2*"
  command: /sbin/init

3. host compose


netperf1:
  image: netperf:1.0
  net: host
  restart: always
  mem_limit: 20480M
  labels:
    - "com.alipay.proj=netperf"
  environment:
    - "affinity:container!=*netperf*"
    - "constraint:node==*test1*"
  command: /sbin/init
netperf2:
  image: netperf:1.0
  net: host
  restart: always
  mem_limit: 20480M
  labels:
    - "com.alipay.proj=netperf"
  environment:
    - "affinity:container!=*netperf*"
    - "constraint:node==*test2*"
  command: /sbin/init

测试结果

1. host


[root@satest1 /]# time qperf netperf_netperf2_1 --time 20  tcp_bw tcp_lat  udp_lat
tcp_bw:
    bw  =  118 MB/sec
tcp_lat:
    latency  =  48.2 us
udp_lat:
    latency  =  46.1 us

2. calico


[root@55fd7810562d /]# time qperf netperf_netperf2_1 --time 20  tcp_bw tcp_lat  udp_lat
tcp_bw:
    bw  =  118 MB/sec
tcp_lat:
    latency  =  54.1 us
udp_lat:
    latency  =  50.3 us

3. vxlan


[root@1472d4ce9a24 /]# time qperf netperf_netperf2_1 --time 20  tcp_bw tcp_lat  udp_lat
tcp_bw:
    bw  =  114 MB/sec
tcp_lat:
    latency  =  63.5 us
udp_lat:
    latency  =  58.5 us
此条目发表在System分类目录。将固定链接加入收藏夹。

发表评论