<!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>USING DISTRIBUTED CLOUDS FOR SCIENTIFIC COMPUTING</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>N.A. Kutovskiy</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>I.S. Pelevanyuk</string-name>
          <email>pelevanyuk@jinr.ru</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>D.N. Zaborov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="editor">
          <string-name>Nikolay Kutovskiy, Igor Pelevanyuk, Dmitry Zaborov</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute for Nuclear Research, Russian Academy of Sciences</institution>
          ,
          <addr-line>7a 60-letiya Oktyabrya Prospekt, Moscow, 117312</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Joint Institute for Nuclear Research</institution>
          ,
          <addr-line>6 Joliot-Curie St., Dubna, Moscow Region, Russia, 141980</addr-line>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Plekhanov Russian University of Economics</institution>
          ,
          <addr-line>36 Stremyanny Lane, Moscow, 117997</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2021</year>
      </pub-date>
      <fpage>5</fpage>
      <lpage>9</lpage>
      <abstract>
        <p>Nowadays, cloud resources are the most flexible tool to provide access to infrastructures for establishing services and applications. However, it is also a valuable resource for scientific computing. At the Joint Institute for Nuclear Research, the computing cloud was integrated with the DIRAC system. It allowed for the submission of scientific computing jobs directly to the cloud. Thanks to the experience, the cloud resources of several organizations from the JINR Member States were integrated in the same way. It increased the total amount of cloud resources accessible in a uniform way through DIRAC, in the scope of the so-called Distributed Information and Computing Environment (DICE). Folding@Home tasks related to the SARS-CoV-2 virus were submitted to all available cloud resources. In addition to useful scientific results, such experience was also helpful in obtaining information about the performance, limitations, strengths, and weaknesses of the combined system. Based on the gained experience, the DICE infrastructure was tuned to successfully perform real user jobs related to Monte-Carlo simulation for the Baikal-GVD experiment.</p>
      </abstract>
      <kwd-group>
        <kwd>data processing</kwd>
        <kwd>cloud computing</kwd>
        <kwd>distributed computing</kwd>
        <kwd>GRID applications</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>The Joint Institute for Nuclear Research (JINR) is an international intergovernmental
organization. It is developing as a large multidisciplinary international scientific center incorporating
basic research in the field of modern nuclear physics, the development and application of high
technologies, as well as university education in the relevant fields of knowledge. Currently, JINR has
18 Member States and 6 countries participating in JINR’s activities on the basis of bilateral
agreements signed at the governmental level.</p>
      <p>
        The cloud infrastructure [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] deployed at JINR was created in 2013 to manage the IT services
and servers of the Meshcheryakov Laboratory of Information Technologies (MLIT) more efficiently
using modern technologies, to combine resources for solving common tasks, to increase the efficiency
of hardware utilization and service reliability, to simplify access to application software and optimize
the use of proprietary software, as well as to provide a modern computing facility for JINR users.
      </p>
      <p>Cloud infrastructures are a flexible tool for many different tasks. One of these tasks is massive
scientific computing. Clouds can provide a resource capable of handling a High-Throughput
Computing workload. JINR takes part in several experiments where extensive Monte-Carlo generation
is required. The use of cloud infrastructures of the JINR Member States can also be used for such
workloads.</p>
      <p>
        The integration of the cloud resources of JINR and its Member States was performed with the
