# Log Analysis-Based Resource and Execution Time Improvement in HPC: A Case Study
## 2 System Configuration
### Batch Job Scheduler  
Scheduler is a program that manages the order and schedule by giving priority to fairness of numerous submitted jobs. There are various solutions, such as a Sun Grid Engine (SGE), Slurm [12], LSF [13], Portable Batch System (PBS) [14], LoadLeveler [15], etc. Tachyon2 is using SGE to handle batch jobs. With such a scheduler, users can submit numerous jobs without concerning where and when the work will be assigned to computing resource and performed [16].  
In order to execute an application on the supercomputer, the user writes a job specification script, as shown in Table 1, and submits the job script to the scheduler using the \"qsub\" command. When an available resource is acquired while waiting in the queue, the job is allocated to that resource and executed on that system. When assigning jobs, the policy for job assignment has to work. In Tachyon2, the exclusive node assignment policy is configured and applied. This means that only one job is assigned to a node, and interference can be eliminated when multiple jobs are executed simultaneously.  
Figure 2 shows the execution process of parallel application in the high-performance computing (HPC) batch-type environment. In general, all batch jobs are processed through the scheduler, the status of resources is continuously monitored, and abnormal resources are excluded from available resources. In this system, a job is not preempted by another until it is submitted to the scheduler, executed, and finished [17].  
\begin{table}
\begin{tabular}{c c c} \hline \hline \#\textbackslash{}bin/bash & 1 \\ \#S -V & 2 & Pass the environment variabe \\ \#S -cwd & 3 & Use the current working directory \\ \#S -w e & 4 & Verify options and abort if there is an error \\ \#S -N Job\_name & 5 & Job name \\ \#S -ppn1\_4 cpu 8 & 6 & Parallel environment \\ \#S -q normal & 7 & Queue name to be execute \\ \#S -R yes & 8 & Resource reservation trigger \\ \#S -wd /scratch/SUser/job\_dir & 9 & Working directory \\ \#S -l\_ht\_rt=10:00:00 & 10 & Maximum running time \\ \#S -l\_OMP\_NUM\_THREADS = 2 & 11 & OpenMP threads per MPI process \\ \#S -M myEmailAddress & 12 & Email address to notify \\ \multicolumn{2}{c}{mpirun -hostfile} & \\ \$TMPDIR/machines & 13 & User application \\ -np \$NSLOTS userjob.exe & & \\ \hline \hline \end{tabular}
\end{table}
Table 1: Batch job script for submission.  
Figure 2: Procedure for the job running using a batch job scheduler.  
The turnaround time of a job (\(Job_{\mathit{tnt}}\)) is the time from when the user submits the job to get the results, which can be optimized according to the scheduling algorithm [18]. The steps of each process related to the work execution can be represented as follows:  
\[Job_{\mathit{bnt}}=T_{\mathit{ready}}+T_{\mathit{running}}+T_{\mathit{ processing}\ (\mathit{pre},\mathit{post})} \tag{1}\]  
\[T_{\mathit{running}}=T_{\mathit{cal}}+T_{\mathit{comm}}+T_{\mathit{io}} \tag{2}\]  
* \(Job_{\mathit{bnt}}\): Amount of time from submission to termination of the job;
* \(T_{\mathit{ready}}\): Waiting time for available resources in the ready queue;
* \(T_{\mathit{running}}\): Real-time of user job;
* \(T_{\mathit{processing}}\): Pre or post-processing time to store job information;
* \(T_{\mathit{cal}}\): Job computation time (CPU bound);
* \(T_{\mathit{comm}}\): Communication time (Network bound);
* \(T_{\mathit{io}}\): I/O time between compute nodes and filesystem.  
Ultimately, \(Job_{\mathit{bnt}}\) consists of waiting time before submitting a job, real job running time, and preprocessing time. Scheduling optimization here can effectively reduce the latency of the job (\(T_{\mathit{ready}}\)). In this paper, we focus and simulate \(Job_{\mathit{bnt}}\) reduction by optimizing \(T_{\mathit{ready}}\) through the backfilling algorithm.