本帖最后由 atsky123 于 2015-12-17 20:10 编辑
问题导读
1.什么是Rally?
2.如何部署Rally?
3.如何通过Rally测试 nova 创建-删除虚拟机性能?
Rally 简介
Rally 集成了部署、API测试、压力测试功能(如下图),但我们一般用 devstack 部署,tempest 做 API 测试,因此 Rally 常用于模拟高并发场景的压力测试。Rally 测试 openstack 在并发下 API 的相应时间和请求成功率,从而测试出 openstack 规模和性能。
1. Deploy Rally
$ git clone https://git.openstack.org/stackforge/rally
$ ./rally/install_rally.sh -v #使用 virtualenv 安装 Rally
2. Configure Rally
$ source /opt/rally/bin/activate
$ rally deployment create --filename=existing.json --name=openstack # 初始化 Rally,把所需测试 openstack 集群的 keystone url,用户租户信息写入到 existing.json 中
$ rally deployment check # 查看集群的 service
# 查看集群的 service
(rally)[root@controller ~]# rally deployment check
keystone endpoints are valid and following services are available:
+------------+----------------+-----------+
| services | type | status |
+------------+----------------+-----------+
| ceilometer | metering | Available |
| cinder | volume | Available |
| cinderv2 | volumev2 | Available |
| ec2 | ec2 | Available |
| glance | image | Available |
| heat | cloudformation | Available |
| heat | orchestration | Available |
| keystone | identity | Available |
| neutron | network | Available |
| nova | compute | Available |
| novav3 | computev3 | Available |
| s3 | s3 | Available |
| trove | database | Available |
+------------+----------------+-----------+
|
3. Benchmark Openstack Peformance
rally/doc/samples/tasks/scenarios/ 包含各个组件的配置文件,直接使用即可,举例: 1)测试 keystone 创建-删除用户性能
$ rally -v task start rally/doc/samples/tasks/scenarios/keystone/create-and-delete-user.json Result:
2)测试 nova 创建-删除虚拟机性能
$ rally -v task start rally/doc/samples/tasks/scenarios/nova/boot-and-delete.json Result:
4. Refference
|