## 6 Evaluation
### Simulations
#### 6.1.1 Settings  
We implemented the simulations using Java on a PC with an Intel Core i7-8700 CPU at 3.20-gigahertz (GHz) and 16-gigabyte (GB) memory (Intel Corporation, Santa Clara, CA, USA). In the following, we describe the algorithms, datasets, and benchmark measures used in the simulations. **Algorithms. ** We compared DynDLOn and DynDLOff with four state-of-the-art data-locality-aware task-scheduling algorithms. Among the algorithms, Hadoop, DELAY, and DynDLOn are online algorithms, which make scheduling decisions when a core is free, while list scheduling (LIST), Local-Tasks-First Priority Algorithm (LTFPA), HTA, BAR, and DynDLOff are offline algorithms, which assume that all cores' initial loads are already known. * Hadoop [2] is the default task-scheduling algorithm used by Hadoop. When a server is free, the algorithm chooses a data-local task, then assigns the task to the server. If there is no feasible task, then the algorithm selects a random data-remote task. * DELAY [7] offers a variation on delay scheduling. The algorithm predefines a fixed delay threshold. If a server is free and there is no data-local task for the server, the algorithm skips the server. It will not assign data-remote tasks to the server until the delay exceeds the delay threshold. In the simulations, the delay threshold is set to 3. * LIST is a variant of the classic list scheduling algorithm [49]. LIST first sorts the tasks by IDs, and then assigns them to the servers with the predicted earliest finish time so far. To compute the predicted finish time, LIST computes each server's load based on the numbers of data-local tasks and data-remote tasks that have been assigned to the server. Besides, LIST considers the dynamic data transfer cost on each server. * LTFPA [50] is a simple local-tasks-first priority algorithm used by [PERSON] [15]. The algorithm maintains a data-local queue \(Q_{m}\) for each server \(m\). When server \(m\) becomes idle, the algorithm sends the head-of-line task from \(Q_{m}\). When server \(m\) becomes idle and \(Q_{m}\) is empty, the scheduler sends a remote task to server \(m\) from the longest queue in the system, if the length of the longest queue exceeds the threshold. Theoretically, the algorithm is throughput-optimal and heavy-traffic-optimal for all traffic scenarios. LTFPA considers the dynamic data transfer costs by modeling data-remote tasks' runtime as random variables. * HTA is the first algorithm designed for solving the Hadoop task-assignment problem [13]. It uses a non-decreasing function to model the dynamic data transfer costs. Unlike DynDL, its data transfer costs change with the total number of servers' data-remote tasks. * BAR [14] is a faster algorithm for solving the HTA problem, and also considers the dynamic data transfer costs. **Datasets and parameters. ** We implemented a workload generator to generate the initial loads and data placement for each simulation. The initial loads were generated as follows. For a core whose ID was \(m\) (\(0\leq m<|P|\)), we mapped it to the server whose ID was \(\lfloor m/core\_num\rfloor\), where \(core\_num\) is the number of cores on a server. The initial load of core \(m\) was randomly chosen from the range \([0,f_{init}(m)]\), where  
\[f_{init}(m)=\frac{\alpha\cdot m}{core\_num}+\beta\]  
Here, \(\alpha\) is a load skewness factor. When \(\alpha=0\), all the cores' initial loads were chosen from \([0,\beta]\). When \(\alpha>0\), the cores with smaller IDs had lower initial loads. In the dataset, the initial loads are represented by a series of key-value pairs like \"\(core_{1}\_load_{1}\); \(core_{2}\_load_{2}\); \(\cdots\)\". For the data placements, the generator randomly selected \(k\) servers from a discrete uniform distribution on the interval \([0,|S|)\) for each task, where \(k\) is the number of data replicas. By default, \(k\) was set to 3. We assumed the task was data-local if it was assigned to the selected servers.