<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>DEVELOPING A TOOLKIT FOR TASK CHARACTERISTICS PREDICTION BASED ON ANALYSIS OF QUEUE'S HISTORY OF A SUPERCOMPUTER</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>M. Rezaei</string-name>
          <email>mahdirezaei_ai@yahoo.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>A. Salnikov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>A. Shiryaev</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Lomonosov Moscow State University</institution>
          ,
          <addr-line>Moscow</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Moscow Institute of Physics and Technology</institution>
          ,
          <addr-line>Moscow</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2021</year>
      </pub-date>
      <fpage>5</fpage>
      <lpage>9</lpage>
      <abstract>
        <p>Empirical studies have repeatedly shown that in High-Performance Computing HPC users' resource estimations lack accuracy. Therefore, resource underestimation may remove the job at any step of computing and subsequently allocated resources will be wasted. Moreover, resource overestimation also will waste resources. In this work, to effectively utilize the overall HPC system, we proposed a new approach to predict the required resources such as; number of required CPUs, time slots etc. for newly submitted job. The study focused on predictive analytics tasks including regression and classification. A supervised machine learning system, comprising several models, was trained based on the collection of statistical data including per-job and per-user features collected from the reference queue systems. Results indicated that adding more features to the dataset improves the prediction accuracy. The possibility of designing a plugin to apply our machine learning system in practical applications was studied. A dynamically connected SLURM SPANK plugin was created that adds the “--predict-time” option and takes control on srun and sbatch commands while they are executed. It was found that the plugin enables practical use of our proposed machine learning system.</p>
      </abstract>
      <kwd-group>
        <kwd>machine learning</kwd>
        <kwd>predictive analytics</kwd>
        <kwd>decision making</kwd>
        <kwd>HPC</kwd>
        <kwd>job scheduling</kwd>
        <kwd>SLURM plugin</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        High-Performance Computing (HPC) applications are intrinsically computational and data
