Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
pulsar
提交
5de4955c
pulsar
项目概览
apache
/
pulsar
通知
129
Star
40
Fork
3
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
pulsar
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Pages
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
提交
体验新版 GitCode,发现更多精彩内容 >>
提交
5de4955c
编写于
5月 16, 2017
作者:
B
Brad McMillen
提交者:
Matteo Merli
5月 16, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update documentation for modular load manager impl (#408)
上级
8ce76313
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
130 addition
and
17 deletion
+130
-17
docs/ModularLoadManager.md
docs/ModularLoadManager.md
+130
-17
未找到文件。
docs/ModularLoadManager.md
浏览文件 @
5de4955c
...
...
@@ -20,6 +20,119 @@ com.yahoo.broker.loadbalance.impl.ModularLoadManagerImpl`
The admin tool may also be used to change back to
`com.yahoo.broker.loadbalance.impl.SimpleLoadManagerImpl`
. In either
case, any mistake in specifying the load manager will cause Pulsar to default to
`SimpleLoadManagerImpl`
.
## Verification
There are a few different ways to determine which load manager is being used:
1.
Run
`pulsar-admin brokers get-all-dynamic-config`
and examine the
`loadManagerClassName`
element:
```
$ ./pulsar-admin brokers get-all-dynamic-config
{
"loadManagerClassName" : "com.yahoo.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl"
}
```
If there is no
`loadManagerClassName`
element, then the default load manager (
`com.yahoo.broker.loadbalance.impl.SimpleLoadManagerImpl`
)
is being used.
2.
Look at a load report in ZooKeeper
With
`com.yahoo.broker.loadbalance.impl.ModularLoadManagerImpl`
, the load report in
`/loadbalance/brokers/...`
will have many differences. E.g., the
`systemResourceUsage`
subelements (
`bandwidthIn`
,
`bandwidthOut`
, ...) are now all at the top-level.
Here is an example load report from
`com.yahoo.broker.loadbalance.impl.ModularLoadManagerImpl`
:
```
ndwidthIn": {
"limit": 10240000.0,
"usage": 4.256510416666667
},
"bandwidthOut": {
"limit": 10240000.0,
"usage": 5.287239583333333
},
"bundles": [],
"cpu": {
"limit": 2400.0,
"usage": 5.7353247655435915
},
"directMemory": {
"limit": 16384.0,
"usage": 1.0
},
...
}
```
With
`com.yahoo.broker.loadbalance.impl.SimpleLoadManagerImpl`
, the load report in
`/loadbalance/brokers/...`
will look like this:
```
{
"systemResourceUsage": {
"bandwidthIn": {
"limit": 10240000.0,
"usage": 0.0
},
"bandwidthOut": {
"limit": 10240000.0,
"usage": 0.0
},
"cpu": {
"limit": 2400.0,
"usage": 0.0
},
"directMemory": {
"limit": 16384.0,
"usage": 1.0
},
"memory": {
"limit": 8192.0,
"usage": 3903.0
}
},
...
}
```
3.
The command-line broker monitor (
`./pulsar-perf monitor-brokers ...`
) will have a different output format depending on which load manager
implementation is being used.
Here is an example from
`com.yahoo.broker.loadbalance.impl.ModularLoadManagerImpl`
:
```
===================================================================================================================
||SYSTEM |CPU % |MEMORY % |DIRECT % |BW IN % |BW OUT % |MAX % ||
|| |0.00 |48.33 |0.01 |0.00 |0.00 |48.33 ||
||COUNT |TOPIC |BUNDLE |PRODUCER |CONSUMER |BUNDLE + |BUNDLE - ||
|| |4 |4 |0 |2 |4 |0 ||
||LATEST |MSG/S IN |MSG/S OUT |TOTAL |KB/S IN |KB/S OUT |TOTAL ||
|| |0.00 |0.00 |0.00 |0.00 |0.00 |0.00 ||
||SHORT |MSG/S IN |MSG/S OUT |TOTAL |KB/S IN |KB/S OUT |TOTAL ||
|| |0.00 |0.00 |0.00 |0.00 |0.00 |0.00 ||
||LONG |MSG/S IN |MSG/S OUT |TOTAL |KB/S IN |KB/S OUT |TOTAL ||
|| |0.00 |0.00 |0.00 |0.00 |0.00 |0.00 ||
===================================================================================================================
```
Here is an example from `com.yahoo.broker.loadbalance.impl.SimpleLoadManagerImpl`:
```
===================================================================================================================
||COUNT |TOPIC |BUNDLE |PRODUCER |CONSUMER |BUNDLE + |BUNDLE - ||
|| |4 |4 |0 |2 |0 |0 ||
||RAW SYSTEM |CPU % |MEMORY % |DIRECT % |BW IN % |BW OUT % |MAX % ||
|| |0.25 |47.94 |0.01 |0.00 |0.00 |47.94 ||
||ALLOC SYSTEM |CPU % |MEMORY % |DIRECT % |BW IN % |BW OUT % |MAX % ||
|| |0.20 |1.89 | |1.27 |3.21 |3.21 ||
||RAW MSG |MSG/S IN |MSG/S OUT |TOTAL |KB/S IN |KB/S OUT |TOTAL ||
|| |0.00 |0.00 |0.00 |0.01 |0.01 |0.01 ||
||ALLOC MSG |MSG/S IN |MSG/S OUT |TOTAL |KB/S IN |KB/S OUT |TOTAL ||
|| |54.84 |134.48 |189.31 |126.54 |320.96 |447.50 ||
===================================================================================================================
```
It is important to note that `com.yahoo.broker.loadbalance.impl.ModularLoadManagerImpl` is _centralized_, meaning all requests
to assign a bundle (whether it's been seen before or whether this is the first time) only get handled by the _lead_ broker
(which can change over time). To determine the current lead broker, examine this node in ZooKeeper: `/loadbalance/leader`
## Implementation
### Data
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录