<!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>
      <journal-title-group>
        <journal-title>ORCID:</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Towards Hardware OpenGL Support in Cloud Computing</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Eugene Denisov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Irina Kalugina</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Keldysh Institute of Applied Mathematics</institution>
          ,
          <addr-line>Miusskaya sq., 4 Moscow, 125047</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <volume>000</volume>
      <fpage>0</fpage>
      <lpage>0002</lpage>
      <abstract>
        <p>Modern realistic computer graphics applications, such as physically accurate lighting simulation systems, require a lot of computer power for images generation. Usage of the resources of cloud computing platforms for such calculations allows to avoid additional expenses for purchase and maintenance of own computer farms. However often such simulation systems use OpenGL for 3D images display, for example during scene preparation and modification. Since cloud-based virtual machines had only software (that is, slow) OpenGL display support, it was not convenient for the users to work with their habitual computer graphics applications in such environments, and typical workflow was to prepare all data on local computer and then execute simulation in the cloud service (usually using distributed processing). Recently several cloud computer service providers started to suggest users the option of hardware (GPU-based) OpenGL support in their cloud virtual machines. This article is devoted to the investigation of hardware OpenGL display options, suggested by various providers of cloud computing services, and their comparison. Available types of hardware GPU were checked and compared, along with the conditions for their usage. Cloud computing, computer graphics, hardware OpenGL.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Modern realistic computer graphics is based on physically accurate lighting simulation in different
