R13B SMP Migration logic

本文介绍了Erlang OTP在多核环境下通过迁移逻辑实现负载均衡的方法,包括收集调度器运行队列的最大长度统计数据、计算每个优先级运行队列的平均限制并设置迁移路径等步骤。此外还涉及了工作窃取机制以及如何在满负荷或非满负荷情况下进行任务迁移。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

原文地址:[url]http://erlang-factory.com/upload/presentations/105/KennethLundin-ErlangFactory2009London-AboutErlangOTPandMulti-coreperformanceinparticular.pdf[/url]

Migration logic

* Strive to keep the maximum number of run able
processes equal on all schedulers

* Load balancing is performed by the scheduler that
first reaches its max limit of reductions.
1. Collect statistics about the maxlength of all
schedulers run-queues
2. Calculate the average limit per run-queue/prio and
setup migration paths
3. Give away jobs from schedulers over the limit,
Take jobs to schedulers under the limit

* Migrations occurs when the scheduler has finished
a job and goes on until the limit is reached or a new
loadbalancing takes place.

* There is also work-stealing , which occurs when a
scheduler gets an emty run-queue

* Running on full load or not!

If all schedulers are not fully loaded, jobs will be
migrated to schedulers with lower id’s and thus
making some schedulers inactive.

这个就是为什么R13的多处理器支持强好多的原因。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值