chore: update change logs
This commit is contained in:
parent
0801c130b0
commit
f17d2fe9c4
|
@ -21,10 +21,13 @@
|
||||||
[error] Accept error on 0.0.0.0:1883: EMFILE (Too many open files)
|
[error] Accept error on 0.0.0.0:1883: EMFILE (Too many open files)
|
||||||
```
|
```
|
||||||
|
|
||||||
- Improve the performance of the rule engine when there are many rules [#10283](https://github.com/emqx/emqx/pull/10283)
|
- Improve the performance of the rule engine when there are a large number of rules [#10283](https://github.com/emqx/emqx/pull/10283)
|
||||||
Before this change, when there were many rules, the execution of the rule engine became a bottleneck, it consumed a lot of CPU time on rule queries and matches.
|
Before this change, when there were a large number of rules, the execution of the rule engine became a bottleneck, as the rule engine consumed a lot of CPU time on rule queries and matching.
|
||||||
In this optimization, the efficiency of rule execution in this scenario was greatly improved by simply adding a cache to the rule list.
|
In this optimization, we simply added a cache to the rule list, which greatly improved the efficiency of rule execution in this scenario.
|
||||||
In our tests (with over 700 rules), the rule engine achieved a performance improvement of about 5 times after applying this optimization.
|
In our tests, we created 700 rules that did not perform any actions (bound to the "do_nothing" debugging action) on a 32-core, 32GB virtual machine,
|
||||||
|
and sent MQTT messages to EMQX at a rate of 1000 messages per second (i.e. a rule trigger frequency of 700 * 1000 times per second).
|
||||||
|
After applying this optimization, the CPU usage of the rule engine dropped to 55% to 60% of its original level.
|
||||||
|
|
||||||
|
|
||||||
## Bug fixes
|
## Bug fixes
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,9 @@
|
||||||
- 提升规则数量较多时规则引擎的执行性能 [#10283](https://github.com/emqx/emqx/pull/10283)
|
- 提升规则数量较多时规则引擎的执行性能 [#10283](https://github.com/emqx/emqx/pull/10283)
|
||||||
在此改动之前,当规则数量比较多的时候,规则引擎的执行会成为瓶颈,规则引擎将耗费大量 CPU 在规则的查询和匹配上。
|
在此改动之前,当规则数量比较多的时候,规则引擎的执行会成为瓶颈,规则引擎将耗费大量 CPU 在规则的查询和匹配上。
|
||||||
本次优化中,通过简单地给规则列表添加一个缓存,大幅提升了此场景下的规则执行效率。
|
本次优化中,通过简单地给规则列表添加一个缓存,大幅提升了此场景下的规则执行效率。
|
||||||
在我们的测试中(700多条规则),应用此优化后规则引擎获得了 5 倍左右的性能提升。
|
在我们的测试中,在一个 32 核 32G 的虚拟机上,我们创建了 700 条不执行任何动作的规则(绑定了 "do_nothing" 调试动作),
|
||||||
|
并以 1000 条每秒的速度向 EMQX 发送 MQTT 消息(即,规则触发频率为 700 * 1000 次每秒),
|
||||||
|
在应用此优化后,规则引擎的 CPU 使用率下降到了原来的 55% ~ 60%。
|
||||||
|
|
||||||
## 修复
|
## 修复
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue