d*******n 发帖数: 369 | 1 怎样分配multithread 在multi core上。
1. 简单情况,假定有8 cores. 一个process有多个threads, 然后你用affinity指定这
个process只能用 4 of 8 cores, 这样这多个threads由系统决定怎么share这4个core.
2. 多个process每个只有一个thread, 这多个process都被assigned了同样的4个cores(
same affinity)。那应该也是系统决定怎么在这几个process中share这4个core。对吧。
3. 要是单个process单个thread但还是被分了4个core, 这thread是不是也会根据load
在4个core间跳了跳去以达到均衡the load?
补充,更正? |
e****d 发帖数: 895 | 2 Doesn't it depend on platform and OS?
core.
cores(
吧。
load
【在 d*******n 的大作中提到】 : 怎样分配multithread 在multi core上。 : 1. 简单情况,假定有8 cores. 一个process有多个threads, 然后你用affinity指定这 : 个process只能用 4 of 8 cores, 这样这多个threads由系统决定怎么share这4个core. : 2. 多个process每个只有一个thread, 这多个process都被assigned了同样的4个cores( : same affinity)。那应该也是系统决定怎么在这几个process中share这4个core。对吧。 : 3. 要是单个process单个thread但还是被分了4个core, 这thread是不是也会根据load : 在4个core间跳了跳去以达到均衡the load? : 补充,更正?
|
b******n 发帖数: 592 | 3
core.
cores(
吧。
load
除非node都有load,才会有多个thread在同一个node,个人感觉只有node overload之
后才应该会有跳的调整。这个应该跟architecture很有关系,如果一个process的
thread被分配到不同的socket,内存不是uma的话不是很惨。而且系统应该考虑到
thread跳动的cost。系统cpu的load均衡不均衡不是很重要,除非都utilized了,然后
有一些overload,另外一些空闲。
如果要自己控制的话,应该要考虑系统的内存,cpu,如果不能掌握具体的环境参数,
还是让系统去控制分配。
【在 d*******n 的大作中提到】 : 怎样分配multithread 在multi core上。 : 1. 简单情况,假定有8 cores. 一个process有多个threads, 然后你用affinity指定这 : 个process只能用 4 of 8 cores, 这样这多个threads由系统决定怎么share这4个core. : 2. 多个process每个只有一个thread, 这多个process都被assigned了同样的4个cores( : same affinity)。那应该也是系统决定怎么在这几个process中share这4个core。对吧。 : 3. 要是单个process单个thread但还是被分了4个core, 这thread是不是也会根据load : 在4个core间跳了跳去以达到均衡the load? : 补充,更正?
|
d*******n 发帖数: 369 | 4 I'm talking about Linux. Also, there's a way called floating affinity or sth
like that, which can further control how each THREAD allocated on each
cores (finer tune).
【在 e****d 的大作中提到】 : Doesn't it depend on platform and OS? : : core. : cores( : 吧。 : load
|
e****d 发帖数: 895 | 5 What kind of advantage can you archieve at this level of
fine tuning?
sth
【在 d*******n 的大作中提到】 : I'm talking about Linux. Also, there's a way called floating affinity or sth : like that, which can further control how each THREAD allocated on each : cores (finer tune).
|
h***i 发帖数: 1970 | 6 maybe for a batch scheduler?
【在 e****d 的大作中提到】 : What kind of advantage can you archieve at this level of : fine tuning? : : sth
|