奥斯陆消息基准编排器
ombt-orchestrator的Python项目详细描述
消息总线评估框架
上下文
这是一个框架,用于对oslo.messaging支持的通信中间件进行基准测试。它的主要目标是解决https://docs.openstack.org/performance-docs/latest/test_plans/massively_distribute_rpc/plan.html的计算问题。
它建立在:
从高层的角度来看,框架能够部署
- 通信总线(例如rabbitmq、qdr,又称qpid调度路由器),
- 将通信的一组客户机/服务器
- 在收集指标的同时开始基准测试
典型的测试包括以下组件:
Client 1---------+ +----------------------+ +-----> Server 1
| | | |
+----> | Communication | ----+-----> Server 2
Client 2--------------> | Middleware | |
+----> | (e.g qdr, rabbitms) | |
... | | | |
| +----------------------+ +------> Server n
Client n---------+ | /
\ /
\ | /
\ -- -- -- -- -- Monitoring -- -- -- -- --
安装
- 克隆存储库:
git clone https://github.com/msimonin/ombt-orchestrator
cd ombt-orchestrator
- 安装依赖项
pip install -U pip
pip install -e .
On Grid'5000 you can launch this command from any frontend.
配置
默认配置当前在conf.yaml
文件中定义。
命令行界面
> oo
Usage: oo [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
backup Backup environment logs [after test_case_*].
campaign Perform a TEST according to the (swept)...
deploy Claim resources from a PROVIDER and configure...
destroy Destroy all the running dockers (keeping...
g5k Claim resources on Grid'5000 (frontend).
inventory Generate the Ansible inventory [after g5k,...
prepare Configure available resources [after g5k,...
test_case_1 Run the test case 1: one single large...
test_case_2 Run the test case 2: multiple distributed...
test_case_3 Run the test case 3: one single large...
test_case_4 Run the test case 4: multiple distributed...
vagrant Claim resources on vagrant (localhost).
运行测试用例的工作流
- 部署和启动基准测试(配置文件中定义了默认驱动程序
broker
)
# default confs.yaml on $PWD will be read
> oo deploy --driver=broker vagrant
# Launch the one benchmark
> oo test_case_1 --nbr_clients 10 --nbr_servers 2
Adapt to the relevant provider (e.g
g5k
)
- 实时度量可视化
Grafana在控制节点的端口3000上可用(检查库存文件)。
- 备份环境
> oo backup
The files retrieved by this action are located in
current/backup
dir by default.
- 为下次跑步做一些清洁和准备
# Preparing the next run by cleaning the environment
> oo destroy
> oo deploy vagrant
# Next run
> oo test_case_1 --nbr_clients 20 --nbr_servers 2
It's possible to force an experimentation dir with
--env mydir
Note also that scripting from python is also possible using the function defined in
task.py
##运行活动的工作流
- 活动是对给定测试用例的多个配置的批量执行。 基准的部署和执行是从配置文件中读取的。例如, 要运行在框架上启用的第一个测试用例,请运行:
> oo campaign --provider g5k test_case_1
或者,可以在incremental模式下执行活动,在这种模式下部署 仅当定义了不同的
driver
或call_type
时执行。增量活动 对配置中定义的参数使用不同的语义执行。 对于增量选项,语义基于 指配置文件中一组数据之间的点积(即azip
) 参数列表之间的操作)。这些参数由测试用例定义 如下所示:- 测试用例1:
nbr_clients
、nbr_servers
和pause
- 测试用例2:
nbr_topics
和pause
- 测试用例3:
nbr_clients
、nbr_servers
和pause
(仅rpc-cast
调用) - 测试用例4:
nbr_topics
和pause
(仅rpc-cast
调用)
- 测试用例1:
要执行增量活动,请确保使用ombt版本
msimonin/ombt:singleton
而不是默认值并执行:
> oo campaign --incremental --provider g5k test_case_1
其他
- 将客户端或服务器绑定到特定总线代理:
要将ombt客户机绑定到特定的总线实例,可以声明以下内容
roles: [bus, bus-client]
。
遵循同样的想法,ombt服务器可以使用
roles: [bus, bus-server]