# Distributed parallel computing algorithms for content dependent data

I have implemented group of pictures parallelism for hevc encoding on distributed platform. In this we have to send different video chunks to different machines, these machines encode data in parallel and send data to master node. Here linear improvement in encoding is seen as number of nodes are increased. But now I want to further optimize this algorithm to get better results. Chunks I send to different machines might take different amount of time for encoding depending on content in that video chunk. So which algorithms in distributed parallel processing can be used here to optimize this process? To implement his system I am using OpenMPI framework.

In this situation, the simplest and probably the best possible approach, consists in cyclically mapping tasks to processors, in order to balance the computational load. This is a form of probabilistic mapping (see sub-section on Probabilistic Methods and Cyclic Mappings, just before Section 2.5.2 on the linked web page). As an example, if you have $p$ processors and $n$ tasks (with $n > p$), you can simply assign task $i$ to processor $i \mod p$.