Chinaunix首页 | 论坛 | 博客
  • 博客访问: 22338
  • 博文数量: 3
  • 博客积分: 28
  • 博客等级: 民兵
  • 技术积分: 25
  • 用 户 组: 普通用户
  • 注册时间: 2012-02-28 09:32
文章分类
文章存档

2013年(3)

我的朋友

分类: 系统运维

2013-02-01 08:45:01

Zenoss发布一款用于性能压力测试的工具。工具主要是模拟多少台设备监控(RRD写入)情况下的Zenoss监控节点的承受能力。
对于4.X的用户而言,可以直接运行该程序。
对于3.X或老版本用户而言,需要首先安装argparse模块。
在Zenoss用户下执行安装。

点击(此处)折叠或打开

  1. $ wget -c
  2. $ tar zxvf argparse-1.2.1.tar.gz
  3. $ cd argparse-1.2.1
  4. $ python setup.py install
将Zenoss压力测试工具上传到Zenoss home目录,给予执行权限后,直接执行。 rrdpound3.rar   

点击(此处)折叠或打开

  1. $ chmod +x rrdpound3.py

通过工具帮助理解工具参数:

点击(此处)折叠或打开

  1. $ ./rrdpound3.py -h
  2. usage: rrdpound3.py [-h] [--cycles CYCLES] [--cycle-time CYCLE_TIME]
  3. [--device-count DEVICE_COUNT]
  4. [--device-datapoints DEVICE_DATAPOINTS]
  5. [--component-count COMPONENT_COUNT]
  6. [--component-datapoints COMPONENT_DATAPOINTS]
  7. [--processes PROCESSES] [--perf-path PERF_PATH]
  8. optional arguments:
  9. -h, --help show this help message and exit
  10. --cycles CYCLES Number of times to run benchmark [10] #测试次数
  11. --cycle-time CYCLE_TIME
  12. Data collection interval [10] #数据收集间隔
  13. --device-count DEVICE_COUNT 
  14. Number of devices to simulate #模拟被监控设备数量
  15. --device-datapoints DEVICE_DATAPOINTS
  16. Number of datapoints per device [10] #模拟一台设备中Graph所需的数据点(主机类数据点)
  17. --component-count COMPONENT_COUNT
  18. Number of components per device [50] #模拟一台设备包含的组件个数
  19. --component-datapoints COMPONENT_DATAPOINTS
  20. Number of datapoints per component [7] #模拟每个组件所需的数据点(组件数据点)
  21. --processes PROCESSES
  22. Number of datapoints per component [1] #这里的提示错了,应该是处理测试的进程数
  23. --perf-path PERF_PATH
  24. Path to the perform the test on
  25. [/opt/zenoss/perf/perftest] #测试性能所需目录。实际上是在/opt/zenoss/perf下再建立目录。

一台设备所有数据点=“--device-datapoints”+“--component-count”*“--component-datapoints”
再乘以“--device-count”就可以模拟出一台监控服务器可以承担的数量。
根据实际环境,我们做出如下测试:


点击(此处)折叠或打开

  1. ./rrdpound3.py --cycle-time 300 --device-count 1000 --device-datapoints=10 --component-count=5 --component-datapoints=6 --perf-path perftest
  2. cycles: 10
  3. cycle time: 300
  4. device count: 1000
  5. datapoints per device 10
  6. component count: 5
  7. datapoints per device: 6
  8. processes: 1
  9. perf path: perftest
  10. 35.996 (1111.225/sec)
  11. 7.183 (5568.505/sec)
  12. 6.977 (5733.392/sec)
  13. 6.413 (6237.008/sec)
  14. 6.925 (5776.187/sec)
  15. 6.928 (5773.313/sec)
  16. 95.893 (417.132/sec)
  17. 13.605 (2940.000/sec)
  18. 6.937 (5765.876/sec)
  19. 7.022 (5696.384/sec)
除了第一次需要创建RRD文件以后,其它时间都在10S左右完成。当然,95.863这次估计是Zenoss的Zenperfsnmp也在运行。
再来看看实际800台设备的运行情况:

点击(此处)折叠或打开

  1. # find /opt/zenoss/perf/Devices/ -type f -name *.rrd |wc -l
  2. 36239
  3. # more /opt/zenoss/log/zenperfsnmp.log |grep 'Cycle lasted '
  4. 2012-08-27 09:12:25,635 INFO zen.zenperfsnmp: Cycle lasted 18.69 seconds
  5. 2012-08-27 09:17:25,492 INFO zen.zenperfsnmp: Cycle lasted 18.55 seconds
  6. 2012-08-27 09:22:25,475 INFO zen.zenperfsnmp: Cycle lasted 18.53 seconds
  7. 2012-08-27 09:27:18,697 INFO zen.zenperfsnmp: Cycle lasted 11.76 seconds
  8. 2012-08-27 09:32:18,377 INFO zen.zenperfsnmp: Cycle lasted 11.43 seconds
  9. 2012-08-27 09:37:20,884 INFO zen.zenperfsnmp: Cycle lasted 13.90 seconds
  10. 2012-08-27 09:42:19,341 INFO zen.zenperfsnmp: Cycle lasted 12.40 seconds

测试结果与实际平台比较接近。

阅读(1903) | 评论(0) | 转发(0) |
0

上一篇:Zenoss HA高可用配置(Heartbeat DRBD)记录

下一篇:没有了

给主人留下些什么吧!~~