help of the DIRAC Interware [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. DIRAC is a platform that provides basic tools and methods for
combining heterogeneous infrastructures and their operation for large sets of computing tasks. A
special module was developed at JINR in order to integrate clouds to the system [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. At the moment, 9
clouds from JINR and its Member States are included in the DIRAC system. All of these distributed
heterogeneous computing resources represent a valuable and powerful resource. The main features of
these clouds are shown in Table 1. The major questions related to this unique resource are how to use
it efficiently in scientific computing, what are the limitations of the combined system, how to support
it in the operational state, and what to do with possible failures.
320
608
840
96
672
704
64
250
290
3524
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Features of the distributed cloud infrastructure</title>
      <p>The DIRAC Interware platform is used to integrate different clouds into a united
infrastructure. For this purpose, a dedicated user account should be created on each cloud. All
resources provided to this user within their quota will be available for creating virtual machines.</p>
      <p>The DIRAC provides a job queue where users can send their jobs. The job is described in a
special way, either using the DIRAC Python API or with a special Job Description Language. The API
is the best way for massive job submissions. The parameters of the job include the following
information: name of the executable on the virtual machine, arguments passed to the executable, list of
files to be uploaded with the job (“Input Sandbox”), list of files to be downloaded back (“Output
Sandbox”), and optionally, list of appropriate clouds that can complete this particular job. It is not
possible to include large files (more than 5 MB) in input and output sandboxes. The general
recommendation is to put only logs and configuration in sandboxes.</p>
      <p>The standard approach is to create a Shell script that describes the whole workflow of a
particular job. Generally, each job described in the Shell script consists of several major steps: initial
configuration, input data download, processing, output data upload, and finalization. Any step can be
omitted if not required. The Shell script and the necessary configuration files are included in the input
sandbox. The standard output of the job is automatically redirected to a file that is included in the
output sandbox.</p>
      <p>All data files should be placed on storage elements integrated with DIRAC. Currently, only
systems with the support of the root protocol for access and VOMS (Virtual Organization Membership
Service) for authentication can be used as storage elements in DIRAC. The use of VOMS ensures that
a user with the correct membership in a VOMS group will be able to access storage elements from
anywhere.</p>
      <p>User jobs are not directly submitted to the cloud. At first, when jobs suitable for the clouds
appear, DIRAC creates virtual machines on one of the appropriate clouds with special instructions to
execute after the boot process. These instructions contain information about the installation of DIRAC
Pilot. DIRAC Pilot is a special process that performs basic checks of the resource it is running on and
submits the results to the DIRAC Matcher service. The DIRAC Matcher service chooses a job that can
be completed on a resource with the received parameters. This job and the corresponding input
sandbox are downloaded by DIRAC Pilot. After that, the user job starts as a child process of DIRAC
Pilot. This scheme eliminates resources that cannot complete the job, for example, due to the lack of
RAM or an inappropriate OS. After completing the first job, DIRAC Pilot can request another.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Limitations on job execution in the cloud</title>
      <p>The main concern during job submission is related to the fact that the network connection
between the cloud and the storage element is a limited resource. It means that even if a single job is
successfully completed during the testing stage, it does not guarantee that hundreds of similar jobs will
work in the same way. All these jobs will need to retrieve user software, download some input files
and upload results to a storage element. This can be a bottleneck for the whole pack of jobs and can
increase the execution time. What in turn decreases the efficiency of CPU utilization, since jobs will
be waiting for data transfers for a substantial amount of time.</p>
      <p>The CernVM File System (CVMFS) is used for the software distribution across the
computational resources of all participating organizations. It caches the queried files in a dedicated
directory on the local CVMFS caching node, and the rest of the queries to the same files are served
from this local cache. The client-side CVMFS cache also helps to lower a load on the network when
multiple similar jobs reusing the same CVMFS files are executed subsequently on the same virtual
machine; in the clouds, where virtual machines are spawned and deleted, often the benefits of such file
caching cannot be pronounced. DIRAC provides the necessary options for configuring the IP
addresses of caching CVMFS servers for different clouds.</p>
      <p>The cloud infrastructure does not provide a standardized solution for caching input data files.
Hence, custom solutions may need to be considered. For example, some input data can be downloaded
once and cached in a temporary directory on the local file system of the virtual machine. Then jobs
requested by DIRAC Pilot after the first job can use the cached data. It can also be done by placing the
input data on the CVMFS file system, but due to the limited frequency of CVMFS file system
synchronization, this will only work for very static data. Mainly due to the network bandwidth
limitations, clouds are not currently proposed as resources for massive data processing. On the other
hand, clouds can be highly efficient at executing a wide range of CPU-intensive jobs characterized by
modest storage requirements. This is typical of jobs performing Monte Carlo simulation of particle
physics experiments, which normally require very little input data, but are highly CPU-intensive.
During Monte-Carlo data generation, the only data that will definitely require a real network transfer is
the output. The output data size is usually predictable, and it is possible to estimate the number of jobs
that are reasonable for simultaneous execution on a single cloud, given the network bandwidth
restrictions. The described problem does not relate to every cloud. Some of them were designed as
tools for massive data processing and possess a high-bandwidth external network connection, while
others were designed to host services that are not so demanding in terms of network and have a very
limited external network bandwidth.</p>
      <p>Sometimes it is possible to negotiate with cloud owners to upgrade the network connection.
Demonstration that their cloud can participate in computing for large scientific collaborations can be a
good reason for the network upgrade. Thus, we prepared two successful use cases of scientific
workload execution in the clouds.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Folding@Home jobs in the clouds</title>
      <p>Folding@Home is a community of volunteers, researchers and organizations that help with
their intelligent and computing resources to understand the dynamics of proteins, their functions and
dysfunctions in order to find new proteins and drugs. Every person in the world can install the
Folding@Home client on their home computer and calculate scientific jobs. When SARS-CoV-2
appeared, Folding@Home created a queue devoted to the study of this virus. Many people and
organizations worldwide donated their resources to this cause.</p>
      <p>We decided that Folding@Home jobs were perfect for the demonstration of distributed cloud
performance, not with artificial tests, but with real jobs. The main feature of Folding@Home jobs is
that the input and output are small, but the amount of computing work is large. This is a perfect mode
for cloud resources. The Folding@Home software was installed in advance in all images used by
DIRAC on all clouds. A special DIRAC job was designed for this task. It starts the Folding@Home
client, but only for one work unit from Folding@Home. After its execution, the job is considered
completed. After that, a new DIRAC job can take its place.</p>
      <p>The total number of successfully completed Folding@Home jobs exceeds 13 thousand. The
distribution of the jobs across the clouds is shown in Figure 1. The completion of each job took on
average 15 hours. Only single-core jobs were executed. The total amount of normalized consumed
computer power is around 135 kHS06 days.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Baikal-GVD jobs in the clouds</title>
      <p>
        Baikal-GVD is a cubic-kilometer scale underwater neutrino detector currently under
construction on Lake Baikal (Russia) [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. At JINR, Baikal-GVD is the first large particle physics
experiment that massively used cloud resources combined by DIRAC for Monte-Carlo simulation
purposes. The majority of jobs were part of large-scale Monte-Carlo production that involved
simulating the propagation of high-energy muons in water and the detector response. The standard
workflow of a user job with input data download and output data upload was used. Each job required
to download an input file of about 2 GB. The result of Monte-Carlo generation had an average size of
370 MB. Only two cloud resources were ready for this type of workload. The PRUE cloud was busy at
the time of production, so most of the jobs were completed by the JINR cloud. Only single-core jobs
were executed. The total number of successfully executed jobs is 67.5 thousand. The utilization of the
JINR cloud was around 80% during this simulation campaign, which is demonstrated in Figure 2. The
completion of each job took on average 6 hours. The total amount of normalized consumed computer
power is around 280 kHS06 days.
      </p>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusion</title>
      <p>Clouds are a valuable computing resource for scientific computing. Their flexibility provides a
unique opportunity for tuning working environments for the requirements of different jobs: OS,
amount of local storage, amount of RAM per core; all of which can be configured on the cloud. The
low network bandwidth of any participating organization is the main critical parameter in defining the
number of jobs that can be simultaneously executed.</p>
      <p>We showed an example of cloud integration via the DIRAC Interware. User jobs should be
configured in order to be executed by DIRAC. It requires some significant effort from users. However,
once it is done, it is possible to greatly increase the amount of accessible computing resources. This is
good not only for users, but also for clouds. DIRAC jobs are a good way to improve the utilization of
cloud resources, and a possibility to participate in computing for scientific collaborations.</p>
      <p>Folding@Home jobs were successfully executed in the clouds. That gave us experience in
running Monte-Carlo jobs of Baikal-GVD.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Balashov</surname>
            <given-names>N.A.</given-names>
          </string-name>
          et al.,
          <source>Present Status and Main Directions of the JINR Cloud Development // Proceedings of the 27th International Symposium Nuclear Electronics and Computing</source>
          (NEC'
          <year>2019</year>
          ), CEUR Workshop Proceedings, ISSN:
          <fpage>1613</fpage>
          -
          <lpage>0073</lpage>
          , vol.
          <volume>2507</volume>
          (
          <year>2019</year>
          ), pp.
          <fpage>185</fpage>
          -
          <lpage>189</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Korenkov</surname>
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pelevanyuk</surname>
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tsaregorodtsev</surname>
            <given-names>A</given-names>
          </string-name>
          .
          <article-title>Integration of the JINR Hybrid Computing Resources with the DIRAC Interware for Data Intensive Applications // Data Analytics and Management in Data Intensive Domains</article-title>
          .
          <year>2020</year>
          . P.
          <volume>31</volume>
          -
          <fpage>46</fpage>
          . DOI:
          <volume>10</volume>
          .1007/978-3-
          <fpage>030</fpage>
          -51913-
          <issue>1</issue>
          _
          <fpage>3</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>N.</given-names>
            <surname>Balashov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kuchumov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Kutovskiy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.</given-names>
            <surname>Pelevanyuk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Petrunin</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Tsaregorodtsev</surname>
          </string-name>
          ,
          <source>CEUR Workshop Proceedings</source>
          <volume>2507</volume>
          ,
          <issue>256</issue>
          (
          <year>2019</year>
          ), URL http://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>2507</volume>
          /
          <fpage>256</fpage>
          -260-paper45.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Baikal-GVD Collaboration</surname>
          </string-name>
          : V.A.
          <string-name>
            <surname>Allakhverdyan</surname>
          </string-name>
          et al.,
          <article-title>Measuring muon tracks in Baikal-GVD using a fast reconstruction algorithm</article-title>
          , submitted to EPJ C,
          <year>arXiv</year>
          :
          <fpage>2106</fpage>
          .
          <fpage>06288</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>