SHARE
TWEET

openstack_network_benchmark_vmtp

a guest Dec 5th, 2017 519 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## vmtp http://vmtp.readthedocs.io/en/latest/quickstart_pip.html
  2. [root@controller ~]# date
  3. Tue Mar 21 09:40:41 CET 2017
  4. [root@controller ~]# cat /etc/redhat-release
  5. CentOS Linux release 7.3.1611 (Core)
  6. [root@controller ~]# uname -a
  7. Linux controller 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
  8. [root@controller ~]# yum install -y gcc python-devel python-pip python-virtualenv git
  9. [root@controller ~]# yum install -y libxml2-devel libxslt-devel libffi-devel libyaml-devel openssl-devel
  10. [root@controller ~]# virtualenv ./vmtpenv
  11. [root@controller ~]# source ./vmtpenv/bin/activate
  12. (vmtpenv)[root@controller ~]# pip install vmtp
  13. (vmtpenv)[root@controller ~]# vmtp --version
  14. 2.3.3
  15. (vmtpenv)[root@controller ~]# vmtp -sc > vmtp.cfg
  16. (vmtpenv)[root@controller ~]# grep -v \# vmtp.cfg | grep -v ^$
  17. ---
  18. image_name:  'ubuntu-14.04'
  19. ssh_vm_username: 'ubuntu'
  20. flavor_type: 'm1.medium'
  21. flavor:
  22.   vcpus: 1
  23.   ram: 2048
  24.   disk: 0
  25. availability_zone:
  26. dns_nameservers: [ '8.8.8.8' ]
  27. vm_image_url: ''
  28. reuse_network_name:
  29. floating_ip: True
  30. reuse_existing_vm:
  31. config_drive:
  32. user_data_file:
  33. ipv6_mode:
  34. router_name: 'pns-router'
  35. internal_network_name: ['pns-internal-net', 'pns-internal-net2']
  36. internal_subnet_name: ['pns-internal-subnet', 'pns-internal-subnet2']
  37. internal_subnet_name_ipv6: ['pns-internal-v6-subnet','pns-internal-v6-subnet2']
  38. internal_cidr: ['192.168.1.0/24' , '192.168.2.0/24']
  39. internal_cidr_v6: ['2001:45::/64','2001:46::/64']
  40. public_key_file: /root/.ssh/vmtp.pub
  41. private_key_file: /root/.ssh/vmtp
  42. public_key_name: 'vmtp'
  43. vm_name_server:  'TestServer'
  44. vm_name_client:   'TestClient'
  45. security_group_name: 'pns-security'
  46. ping_count: 2
  47. ping_pass_threshold: 80
  48. ssh_retry_count: 50
  49. generic_retry_count: 50
  50. tcp_tp_loop_count: 3
  51. tcp_pkt_sizes: [65536]
  52. udp_pkt_sizes: [128, 1024, 8192]
  53. icmp_pkt_sizes: [64, 391, 1500]
  54. udp_loss_rate_range: [2, 5]
  55. vm_bandwidth: 0
  56. os_dataplane_network: 'physnet1'
  57. vmtp_db: "client_db"
  58. vmtp_collection: "pns_web_entry"
  59.  
  60. # make nuttcp executable if needed
  61. (vmtpenv)[root@controller ~]# find vmtpenv -name 'nuttcp-7.3.2' | xargs ls -l
  62. -rw-r--r--. 1 root root 154592 Apr 10 10:56 vmtpenv/lib/python2.7/site-packages/vmtp/tools/nuttcp-7.3.2
  63. (vmtpenv)[root@controller ~]# chmod +x vmtpenv/lib/python2.7/site-packages/vmtp/tools/nuttcp-7.3.2
  64. (vmtpenv)[root@controller ~]# find vmtpenv -name 'nuttcp-7.3.2' | xargs ls -l
  65. -rwxr-xr-x. 1 root root 154592 Apr 10 10:56 vmtpenv/lib/python2.7/site-packages/vmtp/tools/nuttcp-7.3.2
  66.  
  67. (vmtpenv)[root@controller ~]# DATE=$(date '+%Y%m%d_%H%M');vmtp -d -r adminrc_v2.0 -c vmtp.cfg --host root@10.0.0.132:eno1 --external-host root@10.0.0.135 --json /tmp/vmtp_$DATE.json --log-file /tmp/vmtp_$DATE.log
  68. 2017-03-23 11:55:04,683 INFO Summary of results                                                                                                                                                   [341/1848]
  69. ==================
  70. Total Scenarios:   29
  71. Passed Scenarios:  22 [100.00%]
  72. Failed Scenarios:  0 [0.00%]
  73. Skipped Scenarios: 7
  74. +----------+-------------------------------------------------------+-------------------+----------------------------------------------------------------------------------+
  75. | Scenario | Scenario Name                                         | Functional Status | Data                                                                             |
  76. +----------+-------------------------------------------------------+-------------------+----------------------------------------------------------------------------------+
  77. | 1.1      | Same Network, Fixed IP, Intra-node, TCP               | PASSED            | {'tp_kbps': '17210715', 'rtt_ms': '0.33'}                                        |
  78. | 1.2      | Same Network, Fixed IP, Intra-node, UDP               | PASSED            | {128: {'tp_kbps': 187795, 'loss_rate': 0.09}, 1024: {'tp_kbps': 1481722,         |
  79. |          |                                                       |                   | 'loss_rate': 0.0}, 8192: {'tp_kbps': 9509605, 'loss_rate': 0.28}}                |
  80. | 1.3      | Same Network, Fixed IP, Intra-node, ICMP              | PASSED            | {'rtt avg/min/max/stddev msec': {'391-byte': '0.389/0.251/0.534/0.083',          |
  81. |          |                                                       |                   | '64-byte': '0.385/0.288/0.755/0.136', '1500-byte': '0.417/0.309/0.533/0.072'}}   |
  82. | 1.4      | Same Network, Fixed IP, Intra-node, Multicast         | SKIPPED           | {}                                                                               |
  83. | 2.1      | Same Network, Fixed IP, Inter-node, TCP               | PASSED            | {'tp_kbps': '960007', 'rtt_ms': '0.54'}                                          |
  84. | 2.2      | Same Network, Fixed IP, Inter-node, UDP               | PASSED            | {128: {'tp_kbps': 247919, 'loss_rate': 3.66}, 1024: {'tp_kbps': 957863,          |
  85. |          |                                                       |                   | 'loss_rate': 1.5}, 8192: {'tp_kbps': 944790, 'loss_rate': 8.22}}                 |
  86. | 2.3      | Same Network, Fixed IP, Inter-node, ICMP              | PASSED            | {'rtt avg/min/max/stddev msec': {'391-byte': '0.611/0.414/0.741/0.091',          |
  87. |          |                                                       |                   | '64-byte': '0.590/0.404/0.983/0.189', '1500-byte': '0.764/0.645/0.866/0.073'}}   |
  88. | 2.4      | Same Network, Fixed IP, Inter-node, Multicast         | SKIPPED           | {}                                                                               |
  89. | 3.1      | Different Network, Fixed IP, Intra-node, TCP          | PASSED            | {'tp_kbps': '938540', 'rtt_ms': '0.593333'}                                      |
  90. | 3.2      | Different Network, Fixed IP, Intra-node, UDP          | PASSED            | {128: {'tp_kbps': 80237, 'loss_rate': 0.0}, 1024: {'tp_kbps': 650556,            |
  91. |          |                                                       |                   | 'loss_rate': 0.03}, 8192: {'tp_kbps': 672082, 'loss_rate': 0.0}}                 |
  92. | 3.3      | Different Network, Fixed IP, Intra-node, ICMP         | PASSED            | {'rtt avg/min/max/stddev msec': {'391-byte': '0.687/0.557/0.817/0.090',          |
  93. |          |                                                       |                   | '64-byte': '0.697/0.498/0.887/0.115', '1500-byte': '0/0/0/0'}}                   |
  94. | 3.4      | Different Network, Fixed IP, Intra-node, Multicast    | SKIPPED           | {}                                                                               |
  95. | 4.1      | Different Network, Fixed IP, Inter-node, TCP          | PASSED            | {'tp_kbps': '946773', 'rtt_ms': '0.62'}                                          |
  96. | 4.2      | Different Network, Fixed IP, Inter-node, UDP          | PASSED            | {128: {'tp_kbps': 80161, 'loss_rate': 0.0}, 1024: {'tp_kbps': 642173,            |
  97. |          |                                                       |                   | 'loss_rate': 0.14}, 8192: {'tp_kbps': 672362, 'loss_rate': 0.0}}                 |
  98. | 4.3      | Different Network, Fixed IP, Inter-node, ICMP         | PASSED            | {'rtt avg/min/max/stddev msec': {'391-byte': '0.771/0.588/0.946/0.096',          |
  99. |          |                                                       |                   | '64-byte': '0.860/0.588/2.563/0.569', '1500-byte': '1.088/0.955/1.269/0.094'}}   |
  100. | 4.4      | Different Network, Fixed IP, Inter-node, Multicast    | SKIPPED           | {}                                                                               |
  101. | 5.1      | Different Network, Floating IP, Intra-node, TCP       | PASSED            | {'tp_kbps': '937689', 'rtt_ms': '0.676667'}                                      |
  102. | 5.2      | Different Network, Floating IP, Intra-node, UDP       | PASSED            | {128: {'tp_kbps': 74626, 'loss_rate': 0.0}, 1024: {'tp_kbps': 597941,            |
  103. |          |                                                       |                   | 'loss_rate': 0.0}, 8192: {'tp_kbps': 666293, 'loss_rate': 0.0}}                  |
  104. | 5.3      | Different Network, Floating IP, Intra-node, ICMP      | PASSED            | {'rtt avg/min/max/stddev msec': {'391-byte': '0.738/0.595/0.874/0.092',          |
  105. |          |                                                       |                   | '64-byte': '0.711/0.540/0.848/0.096', '1500-byte': '1.036/0.802/1.270/0.128'}}   |
  106. | 5.4      | Different Network, Floating IP, Intra-node, Multicast | SKIPPED           | {}                                                                               |
  107. | 6.1      | Different Network, Floating IP, Inter-node, TCP       | PASSED            | {'tp_kbps': '946724', 'rtt_ms': '0.766667'}                                      |
  108. | 6.2      | Different Network, Floating IP, Inter-node, UDP       | PASSED            | {128: {'tp_kbps': 74991, 'loss_rate': 0.0}, 1024: {'tp_kbps': 593857,            |
  109. |          |                                                       |                   | 'loss_rate': 0.0}, 8192: {'tp_kbps': 666823, 'loss_rate': 0.0}}                  |
  110. | 6.3      | Different Network, Floating IP, Inter-node, ICMP      | PASSED            | {'rtt avg/min/max/stddev msec': {'391-byte': '0.759/0.635/0.908/0.075',          |
  111. |          |                                                       |                   | '64-byte': '0.711/0.600/0.816/0.072', '1500-byte': '1.011/0.883/1.154/0.077'}}   |
  112. | 6.4      | Different Network, Floating IP, Inter-node, Multicast | SKIPPED           | {}                                                                               |
  113. | 7.1      | Native Throughput, TCP                                | PASSED            | {'tp_kbps': '29415205', 'rtt_ms': '0.07'}                                        |
  114. | 7.2      | Native Throughput, UDP                                | PASSED            | {128: {'tp_kbps': 226642, 'loss_rate': 0.0}, 1024: {'tp_kbps': 1746762,          |
  115. |          |                                                       |                   | 'loss_rate': 0.0}, 8192: {'tp_kbps': 9746475, 'loss_rate': 0.0}}                 |
  116. | 7.3      | Native Throughput, ICMP                               | PASSED            | {'rtt avg/min/max/stddev msec': {'391-byte': '0.063/0.023/0.080/0.018',          |
  117. |          |                                                       |                   | '64-byte': '0.065/0.046/0.093/0.015', '1500-byte': '0.061/0.025/0.084/0.018'}}   |
  118. | 7.4      | Native Throughput, Multicast                          | SKIPPED           | {}                                                                               |
  119. | 8.1      | VM to Host Uploading                                  | PASSED            | {'tp_kbps': '948511', 'rtt_ms': '0.556667'}                                      |
  120. | 8.2      | VM to Host Downloading                                | PASSED            | {'tp_kbps': '955047', 'rtt_ms': '0.556667'}                                      |
  121. +----------+-------------------------------------------------------+-------------------+----------------------------------------------------------------------------------+
  122. 2017-03-23 11:55:04,689 INFO Saving results in json file: vmtp_20170323_1137.json...
  123. (vmtpenv)[root@controller ~]# vmtp_genchart -c /tmp/vmtp_20170323_1137.html /tmp/vmtp_20170323_1137.json
  124. Generating chart drawing code to /tmp/vmtp_20170323_1137.html...
  125.  
  126. (vmtpenv)[root@controller ~]# vim vmtp_benchmark.sh
  127. #!/bin/sh
  128. set -e
  129.  
  130. . /root/vmtpenv/bin/activate
  131.  
  132. VMTP=$(which vmtp)
  133. VMTP_TASK_START_DATE=$(date '+%Y%m%d_%H%M')
  134. VMTP_FILE_CFG='/root/vmtp.cfg'
  135. # keystone v2.0
  136. VMTP_FILE_RC='/root/adminrc_v2.0'
  137. ### ssh key access required
  138. ## compute node for native host throughput
  139. # user@ip:interface
  140. VMTP_HOST='root@10.0.0.132:eno1'
  141. ### ssh key access required
  142. ## external host for download/upload throughput
  143. # user@ip
  144. VMTP_HOST_EXT='root@10.0.0.135'
  145.  
  146. # start vmtp benchmark
  147. ${VMTP} -d -r ${VMTP_FILE_RC} -c ${VMTP_FILE_CFG} --host ${VMTP_HOST} --external-host ${VMTP_HOST_EXT} --json /tmp/vmtp_${VMTP_TASK_START_DATE}.json --log-file /tmp/vmtp_${VMTP_TASK_START_DATE}.log
  148.  
  149. # generate vmtp html report with timestamp
  150. ${VMTP}_genchart -c /tmp/vmtp_${VMTP_TASK_START_DATE}.html /tmp/vmtp_${VMTP_TASK_START_DATE}.json
  151.  
  152. deactivate
  153.  
  154. (vmtpenv)[root@controller ~]# crontab -l
  155. # rally benchmark once a week
  156. 00 6 * * 5 /root/rally_benchmark.sh rally_benchmark_boot_runcommand_delete.json &> /dev/null
  157. # openstack db backup once a week
  158. 00 22 * * 5 /root/backup_openstack_db.sh &> /dev/null
  159. # vmtp benchmark once a week
  160. 00 6 * * 1 /root/vmtp_benchmark.sh &> /dev/null
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top