<!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>EFFICIENCY MEASUREMENT SYSTEM FOR THE COMPUTING CLUSTER AT IHEP</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>V. Ezhova</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>V. Kotliar</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>E-mail:</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Victoria.Ezhova@ihep.ru</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Viktor.Kotliar@ihep.ru</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute for High Energy Physics named by A.A. Logunov of National Research Centre “Kurchatov Institute”</institution>
          ,
          <addr-line>Nauki Square 1, Protvino, Moscow region, Russia, 142281</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <fpage>538</fpage>
      <lpage>543</lpage>
      <abstract>
        <p>Every day IHEP central computing cluster produce thousands of calculations related to research activities, both IHEP and GRID experiments. A lot of machine resources are expended on this work. So, we can estimate the size of the spent resources used for all types of tasks, make decisions for changing cluster configuration and to do the forecast for the work of the computer center in general. In this work you can see the calculations of the efficiency index and the graphical representation of work of a cluster on the basis of account information. It is one of the main tasks within work on creation of system of uniform monitoring of computer center of IHEP.</p>
      </abstract>
      <kwd-group>
        <kwd>accounting system</kwd>
        <kwd>Torque pbs</kwd>
        <kwd>Elastic Search</kwd>
        <kwd>Kibana</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>In this work you can see a graphical representation of the work of the cluster based on the
account information from the torque pbs cluster for real-time analysis. The work of the main scripts
and a method for calculating cluster performance based on pbs data will be present in details, as well
as the results of testing of some memory allocation systems will be described.</p>
      <p>We pursued the goal of improving the effectiveness of the cluster through the efficient
allocation of resources, for example, by introducing additional libraries.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Review of the work performed and calculation of efficiency</title>
      <p>
        To start the task on the cluster, you might use the Torque PBS job management system. This