media. The simulation requires a lot of computing power, and time of image generation for large scenes
having millions of objects with complex optical properties, as well as many light sources, can be as
large as tens hours. Naturally, users are looking for additional computational resources to be used for
their goals. The ideas to provide such resources via Internet were elaborated in the past [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Now a
convenient cloud computing services appeared, and they are considered as computational resources
along with the other possibilities [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Cloud computing is applied for various resource-consuming
calculations, such as overlay analysis [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] or motion capture [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>However, users of lighting simulation and realistic visualization software would prefer to not use
separate services for each time-consuming operation, but to stay in the workbench they have
accustomed to, and use its habitual thus convenient user interface. This becomes possible, if to arrange
Virtual Machine in cloud service with all necessary software, and perform all operations in that
machine. But most of modern visualization systems intensively use OpenGL for 3D scene preview,
interactive navigation and scene modelling, and sometimes even for displaying of user interface objects.
For smooth interactive operations with such systems, a GPU with hardware OpenGL support is
necessary.</p>
      <p>Recently several providers of cloud computing services started to suggest their clients the virtual
computing platforms with the support of hardware OpenGL. The goal of our study was to investigate
what services can be really obtained from them and for what cost (under cost we consider not only
money but the complexity of usage as well). This article compares hardware OpenGL features,
suggested by several famous cloud computing platforms. Such comparison may help users to select
proper platform, which maximally fits their needs.</p>
      <p>2021 Copyright for this paper by its authors.
The following cloud computer service platforms are compared below:
 Google Cloud Platform;
 Microsoft Azure;
 Amazon Web Services.</p>
      <p>
        In spite various visualization services are already provided in the cloud computing platforms, for
example on Amazon [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], this does not allow users to stay completely in the frames of their customary
lighting simulation software.
      </p>
      <p>All three above services provide option to add various GPUs (NVIDIA and/or AMD) to their Virtual
Machines (VM). Depending on user needs, there are cheap (for accelerated 3D rendering) or expensive
(for GPU calculations) options. It is necessary to note, that only visualization by OpenGL is considered
below; other visualization techniques (such as DirectX), as well as GPU calculations, are not
considered.</p>
      <p>In the cloud computing the speed of remote display naturally depends on network speed, which in
turn depends on location of (distance to) the VM. Those services have different datacenters throughout
the world (with different prices depending on location). To achieve the best visualization performance,
it is necessary to select location of VM to be nearest to the user.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Google Cloud Platform</title>
      <p>
        Google suggests various types of VM in frames of their «Compute Engine» service [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. New users
get $300 in credit to spend for Google Cloud over the next 90 days. There are some free VM types
available, but GPU there is not free and cannot be attached to free (poor) VM types.
      </p>
      <p>
        All set of available resources in Google Cloud Platform [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] is split into «regions» and then into
«zones» inside «regions». Not all zones have GPU, and those which have, sometimes have no available
ones (i.e. all are busy). There is no regions in Russia. In Germany, there is one «Frankfurt» region,
which has three zones, and only one zone has GPUs. In Japan, there are two regions: «Tokyo» and
«Osaka». «Tokyo» region has three zones, two of them has GPUs. But at the moment of VM creation
there was no available GPU in the one of these zones, and only in the other one the VM of necessary
type could be created. But even after the VM was created, sometimes it could not be started because
«zone does not have enough resources, try again later». It is not explained which resources are not
enough, but perhaps it was GPU. One remedy is to recreate VM in «less busy» region (without warranty
that VM in another region will eventually start when necessary). Another remedy is to use «reserved»
VM - all equipment for VM is allocated for whole life of this VM (and is paid round the clock regardless
of whether VM is turned on or not).
      </p>
      <p>Only VMs of «N1» family support the visualization from GPU (i.e. hardware OpenGL). They are
based on Skylake, Broadwell, Haswell, Sandy Bridge, and Ivy Bridge Intel CPU platforms; specific
platform can be selected during VM creation. They are available as both predefined VMs and custom
VMs. Custom VMs can be created within a wide range of memory-to-core ratio, ranging from 0.95 GB
per core to 6.5 GB per core. During creation of predefined VM user can select among three possible
variants: «standard» (balanced), «high memory» (more RAM), «high cpu» (less RAM). Table 1 shows
all possible predefined variants for «N1» family of VMs.</p>
      <p>
        Cost of these VMs includes 50 GB standard HDD, Windows Server 2019 (with license) and GPU
NVIDIA Tesla T4 (with NVIDIA GRID license). Instances with one GPU can have at most 24 cores;
with two GPUs – at most 48 cores; for more cores four GPUs are required. All prices are available in
the price list [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>The following configuration of «standard N1» VM was created for testing in the «Tokyo» region: 4
cores (Intel Xeon 2.20 GHz), 15 GB RAM, NVIDIA Tesla T4 attached to it, and Windows Server 2019
installed. For Windows VMs only Windows Servers are readily available, though user can provide and
install own OS of any version; then its licensing/registration is up to user as well.</p>
      <p>Only NVIDIA GPUs are available in Google Cloud Platform. After VM creation GPU must be
configured - proper drivers must be installed into the guest OS. Whole procedure is well described in
user manual, including link to drivers themselves. There was no any problems with it, and after drivers
installation applications could successfully recognize the presence of hardware OpenGL accelerator
and could use it for 3D display. Speed of GUI operations and OpenGL drawing looks satisfying taking
into account remote nature of operation with VM.</p>
      <p>Initially connection is possible via standard Windows Remote Desktop only. After first connection
user can install other tools for remote access, such as Chrome Remote Desktop, Team Viewer, etc.</p>
      <p>Below is a quote from actual billing for VM in Google Cloud. VM runtime was 221 hours (9.2 days),
total sum $224 (about $1 per hour). This includes cost of CPU cores, RAM, GPU, Windows license,
NVIDIA GRID license (necessary for usage of GPU for visualization in VM), disk space, network
traffic, etc. Cost breakdown is presented on the Figure 1.</p>
      <p>«GPU license» here is «NVIDIA GRID license» necessary for display of hardware OpenGL from
GPU. This «display from GPU» option is activated and paid separately from GPU itself. If one does
not need display from GPU (e.g. GPU is used for GPU calculations only), then he does not activate
«display from GPU», hardware OpenGL visualization is not used and «GPU license» is not charged. It
is remarkable that cost of hardware OpenGL visualization support is more than half of total sum.</p>
      <p>Here are several comments on the way of resources charging:
 GPU, GPU license, CPU, RAM are charged for VM working hours.
 Windows license is charged for working hours * cores. I.e. for 4-cores VM one has to pay 4
times more for Windows license than for 1-core VM.
 HDD is charged round the clock (even when VM is turned off).</p>
      <p> Network traffic is charged for actual data transferred to/from VM.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Microsoft Azure</title>
      <p>
        Microsoft suggests various types of VM in frames of their «Azure» service [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. New users get $200
for 30 days to be spent for Microsoft Azure services. After registration Microsoft Azure suggests a free
VM instance - during first 12 months new user can use free of charge a VM of «B1S» size (1 core, 1
GB RAM, 4 GB HDD). GPU in Microsoft Azure is not free and cannot be attached to free VM instance.
      </p>
      <p>All set of available resources in Microsoft Azure is split into «regions». Not all regions have GPUs.
There is no regions in Russia. In Germany there are four regions, but none of them has GPUs. In Japan
there are two regions, «Japan East» and «Japan West». «Japan West» has no GPUs, «Japan East» has
it, and so VM was created there.</p>
      <p>
        The complete list of available VM configurations (they call it «VM sizes») is available in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. All
possible VM sizes with support of visualization from GPU (i.e. hardware OpenGL) are listed in the
Table 2.
      </p>
      <p>There is no possibility to get «more RAM» or «less RAM» (as in Google Cloud Platform); size of
RAM is fixed for every VM size.</p>
      <p>For testing purpose the AMD-based VM of «NV4as_v4» size (4 cores, 14 GB RAM) was selected,
for several reasons, among them are: to compare cost of VM with performance similar to one used in
Google Cloud Platform, and to test visualization by AMD GPU this time.</p>
      <p>Again after VM creation GPU must be configured properly. Procedure is well described in
documentations. Proper drivers can be installed into the VM using Microsoft Azure Portal. Here also
no any problems were found, and OpenGL visualization worked as expected. Everything looks the same
as it was in Google Cloud Platform.</p>
      <p>
        Cost of that VM is ~$0.6 per hour. It is necessary to note that the cheapest NVIDIA-based VM
(6cores one) costs 3 times more, ~$1.83 per hour; the same NVIDIA GRID technology is used (as in
Google Cloud Platform). All prices are available in online pricing calculator [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
      </p>
      <p>Like in Google Cloud Platform, connection is provided via standard Windows Remote Desktop
protocol, but other remote access programs can be installed into the VM.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Amazon Web Services</title>
      <p>
        Amazon suggests Virtual Machines in their «Elastic Computer Cloud» service (EC2, [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]). There
are 21 geographical regions where VMs can be created. There are no regions in Russia. There is one
region in Germany, «Frankfurt», it has GPUs. There are 2 regions in Japan - «Asia Pacific (Osaka)»
and «Asia Pacific (Tokyo)». Only «Asia Pacific (Tokyo)» has GPUs. Among Windows OS only
Windows Server is available, versions 2003 and newer.
      </p>
      <p>
        All VM instance types available in EC2 are listed in [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. Complete list of VM instance types which
support hardware OpenGL visualization using GPU is presented below in Table 3. NVIDIA-based
instances use the same NVIDIA GRID technology as in other cloud services.
      </p>
      <p>Table 3</p>
      <sec id="sec-4-1">
        <title>Available VM sizes with GPU visualization support CPU, GPU</title>
      </sec>
      <sec id="sec-4-2">
        <title>2-nd Generation Intel Xeon Scalable (Cascade Lake) +</title>
      </sec>
      <sec id="sec-4-3">
        <title>NVIDIA T4 Tensor Core</title>
      </sec>
      <sec id="sec-4-4">
        <title>Intel Xeon E5-2686 v4 (Broadwell) +</title>
      </sec>
      <sec id="sec-4-5">
        <title>NVIDIA Tesla M60</title>
      </sec>
      <sec id="sec-4-6">
        <title>2-nd generation AMD EPYC processors +</title>
      </sec>
      <sec id="sec-4-7">
        <title>AMD Radeon Pro V520</title>
        <p>Num of
cores</p>
        <p>However, besides classic GPUs Amazon Web Services suggests also another approach for hardware
OpenGL visualization: «Amazon Elastic Graphics». Amazon Elastic Graphics provides graphics
acceleration for Windows instances. Elastic Graphics accelerators are available in multiple sizes and
are a low-cost alternative to using GPU graphics instance types. A user can choose an instance type that
meets the compute, memory, and storage needs of his / her application. Then, add the accelerator to the
instance that meets the graphics requirements. An Elastic Graphics accelerator does not form part of
the hardware of the cloud service instance. Instead, it is network-attached through a network interface.
An Amazon-optimized OpenGL library detects the attached accelerator. It directs OpenGL API calls
from user’s instance to the accelerator, which then processes the requests and returns the results.</p>
        <p>
          By other words, «Amazon Elastic Graphics» can be attached to ordinary VM instances (without
GPU). Cost of «Amazon Elastic Graphics» is presented in Table 4. All prices for all VM types are listed
in [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ].
        </p>
        <p>Thus «Amazon Elastic Graphics» can be attached e.g. to instance of general purpose «t3.xlarge»
type (4 cores, 16 GB RAM) which is a cheapest among 4-cores instances with cost $0.2912 per hour,
and give total cost $0.3842 per hour, which is 2.3 times less than cheapest 4-cores instance with GPU.</p>
        <p>«Amazon Elastic Graphics» can be used only for OpenGL acceleration; no DirectX support, no
GPU-based calculations. This option might be interesting as a mean to minimize cost of VM with
hardware OpenGL visualization support.</p>
      </sec>
      <sec id="sec-4-8">
        <title>Cost of «Amazon Elastic Graphics»</title>
      </sec>
      <sec id="sec-4-9">
        <title>Graphics Memory size</title>
        <p>1 GB
2 GB
4 GB
8 GB</p>
      </sec>
      <sec id="sec-4-10">
        <title>Cost per hour, Japan</title>
        <p>$0.093
$0.186
$0.372
$0.744</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusion</title>
      <p>It seems selection of appropriate cloud computing service with GPU supporting hardware OpenGL
is not an easy task, and typically, such feature seriously increases cost of service. Therefore perhaps
such approach is justified for short-term projects requiring a lot of computing power (besides
visualization), or when it is unprofitable to make serious initial investments (purchase of powerful
computers). The convenience of cloud computing is that for every particular project it is possible to
select most optimal configuration in cost-performance terms. Meanwhile when purchasing own PC,
one cannot be sure its capabilities (e.g. RAM size), which seems to be enough for current project, will
be enough for future projects as well.</p>
    </sec>
    <sec id="sec-6">
      <title>6. References</title>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>B.</given-names>
            <surname>Kh. Barladyan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. G.</given-names>
            <surname>Voloboi</surname>
          </string-name>
          ,
          <string-name>
            <surname>N. I.</surname>
          </string-name>
          <article-title>V'yukova, V. A</article-title>
          .
          <string-name>
            <surname>Galaktionov</surname>
            ,
            <given-names>N. B.</given-names>
          </string-name>
          <string-name>
            <surname>Deryabin</surname>
          </string-name>
          ,
          <article-title>Illumination Modeling and Generation of Realistic Images Using Internet Technologies, Programming</article-title>
          and
          <source>Computer Software</source>
          <volume>31</volume>
          (
          <issue>5</issue>
          ) (
          <year>2005</year>
          )
          <fpage>282</fpage>
          -
          <lpage>291</lpage>
          . doi:
          <volume>10</volume>
          .1007/s11086-005-0037-1.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>V. S.</given-names>
            <surname>Vavilala</surname>
          </string-name>
          ,
          <article-title>Combining high-performance hardware, cloud computing, and deep learning frameworks to accelerate physical simulations: probing the Hopfield network</article-title>
          ,
          <source>European Journal of Physics</source>
          <volume>41</volume>
          (
          <issue>3</issue>
          ) (
          <year>2020</year>
          )
          <article-title>035802</article-title>
          . doi:
          <volume>10</volume>
          .1088/
          <fpage>1361</fpage>
          -6404/ab7027.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>K.</given-names>
            <surname>Zhao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Jin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Fan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Song</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Zhou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Jiang</surname>
          </string-name>
          ,
          <article-title>High-Performance Overlay Analysis of Massive Geographic Polygons That Considers Shape Complexity in a Cloud Environment</article-title>
          ,
          <source>ISPRS International Journal of Geo-Information</source>
          <volume>8</volume>
          (
          <issue>7</issue>
          ) (
          <year>2019</year>
          )
          <article-title>290</article-title>
          . doi:
          <volume>10</volume>
          .3390/ijgi8070290.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Xie</surname>
          </string-name>
          , H. Su,
          <article-title>Research on the application of cloud computing mode in athletes' technical movement capture</article-title>
          ,
          <source>Concurrency and Computation - Practice &amp; Experience</source>
          <volume>31</volume>
          (
          <issue>10</issue>
          ) (
          <year>2019</year>
          )
          <article-title>e4747</article-title>
          . doi:
          <volume>10</volume>
          .1002/cpe.4747.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>M.</given-names>
            <surname>Raji</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Hota</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Hobson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Huang</surname>
          </string-name>
          ,
          <article-title>Scientific Visualization as a Microservice</article-title>
          ,
          <source>IEEE Transactions on Visualization and Computer Graphics</source>
          <volume>26</volume>
          (
          <issue>4</issue>
          ) (
          <year>2020</year>
          )
          <fpage>1760</fpage>
          -
          <lpage>1774</lpage>
          . doi:
          <volume>10</volume>
          .1109/TVCG.
          <year>2018</year>
          .
          <volume>2879672</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Google</given-names>
            <surname>Cloud - Compute Engine</surname>
          </string-name>
          . URL: https://cloud.google.com/compute.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Google</surname>
            <given-names>Cloud -</given-names>
          </string-name>
          <article-title>Machine families</article-title>
          . URL: https://cloud.google.com/compute/docs/machine-types.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Google</given-names>
            <surname>Cloud - Compute</surname>
          </string-name>
          <article-title>Engine pricing</article-title>
          . URL: https://cloud.google.com/compute/all-pricing.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Microsoft</given-names>
            <surname>Azure - Virtual Machines</surname>
          </string-name>
          . URL: https://azure.microsoft.com/en-us/services/virtualmachines/.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Microsoft</surname>
            <given-names>Azure -</given-names>
          </string-name>
          <article-title>Sizes for virtual machines</article-title>
          . URL: https://docs.microsoft.com/enus/azure/virtual-machines/sizes.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Microsoft</surname>
            <given-names>Azure -</given-names>
          </string-name>
          <article-title>Pricing calculator</article-title>
          . URL: https://azure.microsoft.com/enus/pricing/calculator/?service=virtual-machines.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>AWS - Amazon EC2</surname>
          </string-name>
          . URL: https://aws.amazon.com/ec2/.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <article-title>AWS - Amazon EC2 Instance Types</article-title>
          . URL: https://aws.amazon.com/ec2/instance-types/.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <article-title>AWS - Amazon EC2 pricing</article-title>
          . URL: https://aws.amazon.com/ec2/pricing/.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>