Chinaunix首页 | 论坛 | 博客
  • 博客访问: 43432
  • 博文数量: 21
  • 博客积分: 439
  • 博客等级: 下士
  • 技术积分: 210
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-26 13:34
文章分类
文章存档

2012年(21)

我的朋友

分类: 虚拟化

2012-11-04 07:46:10

   目前vmware exsi的项目纷纷上线,但研发测试部门反馈在测试使用VM搭建的子域测试网卡组播的时候,发现有组播丢包的问题, 问题一出现即马上在线下环境搭建测试环境进行验证,初期验证结果同研发测试部门一致有丢包情况出现,但在两台不用的物理机的虚拟机之间无组播丢包的情况出现,并在同一台物理机上的一虚拟机走两块不同的网卡之间丢包情况严重,在同一台物理机上的一虚拟机走一块相同的网卡之间丢包减少,结论初期判定为服务器网卡cache的问题导致,但调整VM的网卡参数后发现未明显减少丢包情况,于是查阅了资料和文档,发现测试组播的命令msendmdump在设定的参数上有些问题,经过周六日在家的大量验证,周一和架构师的分析确认,最终认定测试网卡组播丢包的问题在测试工具本身设置的cache参数相关,更改mtools的cache后,至此组播丢包问题解决
   linux下的组播压力测试工具推荐使用mtools,能模拟大量的组播请求从而达到测试的目的,详细使用方法为:

mtools是组播测试工具,支持FreeBSDSunoswin2kLinux等多种操作系统,丰富的可选参数能够测出点对点、多对点、多对多之间组播传输的丢包率。Msend用于组播发送,mdump用于组播接收。

msend具体参数如下:

Usage: msend [-1|2|3|4|5] [-b burst_count] [-d] [-h] [-l loops] [-m msg_len] [-n num_bursts] [-p pause] [-P payload] [-q] [-s stat_pause] [-S Sndbuf_size] group port [ttl] [interface]

Where:

  -1 : pre-load opts for basic connectivity (1 short msg per sec for 10 min)

  -2 : pre-load opts for long msglen (1 5k msg each sec for 5 seconds)

  -3 : pre-load opts for moderate load (bursts of 100 8K msgs for 5 seconds)

  -4 : pre-load opts for heavy load (1 burst of 5000 short msgs)

  -5 : pre-load opts for VERY heavy load (1 burst of 50,000 800-byte msgs)

  -b burst_count : number of messages per burst [1]

  -d : decimal numbers in messages [hex])

  -h : help

  -l loops : number of times to loop test [1]

  -m msg_len : length of each message (0=use length of sequence number) [0]

  -n num_bursts : number of bursts to send (0=infinite) [0]

  -p pause : pause (milliseconds) between bursts [1000]

  -P payload : hex digits for message content (implicit -m)

  -q : loop more quietly (can use '-qq' for complete silence)

  -s stat_pause : pause (milliseconds) before sending stat msg (0=no stat) [0]

  -S Sndbuf_size : size (bytes) of UDP send buffer (SO_SNDBUF) [65536]

                   (use 0 for system default buff size)

  -t :tcp ('group' becomes destination IP) [multicast]

  -u : unicast udp ('group' becomes destination IP) [multicast]

 

group : multicast group or IP address to send to (required)

port : destination port (required)

ttl : time-to-live (limits transition through routers) [2]

interface : optional IP addr of local interface (for multi-homed hosts)

实例:从172.17.33.35239.1.1.5组播地址的11115端口发送组播

m70 -n1 -p1000 -q -s2000 S0  239.1.1.5 11115 15 192.168.37.30

其中-b5000发送5000个包,-m70每个包70字节(千兆网络环境选择20,百兆网络环境选择70-n1发送一个-p1000间隔1s发送一个burst-S0buffer的大小,选择0为使用系统默认值,239.1.1.5为组播地址,11115为组播端口,15是组播生命周期,172.17.33.35为本机IP

发送结束后,发送端会提示如下:

Sending 1 bursts of 5000 20-byte messages

.Pausing before sending 'stat'

Sending stat

5000 messages sent (not including 'stat')

mdump具体参数如下:

Usage: mdump [-h] [-q] [-Q Quiet_lvl] [-r rcvbuf_size] [-p pause_ms/num] [-v] [-s] group port [interface]

Where:

  -h : help

  -o ofile : print results to file (in addition to stdout)

  -p pause_ms[/num] : milliseconds to pause after each receive [0: no pause]

and number of loops to apply the pause [0: all loops]

  -Q Quiet_lvl : set quiet level [0] :

                 0 - print full datagram contents

                 1 - print datagram summaries

                 2 - no print per datagram (same as '-q')

  -q : no print per datagram (same as '-Q 2')

  -r rcvbuf_size : size (bytes) of UDP receive buffer (SO_RCVBUF) [4194304]

                   (use 0 for system default buff size)

  -s : stop execution when status msg received

  -t : Use TCP (use '0.0.0.0' for group)

  -v : verify the sequence numbers

 

group : multicast address to receive (required, use '0.0.0.0' for unicast)

port : destination port (required)

interface : optional IP addr of local interface (for multi-homed hosts) [INADDR_ANY]

实例:在172.17.33.17239.1.1.5组播地址的11115端口接受组播

其中-o指定log保存名称,-q不输出到屏幕,239.1.1.5组播地址,11115组播端口,172.17.33.17为本机IP

测试结束后,组播接收端log最后一行,即为此次组播测试的丢包率,如下:

5000 msgs sent, 5000 received (not including 'stat')

0.000000% loss

Normal 0 7.8 磅 0 2 false false false EN-US ZH-CN X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:普通表格; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.5pt; mso-bidi-font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-font-kerning:1.0pt;}
Normal 0 7.8 磅 0 2 false false false EN-US ZH-CN X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:普通表格; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.5pt; mso-bidi-font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-font-kerning:1.0pt;}
阅读(3226) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~