Full text
Dynamic Reconfiguration of Non-iterative Scientific Applications: A Case Study with HPG-aligner Journal Title XX(X):1–11 c The Author(s) 2016 Reprints and permission: sagepub.co.uk/journalsPermissions.nav DOI: 10.1177/ToBeAssigned www.sagepub.com/ Sergio Iserte1, Héctor Martínez1, Sergio Barrachina1, Maribel Castillo1, Rafael Mayo1and Antonio J. Peña2 Abstract Several studies have proved the benefits of job malleability, i.e., the capacity of an application to adapt its parallelism to a dynamically changing number of allocated processors. The most remarkable advantages of executing malleable jobs as part of a high performance computer workload are the throughput increase and the more efficient utilization of the underlying resources. Malleability has been mostly applied to iterative applications where all the processes execute the same operations over different sets of data and with a balanced per process load. Unfortunately, not all scientific applications adhere to this process-level malleable job structure. There are scientific applications which are either non-iterative or present an irregular per process load distribution. Unlike many other reconfiguration tools, the Dynamic Management of Resources Application Programming Interface (DMR API) provides the necessary flexibility to make malleable these out-of-target applications. In this paper we study the particular case of using the DMR API to generate a malleable version of HPG-aligner, a distributed-memory non-iterative genomic sequencer featuring an irregular communication pattern among processes. Through this first conversion of an out-of-target application to a malleable job, we both illustrate how the DMR API may be used to convert this type of applications into malleable, and test the benefits of this conversion in production clusters. Our experimental results reveal an important reduction of the malleable HPG-aligner jobs completion time compared to the original HPG-aligner version. Furthermore, HPG-aligner malleable workloads achieve a greater throughput than their fixed counterparts. Keywords High-throughput Computing, Dynamic Resource Management, Adaptive Workload, MPI Malleability, Bioinformatics Productivity Introduction The expense in High-performance Computing (HPC) infrastructures is rapidly growing as more and more users are requiring its services, and the applications requirements are becoming more and more demanding. HPC systems are being used by a large number of users which execute a wide variety of complex applications. Whereas the users would like their applications to finish as soon as possible, HPC system administrators and managers are mostly concerned about the throughput of their premises, i.e., the number of jobs that are completed per unit of time. Generally, a user of an HPC system asks for a given number of processes to be used for executing his/her application, and this request is stored in a pending jobs queue. The order in which the pending jobs will be executed is determined by a queue manager that will try to maximize the resources usage while keeping under an acceptable threshold the waiting time of the retained jobs. In this scenario, and depending on the users’ requests and the system resources, both the resource usage and the waiting time may well be suboptimal. On the other hand, the number of processes of a malleable job is dynamically determined by the system, not by the user, and may be subsequently modified during its execution Feitelson (1996). Therefore, by including malleable jobs in an HPC system workload, an adaptive workload, which can be tailored to the job queue status and the resource occupation level, is obtained. In this scenario, a fair balance between global throughput and individual performance can be more easily attained. To tailor the resources assigned to an application to the available resources, dynamic reconfiguration tools are used. These tools are composed at least of the next two components: i) a resource management system (RMS); and ii) a parallel runtime. While the former controls which resources are available at a given time, the latter performs the job resizes required to accommodate the malleable job to the variations on the system load. Current malleability frameworks are aimed to regular applications that either have a clearly defined iterative scheme or do not consider data transfers among processes 1Universitat Jaume I (UJI), Castelló de la Plana, Spain 2Barcelona Supercomputing Center (BSC) Corresponding author: Sergio Iserte, Department of Computer Science and Engineering, Universitat Jaume I, 12071, Castelló de la Plana, Spain. Email: siser[email protected] Prepared using sagej.cls [Version: 2016/06/24 v1.10]
2Journal Title XX(X) (resorting to the disk for storing and loading the current state when a reconfiguration is performed). In fact, all the malleability efforts made so far have ignored out-of-target applications, i.e., non-iterative applications or applications with an irregular communication model (such as the producer-consumer) that requires data transfer management. The main goal of this work is to demonstrate that by leveraging the DMR API Iserte et al. (2017), out-of-target applications can be considered for malleability. Unlike other malleability frameworks, the DMR API provides the coding flexibility and programming easiness that are required to reconfigure most of the current target and out-of-target applications. To illustrate this capability, we have ported the out- of-target biological application HPG-aligner Medina et al. (2016). HPG-aligner is an MPI-based fast RNA sequencer that can be executed on large-scale clusters. HPG-aligner is used to obtain the RNA of an individual by aligning a large number of small fragments of his/her RNA to a reference genome. Our interest in porting this application is to increase the number of RNA fragments that can be sequenced per unit-of-time: i.e., to improve the productivity of a system when being used to map RNA sequences. Since HPG-aligner is the first non-iterative application with a producer-consumer data communication model that has been converted into malleable and introduced in an adaptive workload, with this study we redefine the boundaries of malleability. Furthermore, the experimental results unveil an important reduction in the job completion time (queue waiting time plus execution time) —by minimizing the jobs waiting time—, and present a considerable increase in the throughput when processing adaptive workloads composed exclusively of HPG-aligner instances. Related work Next we present the most relevant efforts in providing frameworks to develop malleable applications, and the applications they have been evaluated on. ReSHAPE, a framework for dynamic resizing and scheduling of homogeneous applications in a parallel environment, was presented in Sudarsan and Ribbens (2007). It uses performance data collected at runtime to support reconfiguring actions, and increases the number of processes of an application when there are available processors in the system and the iteration time has improved due to a previous increase or when the number of processes has never been expanded before. It has been evaluated on: •Three kernels and one pseudo-application from the NAS Parallel Benchmarks∗: Integer Sort (IS), Conjugate Gradient (CG), Fourier Transform (FT), and Lower-Upper Gauss-Seidel solver (LU) (see Sudarsan and Ribbens (2009).) •LAMMPS†, a molecular dynamics simulator. This is the most complex HPC application that has been turned into malleable so far. The malleability capabilities were added exploiting the LAMMPS support for file-based checkpoint and restart (C/R) (see Sudarsan et al. (2009).) •A synthetic workload (see Sudarsan and Ribbens (2016).) Flex-MPI, an MPI extension for supporting dynamic load balancing on heterogeneous non-dedicated systems, is described in Martín et al. (2013). It uses a computational prediction model to evaluate multiple potential reconfiguration scenarios and choose the one which is predicted to best satisfy a performance objective. It was evaluated on three iterative single program multiple data (SPMD) applications: Jacobi, CG, and EpiGraph‡. In Martín et al. (2015), a more comprehensive evaluation of its performance on these applications was conducted using a synthetic workload. The DMR API, dynamic management of resources for OmpSs jobs using Slurm, was presented in Iserte et al. (2016). The DMR API reconfiguration policy considers queued jobs and available resources in order to perform a purely throughput-aware scheduling. It was evaluated on the Conjugate Gradient (CG), Jacobi, and the N-body problem Iserte et al. (2017). In Comprés et al. (2016) the malleability framework Elastic MPI was presented. In this work, Slurm §and MPICH ¶are extended with new functionalities in order to deal with jobs reconfiguration. Slurm has been extended to manage the creation and deletion of MPI processes while handling the resource allocation; whereas new functions were added to MPICH. When these functions are used, the application is initially defined as malleable and its processes will periodically check whether Slurm has initiated a reconfiguration. Although this framework is evaluated on a master-worker application, the application handles the transfers of its sparse grid via MPI IO, without using point-to-point communications and only broadcasting a few variables. An extension of the Torque/Maui batch system with efficient adaptive scheduling for malleable and evolving applications, was introduced in Prabhakaran et al. (2015). Regarding the reconfiguration criteria, the authors resort to adependency-based expand/shrink algorithm that considers the minimum job requirements and the resources of the later expanded job. It was evaluated modifying the ESP benchmark Wong et al. (2000) to contain various percentages of rigid, malleable, and evolving jobs. For the malleable part, one synthetic application was replaced by LeanMDk, a molecular dynamics mini-application which implements a simplified version of the force calculations of NAMD∗∗. In conclusion, it should be emphasized that none of the aforementioned frameworks, although providing different reconfiguration approaches, have ever been applied over noniterative applications with irregular communications patterns with complex data structures. This paper presents the first irregular malleable HPC application with a producer-consumer architecture that ∗http://www.nas.nasa.gov/Software/NPB †http://lammps.sandia.gov ‡http://epigraph.mpi-inf.mpg.de/WebGRAPH §http://slurm.schedmd.com ¶http://www.mpich.org khttp://charm.cs.illinois.edu/research/leanmd ∗∗http://www.ks.uiuc.edu/Research/namd Prepared using sagej.cls
Iserte, Martínez, Barrachina, Castillo, Mayo and Peña 3 check_status action Runtime RMS Reconfiguration policy Job scheduling Resource management App Figure 1. Communication scheme of the DMR API reconfiguration. require data redistribution among processes. With this study, we prove that the DMR API can be leveraged to a wider range of applications, easing the path towards the deployment of full adaptive workloads in HPC facilities. Background In this section we present the DMR API malleability framework and the scientific application targeted in this work. Overview of the DMR API A dynamic reconfiguration system relies on two main components: an RMS and a parallel runtime. In particular, the DMR API, depends on the OmpSs†† runtime (called Nanos++) and Slurm Yoo et al. (2003) workload manager. As shown in Figure 1, the parallel runtime supports the execution of the application and allows it to inform the RMS that it can be resized by issuing a check status request. On the other hand, the RMS is aware of the resource utilization and the queue of pending jobs. When the RMS receives a check status request, it inspects the global status of the system, decides whether any rescaling action should be done, and informs of this decision to the parallel runtime. If a rescale action is due, the RMS, the parallel runtime, and the application will collaborate to continue the application execution with a different number of processes. A general schema of a malleable job using the DMR API is depicted in Listing 1. Once the data has been initialized (line 2), the main loop is entered (line 7). At the beginning of each main loop iteration, the application calls the DMR API dmr_check_status() function (line 8) to inform the resource manager that a resizing can be performed. If no action is returned, the execution will continue normally (line 13). Else, if the RMS responds with a resizing action, either expand or shrink, a handler of a new communicator and the number of processes created in that communicator (handlerNProcs) will be returned. Using this information, the application will set the data dependencies and the communication pattern in order to redistribute the data among the new processes (line 10). Overview of HPG-aligner HPG-aligner is a bioinformatics application for fast and accurate mapping of RNA sequences on a cluster of computers Martínez et al. (2013). It employs several MPI processes, which exploit node level parallelism through POSIX threads. One of these MPI multi threaded processes is configured as a writer, and the others as workers (see 1void main(void) { 2init(data); 3compute(data, 0); 4} 5 6void compute(data, step) { 7for (t = step; t < TIMESTEPS; t++) { 8action = dmr_check_status(&handlerNProcs, ,→&handler); 9if (action) { 10 #pragma omp task inout(data) onto(handler ,→, myRank) 11 compute(data, t); 12 }else { 13 /*Computation */ 14 } 15 } 16 } Listing 1: General schema of a malleable application using the DMR API. reads output Worker #0 Writer Worker #1 Worker #2 Worker #3 Figure 2. HPG-aligner original version workflow. Figure 2). Each worker operates over a particular part of the input file, composed by short RNA fragments (reads) produced by a Next Generation Sequencing (NGS) sequencer. At the beginning of the execution, each worker calculates the indexes of its part of the input file. Then, each worker performs its computation over its self-assigned reads, and sends the alignments it obtains to the writer. Meanwhile, the writer saves the reported alignments to disk. HPG-aligner malleable version In this section we describe how the DMR API has been employed to convert HPG-aligner into a malleable application. Adapting the HPG-aligner workflow The original implementation of HPG-aligner performs a static distribution among all the processes of the whole dataset (i.e., all the RNA reads obtained from an NGS sequencer). This strategy is not desirable for a malleable application, since it would complicate both the redistribution of the yet-to-be-done work among the new processes, and ††http://pm.bsc.es/ompss Prepared using sagej.cls
4Journal Title XX(X) reads output Worker #0 Writer Worker #1 Worker #2 Worker #3 Manager Malleability point While there are chunks to process n chunks Figure 3. HPG-aligner malleable version workflow. the determination of the synchronization point that all the processes must reach to evaluate whether a reconfiguration should be performed. Thus, we have redesigned the HPG- aligner workflow in order to split the input workload into a user-defined number of chunks, which will be dynamically assigned to the worker processes. To allow HPG-aligner to dynamically distribute the dataset, a new process is created, the manager, which is in charge of the distribution of the input dataset chunks among the worker processes. In this new workflow, in Figure 3, when a worker has finished its previously assigned work, it asks the manager for more work. Then, the manager computes the index of the next dataset chunk to be processed, and assigns it to that worker. Moreover, the HPG-aligner workflow has been also modified in order to allow the processes to periodically reach a malleability point, i.e., a synchronization point where the RMS can be asked if a reconfiguration should take place. This may be attained by instructing all the HPG-aligner processes to reach the malleability point after a given number, n, of chunks have been processed. Figure 3illustrates this iterative schema: all the HPG- aligner processes cooperate to compute nchunks of reads, and then all of them reach the malleability point, where a reconfiguration could be triggered. These two steps, processing and reaching the malleability point, are repeated until all the chunks have been processed. To implement this iterative schema and synchronize all the processes at a malleability point, the next strategy and communication schema have been employed. After dispatching nchunks, the manager stops distributing work. Instead, whenever a worker asks for more work, the manager signals to proceed to the malleability point. The worker, for its part, after receiving this signal, propagates it to the writer. This communication schema, see Figure 4, ensures that all processes will eventually reach the malleability point after n chunks are processed. The algorithms used to implement the described strategy and communication schema are depicted next using an MPI pseudo-code. In this pseudo-code, the first argument of the MPI send calls is the data to be transferred, and the second, its destination. Likewise, the first argument of the MPI Worker #0 Worker #1 Manager Writer ready index/sync data/sync data/sync ready index/sync Figure 4. Communication schema of the processes in the HPG-aligner malleable version. receive calls is a buffer for the data to be received, and the second argument, the senders from whom that data is received. Algorithm 1shows the pseudo-code corresponding to a manager iteration. While there are chunks to be processed (line 1), the manager waits for a work petition from any worker (line 2), and in answer to each of these, it provides the index of the next chunk to be processed (line 3). When all the chunks of the current iteration have been assigned, a special signal (a −1) is sent to all the workers (lines 4 to 6) in order to synchronize them at the malleability point (line 7). Algorithm 1 Pseudo-code of a manager iteration 1: while chunks do 2: MPI_Recv(&worker_id, MPI_ANY_SOURCE) 3: MPI_Send(index,worker_id) 4: for each worker do 5: MPI_Irecv(&worker_id,worker) 6: MPI_Isend(-1, worker) 7: /* Malleability point */ Algorithm 2describes the pseudo-code of a worker iteration. First, the worker informs the manager that it is ready to process more work (line 2). Then, it waits until the manager sends back the index of the next chunk of reads assigned to it (line 3). If a −1index is received (lines 4 to 6), it will propagate this signal to the writer and proceed to the malleability point (line 9). Otherwise, it will process the assigned chunk and send its results to the writer. Algorithm 2 Pseudo-code of a worker iteration 1: while 1do 2: MPI_Send(worker,manager) 3: MPI_Recv(&index,manager) 4: if index == -1 then 5: MPI_Send(-1, writer) 6: break 7: compute(index,&data) 8: MPI_Send(data,writer) 9: /* Malleability point */ Finally, Algorithm 3describes the pseudo-code of the writer iteration. The writer listens for data from any worker (line 2). If a −1is received, a counter is increased, and when the value of this counter reaches the number of workers, it will proceed to the malleability point (lines 3 to 6). Otherwise, if an actual result is received, it will write it to disk (line 8). Prepared using sagej.cls
Iserte, Martínez, Barrachina, Castillo, Mayo and Peña 5 Algorithm 3 Pseudo-code of the writer iteration 1: while 1do 2: MPI_Recv(&data, MPI_ANY_SOURCE) 3: if data == −1then 4: cnt =cnt + 1 5: if cnt == n_workers then 6: break 7: else 8: write_to_disk(data) 9: /* Malleability point */ HPG-aligner data redistribution patterns On the previous section, a malleable workflow was proposed for HPG-aligner so that it could periodically reach a malleability point to ask the RMS whether it should be reconfigured or not before continuing processing the input data. In this section, we will discuss how the data of the HPG-aligner processes could be redistributed in the event of a reconfiguration. HPG-aligner reconfigurations consider two data structures in their data redistributions. To begin with, all the HPG- aligner processes share some identical information (common data). Furthermore, HPG-aligner workers, during their execution, keep the mapping information to the reference genome (worker data). This data structure is used by the HPG-aligner workers to improve their performance and their mapping quality. It is worth notice that although the workers do not require their particular worker data to be initially populated, HPG-aligner uses the aggregated data from all the workers in a later stage in order to be able to correctly align those reads that could not be previously aligned. Common data and worker data, hereafter referred as cData and wData respectively) must be distributed from the current processes to the new processes. For this reason, we have defined two different patterns depending on the reconfiguration type. If the reconfiguration is an expansion, i.e., the application will be executed on more processes after the reconfiguration, the next strategy is followed: •Each initial wiworker sends both its cData and wData to the new w0 iworker. •The initial manager sends its cData to half of the remaining new processes (which will become new workers). •The initial writer sends its cData to the rest of the remaining new processes (two of which will become the new manager and the new writer). Figure 5illustrates this redistribution pattern when expanding from 4 to 6 processes. The initial workers send its cData and wData to their peer MPI ranks in the new communicator (wide arrows in the figure). At the same time, the initial manager and writer send their cData to the remaining newly spawned processes (narrow arrows in the figure). Each initial worker preserves its wData by sending it to another worker in the new communicator. Since, after a reconfiguration, the number of workers changes, not all the new workers will receive wData. We proceed in this Worker #0 Worker #1 Manager Writer Worker #0 Worker #1 Manager Writer Worker #2 Worker #3 Figure 5. Data redistribution when expanding from 4 to 6 processes. Iteration 1 Iteration 2 Iteration 3 Iteration 4 W1 W9W8W7 W5 W3 W2 W4 W6 W0 Nodes Figure 6. HPG-aligner parallel merge of the worker data structures. manner as we have experimentally determined that there was no appreciable differences in HPG-aligner performance or accuracy if some new workers did not have previous wData. In fact, distributing the same wData to more than one new process incurred a performance penalty because of the communication overhead. When the action is a shrinking, the application will be executed on fewer processes after the reconfiguration. In this case, the already populated wData of those workers that will be removed should be preserved (as this information is paramount to a later stage of HPG-aligner). HPG-aligner implements an efficient parallel merge Medina et al. (2016), which uses a minimum spanning tree pattern to merge all the wData into the first worker (see Figure 6). Therefore, over the different options that could be employed to preserve and distribute this information, we have chosen to first call HPG- aligner parallel merge, and then follow the next strategy: •The first worker,w0, will send its cData and wData to the new first worker,w0 0. (The aggregated wData will be preserved on this worker.) •The remaining workers will send their cData to the remaining new processes (the last two of them becoming the new manager and the new writer). Figure 7illustrates the redistribution pattern when shrinking from 6 to 4 processes. The first worker sends its cData and wData to the MPI rank 0 in the new communicator (wide arrow in the figure), and the remaining processes send their cData to their peer MPI ranks (narrow arrows in the figure). HPG-aligner malleable version outline using the DMR API Once the HPG-aligner modified workflow has been presented and the data redistribution patterns have been defined, we outline the HPG-aligner malleable main loop, which proceeds as follows (see Listing 2). When a process finishes its part of processing the first nchunks (line 5), it will reach the malleability point and call the DMR API Prepared using sagej.cls
6Journal Title XX(X) Worker #0 Worker #1 Manager Writer Worker #0 Worker #1 Manager Writer Worker #2 Worker #3 Figure 7. Data redistribution when shrinking from 6 to 4 processes. dmr_check_status() function. If no resize action is planned, the current processes will proceed with the next nchunks. Else, if an expanding or shrinking action is scheduled, the corresponding data redistribution pattern, described in the previous section, is applied. Since the actual data redistribution is performed by the DMR API runtime, all that is required is to indicate in the source code which data has to be be distributed and to whom using the DMR API OmpSslike #pragma directive. After the data redistribution, the new processes will proceed with the next nchunks. Notice that the dmr_check_status() function allows defining some malleability conditions that the RMS will consider. These are: i) the minimum number of processes (MIN), ii) the maximum number of processes (MAX), and iii) the preferred number of processes (PREF) that should be assigned to this application. If a resize is due, the function will return: the action, the new number of processes (in handlerNProcs) and the new MPI communicator (in handler). The #pragma omp task directives, as previously stated, are used to indicate which data has to be redistributed and to whom. For example, the directive: #pragma omp task in(cData) onto(handler, myRank) indicates that the cData data structure has to be conveyed from the current process to the new myRank MPI process in the handler communicator. Validation of the proposed HPG-aligner malleable version To compare the original and the malleable versions of HPG- aligner outputs, we have executed both versions 10 times with the next parameters and collected their execution times and results. The input to both versions consisted of a dataset with 20 million RNA reads of 100 nucleotides (generated with BEERS Grant et al. (2011)), and the reference genome GRCh37.p73 human genome‡‡. For the malleable version, we configured the number of chunks to be equal to the number of initial workers in order to mimic a static dataset distribution and to prevent any reconfiguration. The execution times were virtually the same for both versions, with close-to-negligible time differences of 0.28%, which were due to the malleability code overhead. Since the HPG-aligner output depends on the order in which the reads are processed Martinez et al. (2015), it is not possible to obtain the same results on different parallel executions. However, we can consider that the obtained results are comparable if they present a similar accuracy. Moreover, the accuracy deviation of the results obtained by the malleable version with respect to the ones of the original version was a negligible ±0.2%, we can conclude that both outputs are comparable. Experimental results In this section we describe the setup for the experiments, the results obtained with a current production-size dataset, and, the results achieved when a larger dataset is employed. Experimental setup The experiments were performed using the Marenostrum IV supercomputer at the Barcelona Supercomputing Center (BSC). Each cluster node integrates 2 Intel Xeon Platinum 8160 sockets (24 cores at 2.10 GHz each) for a total of 48 cores with 96 GiB of RAM. The nodes are interconnected through a 100 Gb/sIntel Omni-Path network. Of the 50 nodes of a standard queue in Marenostrum IV, 1 node was used to run the Slurm manager daemon and the other 49 nodes were used to run the jobs. The following software versions were used: MPICH 3.2, OmpSs 15.06, and Slurm 15.08. Workloads setup We have generated fixed and malleable workloads of 100, 250, 500, 1,000, and 2,000 jobs, where all the jobs in a fixed workload are not malleable; and all the jobs in a malleable workload are malleable. The workloads were generated using the statistical model proposed in Feitelson (1996). This model characterizes fixed jobs based on observations from 6 logs of actual cluster workloads. It includes the distribution of job sizes in terms of number of processors, the correlation of runtime with parallelism, and repeated runs of the same job. For our experiments, we have customized the following parameters of this model: i) the number of jobs to be launched; and ii) the jobs inter-arrival time, modeled using a Poisson distribution with factor 10, in order to prevent receiving bursts of jobs while preserving a realistic job arrival pattern. Jobs setup Each job in a workload will execute an instance of HPG-aligner with a simulated dataset of RNA reads, and the human genome, used in the previous section, as the reference genome. As for the malleable jobs, the number of chunks have been set to be 4 times the maximum number of workers. Also, the number of chunks to be processed in each iteration has been selected to be variable and equal to the number of workers available at that moment. Experiments with a production-size dataset The input dataset used in these experiments is a productionsize one consisting of 40 million RNA reads of 100 nucleotides, 8 GiB in total. It was generated using BEERS Grant et al. (2011). Since the malleable version of HPG-aligner has to inform the RMS of its minimum, maximum, and preferred number of processes, we have first experimentally determined these ‡‡http://www.ensembl.org/index.html Prepared using sagej.cls
Iserte, Martínez, Barrachina, Castillo, Mayo and Peña 7 1void hpga_malleable(void *cData, void *wData, int chunkIndex) { 2for (ind = chunkIndex; ind < TOTAL_CHUNKS; ind += N) { 3 4/*Computation */ 5do_my_part(); 6 7/*Malleability point */ 8action = dmr_check_status(MIN, MAX, PREF, &handlerNProcs, &handler); 9if (action == EXPAND) { 10 if (am_i_a_worker()) { 11 #pragma omp task in(cData) in(wData) onto(handler, myRank) 12 hpga_malleable(cData, wData, ind); 13 }else {//Manager or Writer process 14 for (dst = firstDst(); dst < getDsts(); dst++) { 15 #pragma omp task in(cData) onto(handler, dst) 16 hpga_malleable(cData, NULL, ind); 17 } 18 } 19 }else if (action == SHRINK) { 20 merge_in_rank0(wData); 21 if (myRank == 0) { 22 #pragma omp task in(cData) in(wData) onto(handler, myRank) 23 hpga_malleable(cData, wData, ind); 24 }else if (myRank < handlerNProcs) { 25 #pragma omp task in(cData) onto(handler, myRank) 26 hpga_malleable(cData, NULL, ind); 27 } 28 } 29 } 30 } Listing 2: HPG-aligner malleable version outline using the DMR API. for the already described experimental setup. For this purpose, we have launched the HPG-aligner malleable version with different numbers of processes and obtained their execution times, which are shown on Table 1.In order to evaluate the fitness of each configuration, we use a heuristic metric, referred as gain slope, which, unless there is a relevant gain between one configuration and the next one, decreases rapidly as the number of required nodes is increased. The gain slope, which is reported in the fourth column of Table 1, is computed as: ti−1−ti t0 , where tiis the execution time of row iof the table. Using this metric, the minimum, preferred and maximum number of processes are determined as follows: •The minimum number of processes is selected as the first number of processes for which the gain slope is greater than 75%. In this configuration, since there is no such case, the strictly minimum number of processes has been chosen: 3 processes (a manager, aworker, and a writer). •The preferred number of processes, i.e., the number of processes for which a fair trade-off between performance and the resources allocated is attained, is selected as the last number of processes for which Table 1. Execution time and gain difference of the HPG-aligner malleable version when executed with an input dataset of 40 million reads of 100 nucleotides for different numbers of MPI multithreaded processes. # Processes # Cores Execution Time Gain 3 144 238 s — 6 288 68 s 71.43% 12 576 40 s 11.76% 24 1152 44 s -1.68% 48 2304 60 s -6.72% the gain slope is greater than 25%. In this case: 6 processes. •Finally, the maximum number of processes is selected as the last number of processes where the gain slope is positive. In this case: 12 processes. Regarding the job submission, jobs of the fixed workload have been submitted according to the next two premises: users want to have their results as fast as possible, and they can not know in advance how the cluster workload will evolve. Therefore, the fixed jobs have been submitted with 12 MPI multithreaded processes each, because with this configuration they should finish faster than if submitted with any other number of processes (as shown in Table 1). It should be noted that although on this experimental setup Prepared using sagej.cls
8Journal Title XX(X) 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% 100 250 500 1000 2000 Average resource utilization Jobs in the workload Fixed Malleable Figure 8. Average resource utilization on different fixed and malleable workloads with an increasing number of jobs. using 6 processes will lead to better completion times (similar to the achieved by their malleable counterparts), in a production environment, where the other running jobs will exhibit completely different characteristics, this could be not the case. Jobs of the malleable workload have been submitted using a Slurm range submission of 3–12 MPI multithreaded processes, and a preferred number of processes of 6. This way, the resource manager will decide the number of nodes that will be initially assigned to the job, favoring the upper limit whenever possible. In practice, when a malleable job is being processed, although it could be started with 12 processes, it will usually be shrunk to 6 processes (the preferred number of processes) as long as there are other jobs waiting in the queue. These differences on how the resources are (dynamically) allocated pose an impact on the cluster average resource utilization, as can be seen in Figure 8, where the malleable workloads present a lower average resource utilization than that of their fixed counterparts. As stated previously, the jobs of a workload are submitted at different times to the queue, simulating a real scenario. Besides, nothing prevents the malleable workload to make use of all the resources available at a given moment. Therefore, the lower average resource utilization on the malleable workloads indicates that these workloads achieve a better job completion throughput than their fixed counterparts. If the job execution time is to be compared, since the jobs on the malleable workloads can be executed with 6 or even 3 processes, the average execution time of these should be lower than that of their fixed counterparts. This can be seen in Figure 9, where the slowdown in the average execution time of the malleable jobs reaches 60%. But, when a job is submitted to a cluster, not only its execution time is taken into account; the time elapsed from the submission to the execution (waiting time) has to be also considered. Jobs are expected to be initiated earlier on a malleable workload because currently running jobs may release part of their resources in favor of the pending jobs. As expected, Figure 10 shows that the average waiting time in a malleable workload can be up to 77% lower than that in a fixed workload. Considering everything, the balance is positive for the malleability workloads, since the average job completion time (i.e. the average job waiting plus execution time) can 0.00x 0.20x 0.40x 0.60x 0.80x 1.00x 0 20 40 60 80 100 250 500 1000 2000 Speedup Average execution time per job (s) Jobs in the workload Fixed Malleable Job execution time speedup Figure 9. Average job execution time on different fixed and malleable workloads with an increasing number of jobs. 0x 20x 40x 60x 80x 0 500 1000 1500 2000 100 250 500 1000 2000 Speedup Average waiting time per job (s) Jobs in the workload Fixed Malleable Job waiting time speedup Figure 10. Average job waiting time on different fixed and malleable workloads with an increasing number of jobs. 0x 5x 10x 15x 20x 25x 0 500 1000 1500 2000 100 250 500 1000 2000 Speedup Average completion time per job (s) Jobs in the workload Fixed Malleable Job completion time speedup Figure 11. Average job completion time (waiting plus execution time) on different fixed and malleable workloads with an increasing number of jobs. be up to 20 times faster than that for its equivalent fixed workload, as can be seen in Figure 11. Figure 12 shows the completion time (the elapsed time between the first job was submitted and the last job is ended) of the different fixed and malleable workloads. Although execution time is increased, the workload completion time is mainly affected by the jobs waiting time (as it is shown in Figure 11. The workload completion time of the malleable version is up to 16% faster than their fixed counterparts. This result is especially significant from a cluster administrator/manager point of view, as it shows how the throughput of the system is increased when malleable workloads are used. Prepared using sagej.cls
Iserte, Martínez, Barrachina, Castillo, Mayo and Peña 9 1.00x 1.05x 1.10x 1.15x 1.20x 1.25x 0 5000 10000 15000 20000 25000 100 250 500 1000 2000 Speedup Workload completion time (s) Jobs in the workload Fixed Malleable Workload completion speedup Figure 12. Completion time of different fixed and malleable workloads with an increasing number of jobs. 0 10 20 30 40 Allocated nodes 0 200 400 600 800 1000 0 3000 6000 9000 12000 Execution time (s) Completed jobs Fixed Malleable Figure 13. Time evolution of the allocated nodes (top chart), the concurrent jobs being executed (blue and red lines on top chart), and the completed jobs (bottom chart) on the 1,000 jobs fixed and malleable workloads. Figure 13 details the time evolution of: i) the allocated nodes (top chart), ii) the concurrent jobs being executed (red and blue lines on top chart), and iii) the completed jobs (bottom chart) of the 1,000-job fixed and malleable workloads. The flat shape in the top chart of Figure 13 depicts how the nodes have been allocated during the execution of the fixed workload. It reveals that almost all the resources are allocated all the time. Conversely, the malleable workload presents a saw-tooth pattern that finishes earlier: more resources are generally available, which allows a greater flexibility on the scheduling of new jobs. The red and blue lines on the top chart of Figure 13 represent the concurrent running jobs on the fixed and malleable workloads, respectively. On the one hand, it can be seen, as was expected, that for the current experimental setup, the fixed workload is almost always running 4 12- node jobs at the same time. On the other hand, the malleable workload presents a greater variability, where the most seen configuration is 8 3-node jobs. Finally, the bottom chart of Figure 13 represents the time evolution of the completed jobs on the fixed and malleable workloads. The evolution of both are overlapped until second 1,000, where more jobs per second begin to be completed on the malleable version. This behavior is consistent with the observed differences on the average job completion time of both workloads types with different number of jobs (see Figure 11 again): the differences were ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●●●●●●●● ● ● ● ● ● ● ● ● ●● ●● ● ●●● ●●●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ●● ●● ● ● ● ●●● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● 0 500 1000 1500 2000 0 250 500 750 1000 Job Id. Completion time (s) ●● Fixed Malleable Figure 14. Completion time of each job of the 1,000 jobs on the fixed and malleable workloads. The greater the job id, the later the job was queued. Table 2. Average job reconfiguration time of the 1,000-job workload. Stage Average Time Scheduling 0.015 s Resize 4.372 s Total 4.387 s minimum for the 100 job workloads and became greater and greater as the number of jobs in the workloads were increased. Furthermore, due to its higher throughput, the malleable workload ends before the fixed workload. The results presented so far can be summarized in a remarkable improvement of the individual job completion time when a malleable workload is processed. Figure 14 illustrates this fact, showing how all the malleable jobs are completed in almost a constant time, while the completion time of the fixed jobs becomes more variable: the later they are queued, the larger completion time they experience. As for the reconfiguration time cost, it is due to the execution of the next two stages: scheduling and resizing. The scheduling time depends on the number of jobs in the queue, and should be negligible when compared to the resizing stage or the tasks being executed. The resizing time is the sum of the times of the next operations: spawn of processes, data redistribution, and termination of processes. Of these operations, the most costly one is data redistribution, which is determined by the amount of data to be transferred and the bandwidth of the underlying network. While data redistribution is usually in the order of seconds, the other two operations usually are in the order of milliseconds. Table 2displays the average reconfiguration time in the 1,000-job workload. For this purpose, we have calculated the average time of each stage during the execution of the 1,000-job malleable workload. The results confirm that the reconfiguration time is mainly dominated by the resize stage, being the scheduling stage almost negligible. Experiments with a larger dataset The input dataset used in these experiments is larger than the currently usual production sizes. We have considered this larger size as it could become the usual production Prepared using sagej.cls