In previous blog entries, we presented the overview of the TANGO Programming Model (PM) and Runtime as a hierarchical integration of the COMPSs and OmpSs task-based programming models, and how it can facilitate the programming of parallel applications in distributed heterogeneous platforms. We have also commented some energy considerations when programming applications with the TANGO PM. In this blog post, we enter into detail on the impact of the resource self-adaptation features provided by the TANGO PM Runtime in the application execution quality.
One of the most powerful capabilities of the TANGO PM Runtime it's the ability to self-adapt the resources assigned to an application at runtime according to the application load. When running an application parallelized with the TANGO PM, the Runtime dynamically generates a task dependency graph (TDG) from the data dependency between the different task invocations. This figure shows an example of a TDG generated from an application.
The TDG provides beneficial information about what will be the parallel computing load of the application in every moment of the execution. Taking into account this information, the Runtime can adapt the resources to the computing load to speed up the application execution. In this figure, you can see an how the runtime assigns and releases resources to the example application.
Another useful information derived from the TDG is the estimation of the application execution quality. Given a TDG, the number of resources and the task duration and power consumption profiles, the runtime can estimate the total execution time and the consumed energy by emulating a schedule for these tasks in the resources. Moreover, it can also calculate these metrics in the case of having extra computing nodes or removing some of them. It is useful to adapt the number of resources to achieve a specific execution quality such as finished before a deadline, or consuming less than a certain amount of energy. This table shows some examples about how the same application can be adapted to run with a particular quality.
In general, using more resource to execute a parallel application in a distributed infrastructure speeds up the execution but paying the cost of incrementing the consumed energy. It is due to the overhead of the data transfers and the spawning of the remote processes. Another critical factor for energy consumption is the load balancing. Some processes can take longer to compute their part of work. So, it makes that other processes are waiting for them in order to continue with its execution or to finalize the application. In this case, they are at idle state but consuming energy. In this situation, the resource self-adaptation features can help in reducing the unbalancing and also the energy consumption.
In this table, we show an example of how the TANGO PM Runtime improves the quality of the execution using the resource self-adaptation features.The first row shows the results of running the application of the figure with two static resources. These resources have space to run four tasks of the graph in parallel. So, there is an unbalance with the latest two tasks. In the second row, we have run with adaptation and an energy optimization configuration. In this case, the adaptation mechanism tries to use the minimum number of resources but uses a third resource to speed up the execution and to solve the load unbalances.
You can get more information about this at Deliverable 4.2
You can checkout the TANGO Programming Model and Runtime from the TANGO Github