Skip to content

Commit 8643508

Browse files
committed
update about eventlog idle_wait
1 parent dec874f commit 8643508

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,31 @@ Latency(ns), Start Timestamp(ns), End TimeStamp(ns), Event, Overhead, Domain ID
849849
We can locate the event which causes maximun latency with the help of the
850850
script. Fixing the event may improve the throughput of the program.
851851

852+
### Using eventlog to diagnose imbalance in task distribution
853+
854+
Eventlog can be useful to find imbalance in task distribution, if any
855+
in a parallel program. Imbalance in task distribution essentially means that,
856+
not all domains are provided with equal amount of computation to do. In
857+
effect, some domains take longer than others to finish their computations,
858+
while the idle domains keep waiting. A possible occurence of this is when a sub-
859+
optimal chunk_size is picked in a `parallel_for`.
860+
861+
Time periods when a domain is idle is recorded as `domain/idle_wait` in the
862+
eventlog. Here is an example eventlog generated by a program with unbalanced
863+
task distribution.
864+
865+
![eventlog_task_imbalance](images/unbalanced_task1.png)
866+
867+
If we zoom in further, we see many `domain/idle_wait` events.
868+
869+
![eventlog_task_imbalance_zoomed](images/unbalanced_zoomed.png)
870+
871+
So far we have only found that there is an imbalance in task distribution
872+
in the code, we'll need to change our code accordingly to make the task
873+
distribution more balanced, which could increase the speedup.
874+
875+
---
876+
852877
Performace debugging can be quite tricky at times. If you could use some help in
853878
debugging your Multicore OCaml code, feel free to create an issue in the
854879
Multicore OCaml [issue tracker](https://github.com/ocaml-multicore/ocaml-multicore/issues) along with a minimal code example.

images/unbalanced_task1.png

85 KB
Loading

images/unbalanced_zoomed.png

84.8 KB
Loading

0 commit comments

Comments
 (0)