首页 > 代码库 > 妙用Openstack 解决 Rally 性能测试
妙用Openstack 解决 Rally 性能测试
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
(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:
妙用Openstack 解决 Rally 性能测试
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。