To achieve an ideal granularity (small granularity tasks to utilize parallelism but not too small granularity that brings unacceptable overhead), it requires us to analyze and understand the pattern of a specific work and the hardware(# of cores, k-way SIMD, # of execution contexts) we have in hand.
sstritte
To summarize, when choosing task size, there are two at-odds considerations:
- We want many small granularity tasks because this enables good workload balance via dynamic assignment.
- But we also want few large granularity tasks so that there is less overhead in managing the tasks.
To achieve an ideal granularity (small granularity tasks to utilize parallelism but not too small granularity that brings unacceptable overhead), it requires us to analyze and understand the pattern of a specific work and the hardware(# of cores, k-way SIMD, # of execution contexts) we have in hand.
To summarize, when choosing task size, there are two at-odds considerations: - We want many small granularity tasks because this enables good workload balance via dynamic assignment. - But we also want few large granularity tasks so that there is less overhead in managing the tasks.