In this activity, we study the execution of the workflow depicted in Figure 1 on the cyberinfrastructure depicted in Figure 2. A Compute Service (CS) will execute tasks that the Workflow Management System (WMS) submits to it. The CS has at its disposal a single core and will execute only one task at a time. The Storage Service (SS) stores files, much like a database, and handles read and write requests. When the WMS submits a job to the CS, information is included in the job submission that specifies what storage service to use for I/O operations. This is a very simple scenario, and will be used to get our “feet wet” with WRENCH simulations.
We execute the workflow with a WMS that executes tasks on the CS as soon as possible. Each task running on the CS reads and writes data from/to the SS (which, from the perspective of the task, is on a remote host). Once the WMS is notified by the CS that a task has completed, it will greedily submit the next ready task going from left-to-right in the depicted workflow whenever multiple tasks are ready. For example, when task0 has completed and its output has been written to the SS, task1, task2, and task3 become ready. At this point, the WMS will submit task1 for execution to the CS. This process is repeated until workflow execution is complete.
In a terminal, run the following commands.
docker pull wrenchproject/wrench-pedagogic-modules:activity-1
docker container run wrenchproject/wrench-pedagogic-modules:activity-1
Step 2 will display textual simulation output to your terminal window. This output indicates (simulated) actions and events throughout the execution of the workflow.
The simulation will produce output similar to the above snippet of text. The first column denotes the simulation time at which some process is performing some action.
The second column is split into two sections: hostname, and process name. Last is a message describing what the process is doing. For example, the second line from the output
above, [0.000000][my_lab_computer.edu:wms_activity1_3] About to execute a workflow with 5 tasks
tells us
that at simulation time 0.00000, the WMS named wms_activity1, located on the physical host, my_lab_computer.edu, is “About to execute a workflow with 5 tasks”.
Note that the process name is actually wms_activity1_3. The “3” there is added to distinguish different instances of the WMS in case
the simulation executes multiple of them (which we don’t do in this activity).
Simulation output for this activity has been constrained such that only messages from the WMS are visible. Furthermore, the color scheme of the
output has been set up such that general messages are pink, task submissions to the CS are
blue, and notifications received from the CS are
red. You’ll note that, for instance, we do not see any simulation output
corresponding to what the SS is doing. In the following activities, we will expose more simulation output to highlight
areas of interest.
Answer these questions
Analyzing the textual simulation output can be tedious, especially when the workflow comprises many tasks and/or when there are many simulated software services. Fortunately, the simulator can produce a visualization of the workflow execution as a Gantt chart.
In the terminal run the following commands:
docker pull wrenchproject/wrench-pedagogic-modules:ics332-activity-visualization
docker container run -p 3000:3000 -d wrenchproject/wrench-pedagogic-modules:ics332-activity-visualization
<UH Username>@hawaii.edu
Google AccountActivity 1: Running Your First Simulated Workflow Execution
Answer these questions
The CS is reading and writing files from and to a remote storage service, thus contributing to I/O overhead. This overhead can be reduced if the storage service were located on the same host as the CS. Here we introduce the idea of moving computations closer to where the data resides, or data locality.
In the previous steps we ran simulations using the platform scenario described in Figure 2 where the compute service accessed a remote storage service to perform all of the read and write operations as required by the workflow in Figure 1. Now, consider the scenario where a WMS user is only concerned with accessing the initial input file, task0::0.in and the final output file, task4::0.out via the remote storage service. Other files created during the execution of the workflow need not be analyzed or accessed by the WMS user and serve only as intermediate steps required to complete the workflow in its entirety. Furthermore, let us say that another storage service resides on the host hpc.edu and that the CS has access to this storage service. Since the WMS user will only access the remote storage service to handle two files, task0::0.in and task4::0.out, we have enhanced our previous WMS implementation so that it tells the CS to use its local storage service (the storage service located on hpc.edu) for all read and write operations for intermediate files. Figure 3 above illustrates our new cyberinfrastructure and WMS/Workflow scenario.
Using the visualization tool from Step 3, input 10 MB/sec as the link bandwidth. Select the radio button that says: Storage Service on storage_db.edu and hpc.edu. Run the simulation.
Answer these questions
When you are finished using the visualization tool, run: docker kill $(docker ps -a -q --filter ancestor=wrenchproject/wrench-pedagogic-modules:ics332-activity-visualization)
In this activity, we have simulated the execution of a small workflow on two simple distributed computing environments that exposed the cost of performing I/O operations. Using both textual and visual simulation output, you have familiarized yourselves with network bandwidth and data locality, two of the many factors that can affect task turnaround times, which consequently affect overall workflow execution performance. With these concepts in mind, proceed to the next activity, Activity 2: Parallelism, where we construct a more complex distributed computing environment in order to explore the concept of “parallelism”.