<!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>COMPASS GRID PRODUCTION SYSTEM</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>A.Sh. Petrosyan</string-name>
          <email>artem.petrosyan@jinr.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>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>2017</year>
      </pub-date>
      <fpage>234</fpage>
      <lpage>238</lpage>
      <abstract>
        <p>LHC Computing Grid was a pioneer integration effort, managed to unite computing and storage resources all over the world, thus making them available to experiments on the Large Hadron Collider. During decade of LHC computing, Grid software has learned to effectively utilise different types of computing resources, such as classic computing clusters, clouds and hyper power computers. While the resources experiments use are the same, data flow differs from experiment to experiment. A crucial part of each experiment computing is a production system, which describes logic and controls data processing of the experiment. COMPASS always relied on CERN facilities, and, when CERN, during hardware and software upgrade, started migration to resources, available only via Grid, faced the problem of insufficiency of resources to process data on. To make COMPASS data processing able to work via Grid, the development of the new production system has started. Key features of modern production system for COMPASS are: distributed data processing, support of different type of computing resources, support of arbitrary amount of computing sites. Build blocks for the production system are taken from achievements of LHC experiments, but logic of data processing is COMPASS-specific.</p>
      </abstract>
      <kwd-group>
        <kwd>COMPASS</kwd>
        <kwd>PanDA</kwd>
        <kwd>workload management system</kwd>
        <kwd>Grid</kwd>
        <kwd>Condor</kwd>
        <kwd>distributed data management</kwd>
        <kwd>production system</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>All physics experiments have same steps of data taking, processing, archiving, but details of
these steps are absolutely different for each experiment. Implementation of data processing of the
experiment comes from its computing model, which, in its turn, is described by physics processes,
collected data type, volumes, chosen software technologies, data transformations, available
computing resources and their types, type of storage, etc.</p>
      <p>
        Data of COMPASS experiment [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], after being taken, are delivered to Castor storage for
further processing. Metadata, which describes conditions, setups, year, period, run chunk number and
various other parameters of data are stored in MySQL database (previously, Oracle used to be a
primary storage for metadata). Starting from this point, offline data processing begins.
      </p>
      <p>
        Being resident or CERN, COMPASS depends on CERN IT services to store and process