intensive. Because of the dynamicity of resources and on-demand user application requirements, job
scheduling in such environments is an NP-Complete and complex problem [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Resource allocation is
done by job schedulers but the major drawback of job schedulers is that required resources must be
known to the scheduler at the time of job submission. Empirical studies have repeatedly shown that
users’ resource estimations lack accuracy [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], whereas there is no automatic system in HPCs that can
effectively allocate resources. The SLURM, a famous job scheduler, has a mechanism to predict only
the starting time of a job. However, this mechanism is very primitive and more often the time is
overestimated. The purpose of this work is to do predictive analytics on resource allocation using
machine learning methods. Using algorithms, including machine learning algorithms, to predict
required resources for jobs has been pursued by several previous studies [
        <xref ref-type="bibr" rid="ref3 ref4 ref5 ref6 ref7 ref8">3-8</xref>
        ]. Using historical data is
a reasonable method to improve the performance of the schedulers in order to utilize the overall HPC
system efficiently [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. We created also a plugin to study the possibility of applying our system on real
clusters. Our proposed plugin is dynamically connected SPANK plugin, that adds the option
‘-predict-time’ and while executing srun and sbatch commands, takes control on them. The block
diagram of our proposed system is shown in [fig. 1].
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Supervised machine learning and predictive analytics</title>
      <p>
        Machine learning plays an important role in predictive analytics as algorithms are capable to
be trained based on a historical dataset. Dagnino et al. have already discussed the applicability of
machine learning in data analytics [
        <xref ref-type="bibr" rid="ref10 ref11">10, 11</xref>
        ]. Nowadays many of applicable machine learning systems
use supervised learning. Different machine learning techniques and methods are available. Therefore,
different algorithms can be defined to find the best resource prediction in an HPC system [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. The
study focuses on predictive analytics, including regression and classification tasks.
      </p>
      <sec id="sec-2-1">
        <title>2.1 Regression algorithms</title>
        <p>Regression algorithms have continuous outputs and are used to predict the resources. They are
as follows: Multilayer Perceptron (MLP), Random Forest Regression (RFR), Lasso Regression (LR),
K-Nearest Neighbor Regression (KNN), Ordinary Least-Squares Regression (OLSR), Support Vector
Regression (SVR), Ridge Regression (RR), Polynomial Regression (PR), and CART Regression
(CARTR).</p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2 Classification algorithms</title>
        <p>Classification algorithms are used when the output is a discrete label and are used to check the
failure of jobs. They are as follows: Naive Bayes classifier, Kernel Support Vector Machines (SVM),
CART classification.</p>
      </sec>
      <sec id="sec-2-3">
        <title>2.3 Data preparation</title>
        <p>To check the efficiency of our system we used collected statistics of Bluegene/P system
installed at the Faculty of Computational Mathematics and Cybernetics, Lomonosov Moscow State
University named after M.V Lomonosov. This statistic includes information on jobs run for almost 12
months in 2017. It has about 112000 instances. We used 80% of the dataset for training and 20% for
testing. The per-job features, presented in Table 1, in first phase were used to train our machine
learning. In second phase, 7 metrics known as per-user features, shown in Table 2, were added to our
dataset to train our machine learning.</p>
      </sec>
      <sec id="sec-2-4">
        <title>2.4 Machine learning experimental results</title>
        <p>Our findings presented in [fig. 2a] show that in general, the predictions by MLP, RFR, KNN,
PR, and CARTR are promising. After adding per-user features to the dataset, it was observed that
most of the models had improved. RFR, KNN, and CARTR improved a little. However, the
performance of MLP and PR drastically improved after adding per-user features to the dataset.
Another promising finding was that after adding per-user features to the dataset all the models
improved to predict the required time.</p>
        <p>Feature
time_limit
num_cpus
id
name
user
group
task_class</p>
        <p>Type
Numeric
Numeric
String
String
String
String
String</p>
        <p>As [fig. 2b] shows, RFR is the best model and the highest increase in accuracy rate belongs to
the SVR model. From [fig. 2c], we can see that CART classification is the best model for
classification.
Feature
used_portion_of_time_limit
avg_aborted_task
average_congestion
average_cpus
duration
wait_time / time_limit
average_time_limit</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Plugin</title>
      <p>To make our system applicable on the SLURM we need to create a plugin. Therefore, a
component was designed to connect to the SLURM. It has the ability to collect statistics, analyze them
and based on the analysis create a model. Using this model, the prediction could be done. Plugins may
not only complement, but also modify the behavior of SLURM to optimize the system’s performance.
SLURM has a centralized SLURMctld manager for monitoring resources and tasks. Every compute
server (node) has a SLURMd daemon that could be compared with a remote shell: it waits for a job,
runs that job, returns state and waits for more work. In addition, SLURM has several utilities for its
users. In this work we are mainly interested in 2 utilities: srun - to start a job and sbatch - for placing
jobs in the queue. More precisely, sending a batchscript (instructions to SLURM to perform the job) to
the SLURM.</p>
      <sec id="sec-3-1">
        <title>3.1 Review of existing solutions</title>
        <p>
          The standard SLURM package has a mechanism to predict only the starting time of a job.
However, this mechanism is very primitive and more often the time is overestimated. Moreover, there
is a software system for modeling the activity of computing cluster users based on the SLURM, which
uses the collection of statistics to simulate the load on a model of computing cluster under the control
of SLURM. This software lists several metrics used by the system administrators of clusters. This
approach has been tested on data from computing clusters of the Faculty of Computational
Mathematics and Cybernetics, Lomonosov Moscow State University and NIKIET JSC [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ].
However, this solution is also not suitable because it does not allow to analyze and prediction. There
are other systems [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] for analyzing the efficiency of using a cluster. Nevertheless, trying to connect
such systems to the SLURM wastes large amount of resources, while our proposed method only
requires the development of a component where analysis system can easily get embedded. In another
work [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ], various metrics for clusters are studied, where the user will have to use these metrics
manually to predict the run time of the job which is not a ready-made solution.
        </p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2 Statement of technical specifications</title>
        <p>The task is done through design, develop and test the functionality of the component (or
components) connected to the SLURM queuing system. The component collects statistical data and
does analysis on the flow of computational tasks. The component is a system of two modules
implemented as:

</p>
        <p>Add-ons to SLURM to add and handle the --predict-time option in the srun and sbatch
commands to predict the job run time.</p>
        <p>A Linux daemon that handles HTTP requests, trains the model, and etc. (hereinafter
the main application). The application must be able to connect custom algorithms
according to a given template.</p>
        <p>In addition, special scripts are required to install these modules easily.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion and future work</title>
      <p>Our work has led us to conclude that adding new features to the dataset improves prediction
accuracy. An innovative solution for the resource allocation problem was found. The possibility of
writing a plugin to apply our machine learning system in practical applications was studied. It was
found that designing a plugin allows the practical use of machine learning algorithms in decision
making. However, it is required to improve the performance of this component. In future work, we
will use this component to evaluate our algorithms on a real cluster to find the best method to do
prediction.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Jeffrey</surname>
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Ullman</surname>
          </string-name>
          ,
          <article-title>NP-complete scheduling problems</article-title>
          ,
          <source>J. Comput. System Sci</source>
          .
          <volume>10</volume>
          (
          <issue>3</issue>
          ) (
          <year>1975</year>
          )
          <fpage>384</fpage>
          -
          <lpage>393</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>D. T safrir</surname>
            , Y. Etsion, and
            <given-names>D. G.</given-names>
          </string-name>
          <string-name>
            <surname>Feitelson</surname>
          </string-name>
          , “
          <article-title>Backfilling Using System-Generated Predictions Rather than User Runtime Estimates,”</article-title>
          <source>IEEE Trans. Parallel Distrib. Syst.</source>
          , vol.
          <volume>18</volume>
          , no.
          <issue>6</issue>
          , pp.
          <fpage>789</fpage>
          -
          <lpage>803</lpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>A. W.</given-names>
            <surname>Moore</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Schneider</surname>
          </string-name>
          , and
          <string-name>
            <given-names>K.</given-names>
            <surname>Deng</surname>
          </string-name>
          , “
          <article-title>Efficient Locally Weighted Polynomial Regression Predictions,”</article-title>
          <source>in Proc. 14th Int. Conf. Machine Learning</source>
          ,
          <year>1997</year>
          , pp.
          <fpage>236</fpage>
          -
          <lpage>244</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A. W.</given-names>
            <surname>Mu</surname>
          </string-name>
          <article-title>'alem</article-title>
          , and D. G. Feitelson, “Utilization, Predictability, Workloads, and
          <article-title>User Runtime Estimates in Scheduling the IBM SP2 with Backfilling,”</article-title>
          <source>IEEE Trans. Parallel Distrib. Syst.</source>
          , vol.
          <volume>12</volume>
          , no.
          <issue>6</issue>
          , pp.
          <fpage>529</fpage>
          -
          <lpage>543</lpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>W.</given-names>
            <surname>Smith</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Foster</surname>
          </string-name>
          , and
          <string-name>
            <given-names>V.</given-names>
            <surname>Taylor</surname>
          </string-name>
          , “
          <article-title>Predicting application run times with historical information</article-title>
          ,
          <source>” J. Parallel Distrib. Comput.</source>
          , vol.
          <volume>64</volume>
          , no.
          <issue>9</issue>
          , pp.
          <fpage>1007</fpage>
          -
          <lpage>1016</lpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>R.</given-names>
            <surname>Albers</surname>
          </string-name>
          , E. Suijs, and
          <string-name>
            <surname>P. H. N. de With</surname>
          </string-name>
          , “Triple-C:
          <article-title>Resource usage prediction for semiautomatic parallelization of groups of dynamic image-processing tasks</article-title>
          ,”
          <source>in Proc. 23rd Int. Parallel Distributed Processing Symp</source>
          .,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>R.</given-names>
            <surname>Duan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Nadeem</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Wang</surname>
          </string-name>
          et al.,
          <article-title>“A Hybrid Intelligent Method for Performance Modeling and Prediction of Workflow Activities in Grids,”</article-title>
          <source>in Proc. 2009 9th IEEE/ACM Intl. Symp. Cluster Computing and the Grid</source>
          ,
          <year>2009</year>
          , pp.
          <fpage>339</fpage>
          -
          <lpage>347</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>F.</given-names>
            <surname>Nadeem</surname>
          </string-name>
          , and T. Fahringer, “
          <article-title>Using Templates to Predict Execution Time of Scientific Workflow Applications in the Grid,”</article-title>
          <source>in Proc. 2009 9th IEEE/ACM Intl. Symp. Cluster Computing and the Grid</source>
          ,
          <year>2009</year>
          , pp.
          <fpage>316</fpage>
          -
          <lpage>323</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <article-title>[9] Predicting application run times with historical information Warren Smitha</article-title>
          , Ian Fosterb, Valerie Taylorc,
          <year>2004</year>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>A.</given-names>
            <surname>Dagnino</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Smiley</surname>
          </string-name>
          , and
          <string-name>
            <given-names>L.</given-names>
            <surname>Ramachandran</surname>
          </string-name>
          ,
          <article-title>"Forecasting Fault Events in Power Distribution Grids Using Machine Learning,"</article-title>
          <source>Proceedings of the 24th International Conference on Software Engineering and Knowledge Engineering (SEKE'12)</source>
          , San Francisco, CA, USA, pp.
          <fpage>458</fpage>
          -
          <lpage>463</lpage>
          ,
          <year>July 2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>A.</given-names>
            <surname>Dagnino</surname>
          </string-name>
          and
          <string-name>
            <given-names>D.</given-names>
            <surname>Cox</surname>
          </string-name>
          ,
          <article-title>"Industrial Analytics to Discover Knowledge from Instrumented Networked Machines"</article-title>
          ,
          <source>Proceedings of the 26th International Conference on Software Engineering and Knowledge Engineering (SEKE'14)</source>
          , Vancouver, Canada,
          <year>July 2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Rodrigues</surname>
            ,
            <given-names>E. R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cunha</surname>
            ,
            <given-names>R. L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Netto</surname>
            ,
            <given-names>M. A.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Spriggs</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          “
          <article-title>Helping HPC users specify job memory requirements via machine learning</article-title>
          ,
          <source>” in Proceedings of the Third International Workshop on HPC User Support Tools</source>
          , pp.
          <fpage>6</fpage>
          -
          <lpage>13</lpage>
          , IEEE Press,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <article-title>A software system for modeling the activity of users of a computing cluster based on the queuing system SLURM - article // TRUE - Intellectual System for Thematic Research of Scientometric Data URL: http://omega</article-title>
          .sp.susu.ru/books/conference/PaVT2015/short.html
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <surname>Leonenkov</surname>
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhumatiy</surname>
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2019</year>
          )
          <article-title>Supercomputer Efficiency: Complex Approach Inspired by Lomonosov-2 History Evaluation</article-title>
          . In: Voevodin V.,
          <string-name>
            <surname>Sobolev</surname>
            <given-names>S</given-names>
          </string-name>
          . (eds) Supercomputing.
          <article-title>RuSCDays 2018</article-title>
          .
          <source>Communications in Computer and Information Science</source>
          , vol
          <volume>965</volume>
          . Springer, Cham.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>B.</given-names>
            <surname>Song</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Ernemann</surname>
          </string-name>
          and
          <string-name>
            <given-names>R.</given-names>
            <surname>Yahyapour</surname>
          </string-name>
          ,
          <article-title>"User group-based workload analysis and modelling," CCGrid 2005</article-title>
          .
          <source>IEEE International Symposium on Cluster Computing and the Grid</source>
          ,
          <year>2005</year>
          ., Cardiff, Wales, UK,
          <year>2005</year>
          , pp.
          <fpage>953</fpage>
          -
          <lpage>961</lpage>
          Vol.
          <volume>2</volume>
          , doi: 10.1109/CCGRID.
          <year>2005</year>
          .
          <volume>1558664</volume>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>