system contains information about the necessary resources (the number of cluster nodes, the required
amount of RAM and the necessary execution time). After starting the task, all this information is
placed in a log file and stored on the server [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>
        The python script sorts the accounting file of torque pbs into a python dict and throws off this
information in JSON format. It uses the alogger.utils - small python library to parse resource manager
logs and json module which can generate JSON from python objects and lists [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. As next step bash
script connects to Elastic Search (ES) and it sends JSON data to ES every minute to display it in the
form of the schedule from Kibana (Figure 1).
      </p>
      <p>After the efficiency indicator is calculated it is used in visualizations. Here is the information
for the analysis:
1) cput – maximum operating time of the processor or CPU time;
2) ncpus – how many cpus each allocated node must have;
3) ppn – how many processes to allocate per each node;
4) walltime – time of performance of a task in hours;
5) efficiency – result on the basis of the previous values (percentage format).</p>
      <p>
        These data have been taken from the log pbs files [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. The last indicator was calculated on the
basis of all previous (Figure 2).
      </p>
      <p>Cput is the main reference point. If there is no such index it is set to default zero value. In
order to calculate the efficiency index, cpu time is converted to the number type. The indicators ncpus
and ppn were also taken into account and they are mutually exclusive. CPU time is divided into one of
these values, if it presents. As a result, the calculated value is divided by the walltime of a task given
by type number.</p>
      <p>Kibana tools allow you to display this data in the table (Figure 3).</p>
    </sec>
    <sec id="sec-3">
      <title>3. Kibana’s graphical representation</title>
      <p>Display of the data loaded into ES — it is work for Kibana. Kibana is an open source (Apache
Licensed), browser based analytics and search dashboard for Elasticsearch.</p>
      <p>Several graphs were constructed reflecting the growth or decrease in the efficiency of
resources use by a group of tasks based on efficiency indicator. The first one shows a vertical bar
graph that reflects the number of tasks in the execution queue depending on the type (Figure 4). You
can see that more tasks are related to the ihep-short queue. These tasks typically perform fast
processing of small amounts of data and are characterized by a large number of input /output
operations.</p>
      <p>Second shows the histogram of the statuses of tasks, the number of cancelled, interrupted,
completed tasks (Figure 4). You can see that the overwhelming number of tasks are completed tasks,
those that are currently executing and those that are in the execution queue.</p>
      <p>Another two graphs show the effectiveness of the accomplishing tasks of IHEP users and grid
tasks (Figure 5).</p>
      <p>The last linear graph reflects several critical indicators at once: average efficiency level,
maximum and minimum efficiency, Upper and Lower Standard Deviation of efficiency (Figure 6).</p>
    </sec>
    <sec id="sec-4">
      <title>4. Memory allocation systems</title>
      <p>However, the memory usage of each process is bounded with Linux resources limitation. The
memory management subsystem is one of the most important parts of the operating system. It was
supposed to try different memory allocation systems on the computing nodes of the cluster and to
check their effect on the efficiency and memory usage.</p>
      <p>
        For an experiment the tcmalloc package was configured on the cluster working nodes for one
week. The tc in tcmalloc stands for thread cache — the mechanism through which this particular
allocator is able to satisfy certain (often most) allocations lucklessly [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>During tcmalloc usage it is seen on the graph that a sharp decline of cpu usage occurred in
compare with previous gradual usage. With regard to the efficiency of using the cluster, the most
noticeable decline is visible for Atlas LHC experiment (Figure 7).</p>
      <p>The tcmalloc allocator does not return memory to the operating system. As more threads are
used, the advantage of using lock-free algorithms shows that tcmalloc drops behind. As a conclusion
tcmalloc is expedient to use for a certain type of tasks, scripts and for IHEP cluster it is unsuitable.</p>
      <p>
        Jemalloc was tested for the same period (Figure 8). Jemalloc is a general purpose malloc
implementation that emphasizes fragmentation avoidance and scalable concurrency support. Unlike
tcmalloc focused on separate tasks, this library is intended for use on the cluster for the whole stream
of tasks [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
      <p>After inclusion of libjemalloc.so.1 library there was a growth of overall performance of the
cluster (in particular CPU utilization). But jobs processing has failed - more than a half of jobs and
about 27% of multicore jobs were interrupted (Figure 9).</p>
      <p>That means tcmalloc and jemalloc are not useful for IHEP cluster.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Cluster Management System</title>
      <p>In the future there is the plan to create additional control component for IHEP Cluster
Management System (CMS) with objectives to analyse efficiency indicators of overall cluster
performance and to manage the cluster in a way of improving resource usage efficiency. At this stage
CMS consists of event-driven management system, configuration management system, monitoring and
accounting system and a ChatOps technology which is used for the administration tasks.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusions</title>
      <p>In this article it was calculated the efficiency indicator, which based on the accounting fi le of
torque pbs. Also the examples of efficiency’s graphs were given. It will help to analyse efficiency of
working cluster in the future.</p>
      <p>For an experiment the memory allocators were tested. In our case the result of tests was not
useful for IHEP cluster. We will continue to improve the efficiency of the computing cluster. As future
works it is planned to use Cluster Management System (CMS) with objectives to analyse efficiency
indicators.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Ezhova</surname>
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kotliar</surname>
            <given-names>V</given-names>
          </string-name>
          .
          <article-title>Accounting system for the computing cluster</article-title>
          at IHEP // CEUR Workshop Proceedings.
          <source>February</source>
          <year>2017</year>
          : Vol.
          <volume>1787</volume>
          .- pp.
          <fpage>518</fpage>
          -
          <lpage>524</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <article-title>[2] Python library to parse resource manager logs [python aloger]</article-title>
          . Available at: https://pypi.org/project/python-alogger
          <source>/ (accessed 24.10</source>
          .
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>TORQUE</given-names>
            <surname>Resource</surname>
          </string-name>
          <article-title>Manager [Torque home page]</article-title>
          . Available at: http://docs.adaptivecomputing.com/torque/3-0-
          <issue>5</issue>
          /4.1queueconfig.
          <source>php (accessed 24.10</source>
          .
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>TCMalloc</given-names>
            <surname>: Thread-Caching</surname>
          </string-name>
          <string-name>
            <surname>Malloc</surname>
          </string-name>
          [TCMalloc overview]. Available at: https://gperftools.github.io/gperftools/tcmalloc.
          <source>html (accessed 24.10</source>
          .
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Jemalloc</given-names>
            <surname>Documentation</surname>
          </string-name>
          <article-title>[jemalloc home page]</article-title>
          . Available at: http://jemalloc.net
          <source>/ (accessed 24.10</source>
          .
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>