<!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>JINR WLCG TIER1 &amp; TIER2/CICC ACCOUNTING SYSTEM</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>I.A. Kashunin</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>V.V. Mitsyn</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>T.A. Strizh</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ivan Kashunin</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Valery Mitsyn</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Tatiana Strizh</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Meshcheryakov Laboratory of Information Technologies, Joint Institute for Nuclear Research</institution>
          ,
          <addr-line>6 Joliot-Curie, Dubna, Moscow region, 141980</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>The problem of evaluating the efficiency of the JINR MLIT grid sites has always been topical. At the beginning of 2021, a new accounting system was created, it managed to fully cover the functionality of the previous system and further expand it. The article provides detailed information on the implemented accounting system.</p>
      </abstract>
      <kwd-group>
        <kwd>Accounting</kwd>
        <kwd>WLCG</kwd>
        <kwd>Grid</kwd>
        <kwd>Monitoring</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Original accounting system</title>
      <p>
        Since the beginning of 2001, MLIT JINR started creating a distributed system for processing,
storing and analyzing experimental data from the experiments at the Large Hadron Collider (LHC)
using grid technologies [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. In 2003, the Russian segment of the LCG Global Infrastructure was
organized under the Russian Data Intensive Grid Consortium (RDIG) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], and the Tier2 grid site for
data processing within the distributed computing infrastructure began functioning at JINR. The Linux
operating system, the Torque batch processing system [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], the Maui task scheduler [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and the
software stack that ensures consistent work within the distributed grid infrastructure are the main
software of the computing cluster. The Torque and Maui systems were finalized at MLIT and, by
default, had a built-in script for collecting statistics on the batch system. The script was run with
various parameters at a certain time and generated text files (Fig. 1) containing information about the
operation of the system. The collected data was used to evaluate the effectiveness of jobs performed
on the grid site, to account for them by users and compile various reports. Jobs were grouped
according to their belonging to experiments and virtual organizations included in the RDIG, data
processing from which was carried out on the site (lalice – Alice experiment at the LHC, lcms – CMS
experiment at the LHC, etc.).
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Prerequisites for the development of a new system</title>
      <p>
        In mid-2020, due to the obsolescence and lack of support for Torque and Maui, it was decided
to switch to a new cluster management and task dispatching system for large and small Linux clusters,
SLURM [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Unlike Torque and Maui, SLURM does not allow a number of different default
parameters to be displayed:
● CPUclock – CPU time spent on job execution for a certain period of time;
● Wallclock – total astronomical time spent by the job for a certain period of time;
● efficiency of using the cluster computing resources by the job.
      </p>
      <p>These parameters can be calculated from the database (DB) of the SLURM system, which is
formed during the operation of the system. To do it, there is a need to write a special script and create
your own accounting system, which will allow obtaining the necessary parameters upon request.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Development of an accounting system</title>
      <p>At the end of 2020, the SLURM system was put into operation. At the same time, the
development of an accounting system started. The initial task was to develop a console version that
would display data for a certain period of time in a tabular format on the screen. Similar to the original
accounting system, this data can be stored in the form of reports. The main parameters that the
accounting system should display for a certain period of time are:
 number of jobs grouped by the affiliation to an experiment/group;
 CPUclock of grouped jobs;
 Wallclock of grouped jobs;
 average number of cores used by the job in a group;
 efficiency of using the cluster computing resources by a job group.</p>
      <p>Terms such as CPUclock and Wallclock have analogs, i.e. total_cpu_time and elapsed_time in
SLURM, respectively. SLURM has a special command sacct to display various system parameters on
the screen. The output is in a tabular format, where the required parameters are displayed for each job.
Due to this, it is possible to calculate the amount of CPUclock for a job group as the sum of
total_cpu_time for each job for a certain period of time. Wallclock is calculated in the same way, only
in this case the amount is calculated from elapsed_time. The efficiency of using the cluster computing
resources by a job group can be calculated as the percentage of these parameters to the number of
cores allocated for each job. This parameter is especially useful for detecting cases when a job
reserves cores without using all the processor power. Thus, the poorly optimized code can be
identified. Batch queues can also comprise jobs with a different number of cores required for
computing. The script of the accounting system was developed taking into account this feature.</p>
      <p>As a result, an accounting system script was created, it allows displaying the main parameters
on the screen (Fig. 2).</p>
      <p>
        The next task is to develop a visualization system. Currently, there are various options for
choosing software for data visualization systems. Since 2014, a monitoring system [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] has been
operating at the Multifunctional Information and Computing Complex (MIСС) [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], and one of its
components is the Grafana visualization system [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. It was decided to build a visualization system on
its basis. That enabled easier integration into the existing monitoring system.
      </p>
      <p>
        To display statistics, the Grafana system receives data from a specific resource, i.e. a backend
(database, software, socket, etc.). One of them is the MariaDB database [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. To connect the accounting
system with Grafana, special support for writing data to the accounting system script was added. The
script is launched by the operating system through the standard service cron [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] and writes the
parameters for the day, week, month and year to the database.
      </p>
    </sec>
    <sec id="sec-4">
      <title>4. Vizualization system</title>
      <p>An interactive visualization system was created on the basis of Grafana, it allows providing the
user with the most up-to-date analytical data:
 graphs and pie charts of CPUclock and Wallclock for a certain period of time;
 graphs for the use of the cluster computing resources by jobs;
 graph of the number of completed jobs;
 tabular version of the displayed data.</p>
      <p>As a result, an information display (Fig. 3) was created.
All calculations of the accounting system are carried out taking into account only
completed jobs. The longer the time interval for completed jobs accounting is, the more
accurate the report data is.
● Сlock_type</p>
      <p>
        It displays the change in the type of parameters, such as Wallclock, CPUclock and their
versions translated to HepSpec06 [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. After changing this parameter, the top-most graph
and pie charts change according to the selection.
● Data – time interval
      </p>
      <p>The date of both the beginning and the end of the data display can be set. Changing the
date affects the display of all graphs and tables.</p>
      <p>Thus, by changing various parameters, the set of data required for displaying can be
configured.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusion</title>
      <p>
        In February 2021, various tests and the verification of the functionality of the accounting
system, including data verification with the EGI Federation account [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], were performed. The test
results showed that the difference between the calculations in the systems was 0.4%, which can be
caused by different time frames and calculation algorithms.
      </p>
      <p>In March 2021, the accounting system was integrated into the general monitoring system of
the MICC.</p>
      <p>
        Access to the pages of the accounting system for the WLCG (Worldwide LHC Computing
Grid) sites [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], Tier1, Tier2 of MLIT JINR, is carried out via the main page of the Litmon monitoring
system (Fig. 4). As a result, it became possible to back up the readings of the other accounting
systems, as well as to display JINR specific tasks that are performed on the sites and related to tasks
within the NICA project. The Tier1, Tier2 accounting system was put into operation. It completely
covered the functionality of the original system and significantly expanded it due to the flexible
configuration of the visualization system. The data collected by the original accounting system since
2018 was imported into the visualization system.
at:
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>V.</given-names>
            <surname>Korenkov</surname>
          </string-name>
          , E. Tikhonenko, GRID Concept and
          <article-title>Computer Technologies in the LHC Era</article-title>
          ,
          <source>Physics of Elementary Particles and Atomic Nuclei (PEPAN)</source>
          , vol.
          <volume>32</volume>
          , p.
          <fpage>6</fpage>
          ,
          <issue>2001</issue>
          , in Russian.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>A.</given-names>
            <surname>Soldatov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Korenkov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Ilyin</surname>
          </string-name>
          ,
          <article-title>Russian Segment of the LCG Global Infrastructure</article-title>
          ,
          <source>Open Systems, N1</source>
          ,
          <year>2003</year>
          , in Russian.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Torque</surname>
          </string-name>
          .
          <source>Available (accessed 15.07</source>
          .
          <year>2021</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Maui</surname>
          </string-name>
          .
          <source>Available (accessed 15.07</source>
          .
          <year>2021</year>
          ). at: http://dipc.ehu.es/cc/computing_resources/jobs/batch_systems/torque/ http://dipc.ehu.es/cc/computing_resources/jobs/batch_systems/torque/
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5] SLURM. Available at: https://sLURM.schedmd.com/documentation.
          <source>html (accessed 15.07</source>
          .
          <year>2021</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>I.</given-names>
            <surname>Kashunin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Mitsyn</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Trofimov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Dolbilov</surname>
          </string-name>
          .
          <article-title>Integration of the Cluster Monitoring System Based on Icinga2 at JINR LIT MICC /</article-title>
          / PEPAN Letters: http://www1.jinr.ru/Pepan_letters/panl_2020_3/14_kashunin.pdf,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Dolbilov</surname>
            <given-names>А.</given-names>
          </string-name>
          , et al.
          <source>Multifunctional Information and Computing Complex of JINR: Status and Perspectives // CEUR Workshop Proc</source>
          .
          <year>2019</year>
          . V. 2507. P.
          <volume>16</volume>
          ‒
          <fpage>22</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Grafana</surname>
          </string-name>
          . Available at: https://grafana.com
          <source>/ (accessed 15.07</source>
          .
          <year>2021</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9] MariaDb. Available at: https://mariadb.org
          <source>/ (accessed 15.07</source>
          .
          <year>2021</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Crontab</surname>
          </string-name>
          . Available at: https://ru.wikipedia.org/wiki/Cron (accessed
          <volume>15</volume>
          .07.
          <year>2021</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <fpage>HepSpec06</fpage>
          . Available at: https://www.gridpp.ac.uk/wiki/HEPSPEC06 (accessed
          <year>15</year>
          .07.
          <year>2021</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>EGI</surname>
          </string-name>
          . Available at: https://accounting.egi.
          <source>eu/ (accessed 15.07</source>
          .
          <year>2021</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>Worldwide</surname>
            <given-names>LHC Computing</given-names>
          </string-name>
          <string-name>
            <surname>Grid</surname>
          </string-name>
          . Available at: https://wlcg.web.
          <source>cern.ch/ (accessed 15.07</source>
          .
          <year>2021</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>