data. During experiment’s lifecycle (data taking of the experiment has begun in 2002), some of IT
services became obsolete and during next 2-3 years the following services will be replaced by more
modern ones: Castor by EOS (link), lxbatch LSF by Condor, AFS by EOS. This process of
simultaneous replacement of computing infrastructure components strongly influences data
processing of the experiment and triggered changes of software components which interact with
computing site, data, conditions and metadata storage. In order to ease consequences of current and
future infrastructure changes, the computing model of the experiment was adapted accordingly
[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ][
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Support of several computing sites and distributed jobs submission was performed via adding
Auto Pilot Factory and PanDA workload management system [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ][
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Availability of experiment
software releases on any remote computing site was achieved by installing them on CVMFS. 3
computing sites were defined: CERN Condor, JINR Tier-2, Trieste Tier-2. Thus, Grid infrastructure
of experiment was created. Running jobs via these additional layers allowed production system
administrator to add or remove computing sites online by simply changing configuration without any
changes in computation process. If the site goes to downtime, jobs simply are not receiving it and
workflow concentrates on other sites of the infrastructure. Usage of PanDA us to treat various site
resource managers as one, like if they were one large computing queue.
      </p>
      <p>To manage tasks and jobs in such distributed infrastructure, special software must be created,
because data processing of any experiment is unique. Usual name of such software is a production
system. It covers all steps of data processing: from task definition and datasets selection, jobs
submission and monitoring of their statuses, to decision making mechanisms, which control data
processing through all the steps. In case of COMPASS such software was already presented,
however, during the migration to Grid environment and distributed computing, it became clear that it
has to be replaced by a brand new one. The reasons were the following:</p>
      <p>- previous system was too strongly integrated with existing computing infrastructure and it
was prepare to work in “local” environment of production manager’s account;
- it was not designed to work with any other type of computing resource except LSF;
- it used commands, available only in interactive mode to submit and control jobs.
Adding one more computing site in the previously used production system was impossible.</p>
      <p>Thus, the development of the new production system, which has to cover all the needs of data
processing in the distributed heterogeneous computing environment and will be able to overcome the
limitations of the previous implementation described above, has begun.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Production system overview</title>
      <p>The production system of the experiment must meet the following expectations:
- must support data processing from task definition till data archiving;
- must provide support of all types of data processing: Monte-Carlo simulation,
reconstruction, user analysis;</p>
      <p>- must require minimum software development and include as much as possible components
of already developed systems;
- must support any type of computing and storage resources;
- must provide user-friendly and fully functional interface;
- must be secure, flexible, easy to extend and deploy;
- must provide monitoring of each steps of data processing and user actions.</p>
      <p>Production system has the following
list of components:</p>
      <p>- tasks and jobs definition and
management interface;</p>
      <p>- status tracking and decision making
mechanism;
- data management mechanism;
- jobs submission mechanism;
- jobs delivery to remote sites;
- jobs execution on remote sites;
- monitoring.</p>
      <p>Since logic of processing of each
experiment is unique, tasks and jobs definition,
management interface and decision tracking
mechanism had to be developed from scratch.</p>
      <p>All other components of the infrastructure
initially were developed to cover needs of
ATLAS distributed computing and were
adapted for COMPASS: PanDA workload
management system manages jobs delivery,
execution on remote sites and monitoring via its
components: PanDA server, AutoPyFactory,</p>
      <p>Figure 1. Task definition interface Pilot and Monitoring. Django framework was
chosen to build web user interface. RDBMS is MySQL. Programming language is Python, it is the
same for all components of the system, which makes it easy to integrate. Decision making
mechanism organised as set of micro-services, each runs periodically and performs its small
operation basing on conditions in system’s core database. Data management mechanism prepares,
delivers and archives files.</p>
      <p>Once components of the system work as independently, time-out, retry, load balancing
mechanisms are implemented in order to achieve maximum use of available resources. Jobs
submission performed automatically, amount of jobs to be submitted at each submission cycle is
calculated basing on amount of running jobs, results of previous submissions, etc. Jobs submission
and status checking in the system are divided in order to reduce load on services and machines where
services are running.</p>
      <p>Screenshots of production system user interface and services and jobs monitoring pages are
shown on the figures 1-3.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Future plans</title>
      <p>Future plans include enabling new computing resources, and, also, new types of computing
resources, such as HPC facilities, in particular Blue Waters HPC of University of Illinois at
UrbanaChampaign, where collaboration has active allocation.</p>
      <p>Monte-Carlo processing will be covered by the production system, at the moment MC
production is done by Analysis coordinators and users groups in their home institutes as users
analysis, separately and not organised into one managed effort.</p>
      <p>Users analysis will also be moved under the production management system.</p>
      <p>
        Another direction of development is integrating Rucio [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] distributed data management
system to build a new central data catalog, which will cover also data delivery to and from any
remote site, involved into processing. This will help to organise data and to organise data accounting,
transfers, archiving, etc.
      </p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>Serious integration and software development efforts have been performed during 2016-2017
in order to organise a distributed processing of data gathered by experiment. New system has been
working in a production mode since August 2017. During this period, via new Grid Production
System almost 2 millions chunks, collected by COMPASS during 2015-2017, were processed and
0.5PB of resulting data was generated. Processing rate handled by the system is ~12000 of
simultaneously running jobs.</p>
      <p>All steps of processing are covered with rich monitoring services, allowing to get full picture
of data processing at any particular period of time.</p>
      <p>COMPASS collaboration received a brand new production system, based on widely used and
actively supported software components and secured itself against decommissioning of LSF and
phase-out of AFS and Castor.</p>
      <p>
        All management components of the system are deployed on the JINR cloud service [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Abbon</surname>
            <given-names>P.</given-names>
          </string-name>
          et al.
          <source>The COMPASS experiment at CERN // Nuclear Instruments and Methods in Physics Research Section A: Accelerators</source>
          , Spectrometers, Detectors and
          <string-name>
            <given-names>Associated</given-names>
            <surname>Equipment</surname>
          </string-name>
          .
          <article-title>-</article-title>
          <year>2007</year>
          . - Vol.
          <volume>577</volume>
          , Issue 3. - P.
          <fpage>455</fpage>
          -
          <lpage>518</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Petrosyan</surname>
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Sh. PanDA</surname>
            for COMPASS at JINR // Physics of Particles and
            <given-names>Nuclei</given-names>
          </string-name>
          <string-name>
            <surname>Letters</surname>
          </string-name>
          .
          <article-title>-</article-title>
          <year>2016</year>
          . - Vol.
          <volume>13</volume>
          , Issue 5. - P.
          <fpage>708</fpage>
          -
          <lpage>710</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Petrosyan</surname>
            <given-names>A.Sh.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zemlyanichkina</surname>
            <given-names>E.V.</given-names>
          </string-name>
          <article-title>PanDA for COMPASS: processing data</article-title>
          via Grid // CEUR Workshop Proceedings, Vol.
          <volume>1787</volume>
          . - P.
          <fpage>385</fpage>
          -
          <lpage>388</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Maeno</surname>
            <given-names>T.</given-names>
          </string-name>
          et al.
          <article-title>Evolution of the ATLAS PanDA workload management system for exascale computational science //</article-title>
          <source>Journal of Physics Conference Series. - 2014</source>
          . - Vol.
          <volume>513</volume>
          . - http://inspirehep.net/record/1302031/
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Klimentov</surname>
            <given-names>A.</given-names>
          </string-name>
          et al.
          <article-title>Next generation workload management system for big data on heterogeneous distributed computing //</article-title>
          <source>Journal of Physics Conference Series. - 2015</source>
          . - Vol.
          <volume>608</volume>
          . - http://inspirehep.net/record/1372988/
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Rucio</surname>
            <given-names>homepage</given-names>
          </string-name>
          , http://rucio.cern.ch/
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Baranov</surname>
            <given-names>A.V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Balashov</surname>
            <given-names>N.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kutovskiy</surname>
            <given-names>N.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Semenov</surname>
            <given-names>R.N.</given-names>
          </string-name>
          <article-title>JINR cloud infrastructure</article-title>
          evolution // Physics of Particles and
          <string-name>
            <given-names>Nuclei</given-names>
            <surname>Letters</surname>
          </string-name>
          .
          <article-title>-</article-title>
          <year>2016</year>
          . - Vol.
          <volume>13</volume>
          , Issue 5. - P.
          <fpage>672</fpage>
          -
          <lpage>675</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>