<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.1 20151215//EN" "http://jats.nlm.nih.gov/publishing/1.1/JATS-journalpublishing1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" article-type="research-article" dtd-version="1.1">
<front>
<journal-meta>
<journal-id journal-id-type="pmc">CMC</journal-id>
<journal-id journal-id-type="nlm-ta">CMC</journal-id>
<journal-id journal-id-type="publisher-id">CMC</journal-id>
<journal-title-group>
<journal-title>Computers, Materials &#x0026; Continua</journal-title>
</journal-title-group>
<issn pub-type="epub">1546-2226</issn>
<issn pub-type="ppub">1546-2218</issn>
<publisher>
<publisher-name>Tech Science Press</publisher-name>
<publisher-loc>USA</publisher-loc>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">23630</article-id>
<article-id pub-id-type="doi">10.32604/cmc.2022.023630</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Article</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>FSpot: Fast and Efficient Video Encoding Workloads Over Amazon Spot Instances</article-title>
<alt-title alt-title-type="left-running-head">FSpot: Fast and Efficient Video Encoding Workloads Over Amazon Spot Instances</alt-title>
<alt-title alt-title-type="right-running-head">FSpot: Fast and Efficient Video Encoding Workloads Over Amazon Spot Instances</alt-title>
</title-group>
<contrib-group content-type="authors">
<contrib id="author-1" contrib-type="author">
<name name-style="western"><surname>Zabrovskiy</surname><given-names>Anatoliy</given-names></name><xref ref-type="aff" rid="aff-1">1</xref>
<xref ref-type="aff" rid="aff-3">3</xref>
</contrib>
<contrib id="author-2" contrib-type="author" corresp="yes">
<name name-style="western"><surname>Agrawal</surname><given-names>Prateek</given-names></name><xref ref-type="aff" rid="aff-1">1</xref>
<xref ref-type="aff" rid="aff-2">2</xref> 
<email>dr.agrawal.prateek@gmail.com</email>
</contrib>
<contrib id="author-3" contrib-type="author">
<name name-style="western"><surname>Kashansky</surname><given-names>Vladislav</given-names></name><xref ref-type="aff" rid="aff-1">1</xref>
</contrib>
<contrib id="author-4" contrib-type="author">
<name name-style="western"><surname>Kersche</surname><given-names>Roland</given-names></name><xref ref-type="aff" rid="aff-4">4</xref>
</contrib>
<contrib id="author-5" contrib-type="author">
<name name-style="western"><surname>Timmerer</surname><given-names>Christian</given-names></name><xref ref-type="aff" rid="aff-1">1</xref>
<xref ref-type="aff" rid="aff-4">4</xref>
</contrib>
<contrib id="author-6" contrib-type="author">
<name name-style="western"><surname>Prodan</surname><given-names>Radu</given-names></name><xref ref-type="aff" rid="aff-1">1</xref>
</contrib>
<aff id="aff-1"><label>1</label><institution>University of Klagenfurt</institution>, <addr-line>Klagenfurt, 9020</addr-line>, <country>Austria</country></aff>
<aff id="aff-2"><label>2</label><institution>Lovely Professional University</institution>, <addr-line>Phagwara, 144411</addr-line>, <country>India</country></aff>
<aff id="aff-3"><label>3</label><institution>Petrozavodsk State University</institution>, <addr-line>Petrozavodsk, 185035</addr-line>, <country>Russia</country></aff>
<aff id="aff-4"><label>4</label><institution>Bitmovin</institution>, <addr-line>Klagenfurt, 9020</addr-line>, <country>Austria</country></aff>
</contrib-group>
<author-notes>
<corresp id="cor1"><label>&#x002A;</label>Corresponding Author: Prateek Agrawal. Email: <email>dr.agrawal.prateek@gmail.com</email></corresp>
</author-notes>
<pub-date pub-type="epub" date-type="pub" iso-8601-date="2022-xx-xx"><day>11</day>
<month>01</month>
<year>2022</year></pub-date>
<volume>71</volume>
<issue>3</issue>
<fpage>5677</fpage>
<lpage>5697</lpage>
<history>
<date date-type="received"><day>14</day><month>9</month><year>2021</year></date>
<date date-type="accepted"><day>18</day><month>11</month><year>2021</year></date>
</history>
<permissions>
<copyright-statement>&#x00A9; 2022 Zabrovskiy et al.</copyright-statement>
<copyright-year>2022</copyright-year>
<copyright-holder>Zabrovskiy et al.</copyright-holder>
<license xlink:href="https://creativecommons.org/licenses/by/4.0/">
<license-p>This work is licensed under a <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</license-p>
</license>
</permissions>
<self-uri content-type="pdf" xlink:href="TSP_CMC_23630.pdf"></self-uri>
<abstract>
<p>HTTP Adaptive Streaming (HAS) of video content is becoming an undivided part of the Internet and accounts for most of today&#x0027;s network traffic. Video compression technology plays a vital role in efficiently utilizing network channels, but encoding videos into multiple representations with selected encoding parameters is a significant challenge. However, video encoding is a computationally intensive and time-consuming operation that requires high-performance resources provided by on-premise infrastructures or public clouds. In turn, the public clouds, such as Amazon elastic compute cloud (EC2), provide hundreds of computing instances optimized for different purposes and clients&#x2019; budgets. Thus, there is a need for algorithms and methods for optimized computing instance selection for specific tasks such as video encoding and transcoding operations. Additionally, the encoding speed directly depends on the selected encoding parameters and the complexity characteristics of video content. In this paper, we first benchmarked the video encoding performance of Amazon EC2 spot instances using multiple &#x00D7;264 codec encoding parameters and video sequences of varying complexity. Then, we proposed a novel fast approach to optimize Amazon EC2 spot instances and minimize video encoding costs. Furthermore, we evaluated how the optimized selection of EC2 spot instances can affect the encoding cost. The results show that our approach, on average, can reduce the encoding costs by at least 15.8&#x0025; and up to 47.8&#x0025; when compared to a random selection of EC2 spot instances.</p>
</abstract>
<kwd-group kwd-group-type="author">
<kwd>EC2 spot instance</kwd>
<kwd>encoding time prediction</kwd>
<kwd>adaptive streaming</kwd>
<kwd>video transcoding</kwd>
<kwd>clustering</kwd>
<kwd>HTTP adaptive streaming</kwd>
<kwd>MPEG-DASH</kwd>
<kwd>cloud computing</kwd>
<kwd>optimization</kwd>
<kwd>Pareto front</kwd>
</kwd-group>
</article-meta>
</front>
<body>
<sec id="s1"><label>1</label><title>Introduction</title>
<p>Nowadays, most Internet traffic represents multimedia content, such as live or on-demand audio and video streaming [<xref ref-type="bibr" rid="ref-1">1</xref>]. The streaming experience over the Internet depends on several factors like user location, network speed, traffic congestion, or end-user device, which significantly vary over time [<xref ref-type="bibr" rid="ref-2">2</xref>]. Streaming platforms and services use the HAS technology [<xref ref-type="bibr" rid="ref-3">3</xref>] to adapt to these bandwidth variations that provide video sequences in multiple bitrates. The resolution pairs are divided into short-term video and audio segments (e.g., 2 to 10 s), individually as requested by a client device depending on its technical conditions (e.g., screen size, network performance) in a dynamic, adaptive manner [<xref ref-type="bibr" rid="ref-4">4</xref>]. Client devices and video players use segment bitrate selection (or rate adaptation) algorithms to optimize the user experience [<xref ref-type="bibr" rid="ref-5">5</xref>,<xref ref-type="bibr" rid="ref-6">6</xref>]. The widely used MPEG-DASH HAS implementation allows streaming providers to choose from a set of codecs for video encoding due to its codec independent [<xref ref-type="bibr" rid="ref-3">3</xref>] characteristic, including Advanced Video Coding (AVC) [<xref ref-type="bibr" rid="ref-7">7</xref>], High-Efficiency Video Coding (HEVC) [<xref ref-type="bibr" rid="ref-8">8</xref>], VP9 [<xref ref-type="bibr" rid="ref-9">9</xref>], AOMedia Video 1 (AV1) [<xref ref-type="bibr" rid="ref-10">10</xref>] and Versatile Video Coding (VVC) [<xref ref-type="bibr" rid="ref-11">11</xref>]. However, encoding video segments for adaptive streaming is a computationally-intensive process that can take seconds or even days depending on many technical aspects, such as video complexity or encoding parameters [<xref ref-type="bibr" rid="ref-12">12</xref>] and typically requires expensive high-performance computers.</p>
<p>Currently, most streaming services and video encoding platforms opt for less expensive and more scalable cloud resources (e.g., Amazon Web Services (AWS), Google Cloud, Microsoft Azure) rented on demand [<xref ref-type="bibr" rid="ref-13">13</xref>,<xref ref-type="bibr" rid="ref-14">14</xref>], deployed worldwide on low-latency geo-distributed infrastructures [<xref ref-type="bibr" rid="ref-15">15</xref>,<xref ref-type="bibr" rid="ref-16">16</xref>]. Amazon EC2 currently operates in eighteen geographical locations and provides different instances for general purposes (m instances), compute-optimized (c instances), memory-optimized (r instances), or burstable (t instances) [<xref ref-type="bibr" rid="ref-17">17</xref>]. EC2 spot instances are unused spare compute capacity in the AWS cloud available at a high discount compared to on-demand prices, with the limitation is that AWS can stop them at any time upon a two-minute warning. While modern encoding platforms and services can significantly leverage spot instances to reduce their encoding costs, the unavailability of intelligent models to estimate the video encoding time and costs makes the correct selection of the cloud instances for thousands of encoding tasks still critical [<xref ref-type="bibr" rid="ref-13">13</xref>,<xref ref-type="bibr" rid="ref-18">18</xref>]. Cloud infrastructures, dedicated servers and Internet of Things devices [<xref ref-type="bibr" rid="ref-19">19</xref>] are examples of predicting encoding time, cost and stability significantly impacting the provisioning and scheduling of encoding tasks. Therefore, a highly desirable system that estimates the encoding time and costs and optimizes the encoding task schedule on selected spot instances [<xref ref-type="bibr" rid="ref-20">20</xref>].</p>
<p>To decrease the encoding costs and maximize the utilization of Amazon EC2 spot instances, we propose a new method called the Fast approach for better utilization of Amazon EC2 <bold>Spot</bold> Instances for video encoding (FSpot) based on four phases: 1) instance benchmarking, 2) fast encoding time estimation, 3) instance set selection and 4) priority and numerical calculation. The first phase tests different EC2 instances using various encoding parameters, extracts the critical features from the video encodings and creates a dataset, and proposes a heuristic for selecting EC2 spot instances. The second phase uses a fast estimate of the encoding speed for videos on a master node hosted on an on-demand EC2 instance that splits video into segments, estimates the encoding time and distributes encoding tasks to worker nodes hosted on spot instances. The third phase selects the required number of EC2 spot instances recommended for optimized video encoding in the Amazon cloud. Finally, the last phase calculates the priorities and number for EC2 spot instances, such that those with the lowest predicted video encoding cost have the highest priority. We evaluated FSpot on a set of ten heterogeneous videos of different genres with different duration and frame rates using three AWS availability zones. Experimental results show that, on average, our model can reduce the encoding costs by at least 15.8&#x0025; and up to 47.8&#x0025; when compared to a random selection of EC2 spot instances.</p>
<p>The significant contributions of the FSpot work are:
<list list-type="order">
<list-item><p>We benchmarked on eleven commonly used Amazon EC2 spot instances using different encoding parameters and video sequences.</p></list-item>
<list-item><p>We developed a novel method for fast encoding time estimation of video segments and proposed an algorithm combining Pareto frontier and clustering techniques to find an appropriate set of spot instances.</p></list-item>
<list-item><p>We also proposed and implemented a fast method to calculate the instance number and priority for different EC2 spot instances to optimize the Amazon EC2 spot instance selection for encoding task allocation. The proposed FSpot approach reduces the encoding costs by at least 15.8&#x0025; and up to 47.8&#x0025; compared to a random selection of EC2 spot instances.</p></list-item>
</list></p>
<p>This paper has five sections-Section 2 highlights related work. Section 3 describes the proposed FSpot approach and its implementation, followed by results evaluation in Section 4. Section 5 concludes the paper and highlights future work.</p>
</sec>
<sec id="s2"><label>2</label><title>Related Work</title>
<sec id="s2_1"><label>2.1</label><title>General Scheduling Techniques</title>
<p>Gog et al. [<xref ref-type="bibr" rid="ref-21">21</xref>] studied various scheduling architectures and proposed a min-cost max-flow (MCMF) optimization over a graph and continuously reschedules the entire workload. Authors extend Quincy&#x0027;s [<xref ref-type="bibr" rid="ref-22">22</xref>] original MCMF algorithm that results in task placement latencies of minutes on a large cluster. In [<xref ref-type="bibr" rid="ref-23">23</xref>], the authors propose global rescheduling with adaptive plan-ahead in dynamic heterogeneous clusters. Malawski et al. [<xref ref-type="bibr" rid="ref-24">24</xref>] presented a mathematical model to optimize the cost of scheduling workflows under a deadline constraint. It considers a multi-cloud environment where each provider offers a limited number of heterogeneous virtual machines and a global storage service to share intermediate data files. Ghobaei-Arani et al. [<xref ref-type="bibr" rid="ref-25">25</xref>] presented an autonomous resource provisioning framework to control and manage computational resources using a fuzzy logic auto-scaling algorithm in a cloud environment.</p>
<p>Similarly, Rodriguez et al. [<xref ref-type="bibr" rid="ref-26">26</xref>] described a plan-based offline auto-scaler that partitions workflows into bags-of-tasks and then applied a MIP-based approach to make the allocation plan. Another work of Malawski et al. [<xref ref-type="bibr" rid="ref-27">27</xref>] considered the problem of task planning on multiple clouds formulated but in the more general framework of the mixed-integer nonlinear programming problem (MINLP). Garcia-Carballeira et al. [<xref ref-type="bibr" rid="ref-28">28</xref>] combined randomized techniques with static local balancing in a round-robin manner for tasks scheduling. Chhabra et al. [<xref ref-type="bibr" rid="ref-29">29</xref>] combined multi-criteria meta-heuristics to schedule HPC tasks on the IaaS cloud. Ebadifard et al. [<xref ref-type="bibr" rid="ref-30">30</xref>] proposed a dynamic load balancing task scheduling algorithm for a cloud environment that minimizes the communication overhead. Wang et al. [<xref ref-type="bibr" rid="ref-31">31</xref>] performed an empirical analysis of amazon EC2 spot instance features affecting cost-effective resource management.</p>
</sec>
<sec id="s2_2"><label>2.2</label><title>Video Transcoding-specific Scheduling Techniques</title>
<p>Some recent remarkable works contributed to scheduling the video transcoding tasks [<xref ref-type="bibr" rid="ref-34">32</xref>&#x2013;<xref ref-type="bibr" rid="ref-34">34</xref>]. Kirubha et al. [<xref ref-type="bibr" rid="ref-35">35</xref>] implemented a modified controlled channel access scheduling method to improve the quality of service-based video streaming. Similarly, Jokhio et al. [<xref ref-type="bibr" rid="ref-36">36</xref>] presented a distributed video transcoding method to reduce video bitrates. Li et al. [<xref ref-type="bibr" rid="ref-37">37</xref>] presented a QoS-aware scheduling approach for mapping transcoding jobs to heterogeneous virtual machines. Recently, Sameti et al. [<xref ref-type="bibr" rid="ref-38">38</xref>] proposed a container-based transcoding method for interactive video streaming that automatically calculates the number of processing cores that maintain a specific frame rate for any given video segment and transcoding resolution. The authors performed benchmarking to find the optimal parallelism for interactive streaming video. Li et al. [<xref ref-type="bibr" rid="ref-39">39</xref>] proposed a HAS delivery scheme that combines caching, transcoding for energy and resource-efficient scheduling. Ma [<xref ref-type="bibr" rid="ref-40">40</xref>] proposed a scheduling method for transcoding MPEG-DASH video segments using a node that managed all other servers in the system (rather than predicting the transcoding times) and reported a saving time of up to 30&#x0025;.</p>
</sec>
<sec id="s2_3"><label>2.3</label><title>State-of-the-art Analysis</title>
<p>Previously listed general and transcoding-specific scheduling techniques are capable of processing a large amount of different computational workloads. Such systems use various scheduling algorithms ranging from general mixed-integer programming (MIP) techniques, flow-based formulations and workload-agnostic techniques to video-specific heuristics [<xref ref-type="bibr" rid="ref-41">41</xref>,<xref ref-type="bibr" rid="ref-42">42</xref>] that maximize the use of processing units and minimize the associated costs. Companies currently prefer on-demand and spot instances by utilizing state-of-the-art video codecs to enable cost-effective video encoding. As the cost of such computing units depends on the time of use (ph or ps), the customers strive to keep the highest possible utilization for all computing resources. They typically deploy the encoding tasks using opportunistic load balancing (OLB) algorithms to utilize the resources at all times. It is relatively easy to achieve maximum resource utilization if all the encoding tasks have similar complexity, require similar execution times on the underlying computing units and all computing units have the same price. However, a problem arises when a simple scheduling algorithm randomly assigns specific encoding tasks to expensive spot instances with a low availability probability or is not optimized for selected encoding parameters. This can lead to load imbalance, increased encoding time and costs and degraded video quality on the viewer side. The motivation for our work is to maximize the Amazon EC2 spot instances utilization for video encoding and provide the encoding infrastructure with advanced information on the various video encoding tasks to ensure their fast completion with reduced cost. The relatively straightforward case for the methods mentioned earlier is when all the encoding tasks have similar complexity, require similar execution times on the underlying computing units and all computing units have the same price. However, a problem arises when the scheduling algorithm misses specific knowledge about encoding workload and underlying computational resources behavior. Some methods are simply incapable of solving the problem directly in the case of the even bigger video workloads and smaller segment sizes of 2&#x2013;4 s. Natural extension led to the flow-based formulations and workload-agnostic techniques that can work on significantly larger scales. However, it can quickly happen that those methods will assign segment encoding tasks to spot instances with a low availability probability or not optimized for selected encoding parameters. It will result in additional expenses and sub-optimal performance. This can also lead to load imbalance, increase encoding time and costs and degrade video quality on the viewer side. Further, some approaches consider only a single objective to optimize. Our multi-objective approach maximizes the Amazon EC2 spot instances utilization, reduces the related costs and increases the execution reliability for <bold>large-scale video encoding workloads</bold> by reinforcing decisions with <bold>advanced information</bold> on the various video encoding tasks obtained via the fast benchmark algorithm.</p>
</sec>
</sec>
<sec id="s3"><label>3</label><title>Proposed FSpot Approach</title>
<sec id="s3_1"><label>3.1</label><title>EC2 Instance Benchmarking</title>
<sec id="s3_1_1"><label>3.1.1</label><title>Dataset Selection</title>
<p>First, we selected ten video sequences of different visual complexity from the publicly available dataset [<xref ref-type="bibr" rid="ref-12">12</xref>]. <?A3B2 "fig1",5,"anchor"?><xref ref-type="fig" rid="fig-1">Fig. 1</xref> shows the SI and TI metrics of the selected videos. The average TI and SI metrics confirm the varying video content complexity. We used video sequences that represent a wide range of possible visual scenes and use cases. <?A3B2 "tbl1",5,"anchor"?><xref ref-type="table" rid="table-1">Tab. 1</xref> presents video categories (or genres) and critical file characteristics of original videos. Using the FFmpeg [<xref ref-type="bibr" rid="ref-42">42</xref>] software v4.1.3, we uncompressed all video sequences into raw Y4M format and divided them into 80 video segments of 4 s duration each. Typically, each segment is a switching point to other video representations. Therefore the segment length becomes an important parameter in <italic>HTTP Adaptive Streaming</italic>. The 4 s segments are widely used in real video streaming deployments because they show a good trade-off between encoding efficiency and video streaming performance [<xref ref-type="bibr" rid="ref-43">43</xref>].</p>
<fig id="fig-1"><label>Figure 1</label><caption><title>Average spatial information (SI) and temporal information (TI) for video sequences</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMC_23630-fig-1.png"/></fig>
<table-wrap id="table-1"><label>Table 1</label><caption><title>Original video file characteristics</title></caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left">Video description</th>
<th align="left">Video category</th>
<th align="left">Frames per second</th>
<th align="left">Duration (in sec)</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">BBB</td>
<td align="left">Animation</td>
<td align="left">30</td>
<td align="left">60</td>
</tr>
<tr>
<td align="left">Beauty</td>
<td align="left">Moving head</td>
<td align="left">30</td>
<td align="left">20</td>
</tr>
<tr>
<td align="left">DrivingPOV</td>
<td align="left">Moving cars</td>
<td align="left">60</td>
<td align="left">20</td>
</tr>
<tr>
<td align="left">HoneyBee</td>
<td align="left">Nature (flying bee)</td>
<td align="left">30</td>
<td align="left">20</td>
</tr>
<tr>
<td align="left">Jockey</td>
<td align="left">Sports (running jockey)</td>
<td align="left">30</td>
<td align="left">20</td>
</tr>
<tr>
<td align="left">Sintel</td>
<td align="left">Animation</td>
<td align="left">24</td>
<td align="left">60</td>
</tr>
<tr>
<td align="left">TOS</td>
<td align="left">Animation and real</td>
<td align="left">24</td>
<td align="left">60</td>
</tr>
<tr>
<td align="left">WindAndNature</td>
<td align="left">Rotating wind vanes</td>
<td align="left">60</td>
<td align="left">20</td>
</tr>
<tr>
<td align="left">ReadySetGo</td>
<td align="left">Sports (horse racing)</td>
<td align="left">30</td>
<td align="left">20</td>
</tr>
<tr>
<td align="left">YachtRide</td>
<td align="left">Moving yacht</td>
<td align="left">30</td>
<td align="left">20</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s3_1_2"><label>3.1.2</label><title>EC2 Instance Performance Analysis</title>
<p>We encoded each Y4M segment using the FFmpeg &#x00D7;264 video codec implementation with the veryslow encoding preset to get the highest possible quality compared to the original videos. The &#x00D7;264 video codec contains nine encodings presets: ultrafast, superfast, veryfast, faster, fast, medium (default preset), slow, slower, veryslow, placebo [<xref ref-type="bibr" rid="ref-44">44</xref>]. Encoding bitrate with a slower &#x00D7;264 encoding preset for the same video usually has a slower encoding speed but better visual quality [<xref ref-type="bibr" rid="ref-45">45</xref>]. We considered these generated video segments as source files and used them to encode different Amazon EC2 instances. We developed a framework using Python programming language to encode video sequences in the Amazon cloud automatically. <?A3B2 "tbl3",5,"anchor"?><xref ref-type="table" rid="table-3">Tab. 3</xref> shows all encoded video segments on eleven different Amazon 2 &#x00D7; large instances (presented in <?A3B2 "tbl2",5,"anchor"?><xref ref-type="table" rid="table-2">Tab. 2</xref>) using various encoding parameters, i.e., bitrates and resolutions. All EC2 spot instances have eight vCPUs and RAM size ranges from 15 GiB for the c5a.2 &#x00D7; large instance to 64 GiB for the r5.2 &#x00D7; large and r5a.2 &#x00D7; large instances. We used multiple Amazon 2 &#x00D7; large instances commonly used for video transcoding [<xref ref-type="bibr" rid="ref-43">43</xref>]. We then extracted several features from the video encodings and created the Amazon EC2 instance encoding dataset. The raw dataset contains 16720 encoding tasks (80 segments &#x002A; 19 bitrates &#x002A; 11 EC2 instances) for the 4 s length video segments on medium encoding preset. Each record in our dataset contains EC2 instance name, EC2 instance availability, EC2 instance price, video segment name, encoding bitrate, file size, segment width, segment height, encoding time.</p>
<table-wrap id="table-2"><label>Table 2</label><caption><title>Amazon instances</title></caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left">Amazon EC2<break/>instance</th>
<th align="left">vCPUs</th>
<th align="left">RAM(GiB)</th>
<th align="left">Processor</th>
<th align="left">Optimized</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">c5a.2 &#x00D7; large</td>
<td align="left">8</td>
<td align="left">16</td>
<td align="left">AMD</td>
<td align="left">Compute</td>
</tr>
<tr>
<td align="left">c5.2 &#x00D7; large</td>
<td align="left">8</td>
<td align="left">16</td>
<td align="left">&#x00D7;86</td>
<td align="left">Compute</td>
</tr>
<tr>
<td align="left">c4.2 &#x00D7; large</td>
<td align="left">8</td>
<td align="left">15</td>
<td align="left">&#x00D7;86</td>
<td align="left">Compute</td>
</tr>
<tr>
<td align="left">r5.2 &#x00D7; large</td>
<td align="left">8</td>
<td align="left">64</td>
<td align="left">&#x00D7;86</td>
<td align="left">Memory</td>
</tr>
<tr>
<td align="left">m5.2 &#x00D7; large</td>
<td align="left">8</td>
<td align="left">32</td>
<td align="left">&#x00D7;86</td>
<td align="left">General</td>
</tr>
<tr>
<td align="left">m5a.2 &#x00D7; large</td>
<td align="left">8</td>
<td align="left">32</td>
<td align="left">AMD</td>
<td align="left">General</td>
</tr>
<tr>
<td align="left">r5a.2 &#x00D7; large</td>
<td align="left">8</td>
<td align="left">64</td>
<td align="left">AMD</td>
<td align="left">Memory</td>
</tr>
<tr>
<td align="left">t3.2 &#x00D7; large</td>
<td align="left">8</td>
<td align="left">32</td>
<td align="left">&#x00D7;86</td>
<td align="left">General</td>
</tr>
<tr>
<td align="left">t3a.2 &#x00D7; large</td>
<td align="left">8</td>
<td align="left">32</td>
<td align="left">AMD</td>
<td align="left">General</td>
</tr>
<tr>
<td align="left">r4.2 &#x00D7; large</td>
<td align="left">8</td>
<td align="left">61</td>
<td align="left">&#x00D7;86</td>
<td align="left">Memory</td>
</tr>
<tr>
<td align="left">m4.2 &#x00D7; large</td>
<td align="left">8</td>
<td align="left">32</td>
<td align="left">&#x00D7;86</td>
<td align="left">General</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="table-3"><label>Table 3</label><caption><title>Bitrate ladder (bitrate/resolution pairs). Bitrate values are in kbps</title></caption>
<table frame="hsides" >
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left">&#x0023;</th>
<th align="left">Bitrate</th>
<th align="left">Resolution</th>
<th align="left">&#x0023;</th>
<th align="left">Bitrate</th>
<th align="left">Resolution</th>
</tr>
</thead>
<tbody>
<tr>
<th align="left">1</th>
<th align="left">100</th>
<th align="left">256 &#x002A; 144</th>
<th align="left">11</th>
<th align="left">4300</th>
<th align="left">1920 &#x002A; 1080</th>
</tr>
<tr>
<th align="left">2</th>
<th align="left">200</th>
<th align="left">320 &#x002A; 180</th>
<th align="left">12</th>
<th align="left">5800</th>
<th align="left">1920 &#x002A; 1080</th>
</tr>
<tr>
<td align="left">3</td>
<td align="left">240</td>
<td align="left">384 &#x002A; 216</td>
<td align="left">13</td>
<td align="left">6500</td>
<td align="left">2560 &#x002A; 1440</td>
</tr>
<tr>
<td align="left">4</td>
<td align="left">375</td>
<td align="left">384 &#x002A; 216</td>
<td align="left">14</td>
<td align="left">7000</td>
<td align="left">2560 &#x002A; 1440</td>
</tr>
<tr>
<td align="left">5</td>
<td align="left">550</td>
<td align="left">512 &#x002A; 288</td>
<td align="left">15</td>
<td align="left">7500</td>
<td align="left">2560 &#x002A; 1440</td>
</tr>
<tr>
<td align="left">6</td>
<td align="left">750</td>
<td align="left">640 &#x002A; 360</td>
<td align="left">16</td>
<td align="left">8000</td>
<td align="left">3840 &#x002A; 2160</td>
</tr>
<tr>
<td align="left">7</td>
<td align="left">1000</td>
<td align="left">768 &#x002A; 432</td>
<td align="left">17</td>
<td align="left">12000</td>
<td align="left">3840 &#x002A; 2160</td>
</tr>
<tr>
<td align="left">8</td>
<td align="left">1500</td>
<td align="left">1024 &#x002A; 576</td>
<td align="left">18</td>
<td align="left">17000</td>
<td align="left">3840 &#x002A; 2160</td>
</tr>
<tr>
<td align="left">9</td>
<td align="left">2300</td>
<td align="left">1280 &#x002A; 720</td>
<td align="left">19</td>
<td align="left">20000</td>
<td align="left">3840 &#x002A; 2160</td>
</tr>
<tr>
<td align="left">10</td>
<td align="left">3000</td>
<td align="left">1280 &#x002A; 720</td>
<td align="center"/>
<td align="center"/>
<td align="center"/>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s3_1_3"><label>3.1.3</label><title>EC2 Spot Instance Selection Heuristic</title>
<p>Let us assume we have over one hundred different spot instances to encode segments of a single video. Further, we only want to select the top N spot instances that will minimize the cost. Our work proposes a method that selects a set of computing units, for example, 5, for optimized video encoding. The main goal of this method is to reduce the number of computing units for further analysis quickly. We calculate the price ratio <inline-formula id="ieqn-1"><mml:math id="mml-ieqn-1"><mml:mrow><mml:msub><mml:mi>&#x03B2;</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and the speed factor <inline-formula id="ieqn-2"><mml:math id="mml-ieqn-2"><mml:mrow><mml:msub><mml:mi>r</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> for each EC2 instance with respect to c5.2 &#x00D7; large base EC2 instance (see <?A3B2 "tbl5",5,"anchor"?><xref ref-type="table" rid="table-5">Tab. 5</xref>), as shown in <xref ref-type="disp-formula" rid="eqn-1">Eqs. (1)</xref> and <xref ref-type="disp-formula" rid="eqn-2">(2)</xref>, respectively.
<disp-formula id="eqn-1"><label>(1)</label><mml:math id="mml-eqn-1" display="block"><mml:mrow><mml:msub><mml:mi>&#x03B2;</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mrow><mml:msub><mml:mi>c</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mrow><mml:mrow><mml:mrow><mml:msup><mml:mi>c</mml:mi><mml:mrow><mml:mi>b</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:mrow></mml:mfrac></mml:math></disp-formula>
<disp-formula id="eqn-2"><label>(2)</label><mml:math id="mml-eqn-2" display="block"><mml:mrow><mml:msub><mml:mi>r</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mrow><mml:msup><mml:mi>e</mml:mi><mml:mrow><mml:mi>b</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:mrow><mml:mrow><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mrow></mml:mfrac></mml:math></disp-formula>
</p>
<p>We then calculate the instance availability speed ratio <inline-formula id="ieqn-3"><mml:math id="mml-ieqn-3"><mml:mrow><mml:msub><mml:mi>H</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> as shown in <xref ref-type="disp-formula" rid="eqn-3">Eq. (3)</xref>.
<disp-formula id="eqn-3"><label>(3)</label><mml:math id="mml-eqn-3" display="block"><mml:mrow><mml:msub><mml:mi>H</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo>=</mml:mo><mml:mrow><mml:msub><mml:mi>G</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo>+</mml:mo><mml:mi>&#x03B1;</mml:mi><mml:mo>&#x2217;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo>&#x2212;</mml:mo><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:math></disp-formula>
<disp-formula id="eqn-4"><label>(4)</label><mml:math id="mml-eqn-4" display="block"><mml:mrow><mml:msub><mml:mi>G</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mn>1</mml:mn><mml:mrow><mml:mrow><mml:msub><mml:mi>r</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mrow></mml:mfrac></mml:math></disp-formula>
</p>
<p><xref ref-type="disp-formula" rid="eqn-3">Eq. (3)</xref> reflects the adequate speed information of the EC2 spot instance <italic>i</italic> by analyzing its actual speed against the availability probability <inline-formula id="ieqn-4"><mml:math id="mml-ieqn-4"><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. &#x03B1; is an adjusted weighting coefficient. We use the availability and pricing information of EC2 spot instances in our proposed FSpot model from the Amazon website [<xref ref-type="bibr" rid="ref-46">46</xref>,<xref ref-type="bibr" rid="ref-47">47</xref>]. Instead of the availability metric, Amazon uses the term <italic>frequency of interruption</italic>. For example, if the frequency of interruption is&#x2009;&#x003C;5&#x0025;, it means that the spot instance interruption of Amazon services based on historical information of the last three months before being terminated intentionally by a client is less than 5&#x0025;. The <inline-formula id="ieqn-5"><mml:math id="mml-ieqn-5"><mml:mrow><mml:msub><mml:mi>G</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> parameter in <xref ref-type="disp-formula" rid="eqn-3">Eq. (3)</xref> is a relative time to encode a single video on EC2 spot instance <italic>i</italic> and is calculated by <xref ref-type="disp-formula" rid="eqn-4">Eq. (4)</xref>. The availability probability <inline-formula id="ieqn-6"><mml:math id="mml-ieqn-6"><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> of EC2 spot instance <italic>i</italic> is Amazon frequency of interruption between 0 to 1. <?A3B2 "tbl4",5,"anchor"?><xref ref-type="table" rid="table-4">Tab. 4</xref> shows the availability probability calculation from the amazon frequency of interruption converted to percentage. Further, in our proposed work, we use <italic>H</italic><sub>i</sub> and &#x003B2;<sub>i</sub> to select a set of computing units for optimized video encoding</p><table-wrap id="table-4"><label>Table 4</label><caption><title>The amazon frequency of interruption converted to percentage</title></caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left">EC2 spot instance</th>
<th align="left">Frequency of interruption</th>
<th align="left">Availability probability <inline-formula id="ieqn-44"><mml:math id="mml-ieqn-44"><mml:msub><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula></th>
</tr>
</thead>
<tbody>
<tr>
<th align="left">c5.2 &#x00D7; large (base)</th>
<th align="left">&#x003C;5&#x0025;</th>
<th align="left">0.955</th>
</tr>
<tr>
<td align="left">r5.2 &#x00D7; large</td>
<td align="left">5&#x0025;&#x2013;10&#x0025;</td>
<td align="left">0.925</td>
</tr>
<tr>
<td align="left">c5a.2 &#x00D7; large</td>
<td align="left">15&#x0025;&#x2013;20&#x0025;</td>
<td align="left">0.825</td>
</tr>
<tr>
<td align="left">r5a.2 &#x00D7; large</td>
<td align="left">&#x003E;20&#x0025;</td>
<td align="left">0.800</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
</sec>
<sec id="s3_2"><label>3.2</label><title>Fast Encoding Time Estimation</title>
<p>We use a sample video file segment to calculate the encoding speed for the different Amazon EC2 instances. First, the system encodes a middle segment of a video sequence at the base node-the master node or the fastest available EC2 instance for a few seconds with selected encoding parameters. It then uses obtained encoding time data <inline-formula id="ieqn-7"><mml:math id="mml-ieqn-7"><mml:msubsup><mml:mi>t</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mo>&#x2217;</mml:mo></mml:msubsup></mml:math></inline-formula> for the middle segment and instance availability speed ratio <inline-formula id="ieqn-8"><mml:math id="mml-ieqn-8"><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mi>H</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> to estimate the encoding speed <inline-formula id="ieqn-9"><mml:math id="mml-ieqn-9"><mml:msubsup><mml:mi>v</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mspace width="thickmathspace" /><mml:mi>e</mml:mi><mml:mi>n</mml:mi><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> (in segments/sec) for different EC2 spot instances and video segments as shown in <xref ref-type="disp-formula" rid="eqn-5">Eq. (5)</xref>.
<disp-formula id="eqn-5"><label>(5)</label><mml:math id="mml-eqn-5" display="block"><mml:msubsup><mml:mi>v</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mi>e</mml:mi><mml:mi>n</mml:mi><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mfrac><mml:mn>1</mml:mn><mml:mrow><mml:mrow><mml:msub><mml:mi>H</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo>&#x2217;</mml:mo><mml:msubsup><mml:mi>t</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mo>&#x2217;</mml:mo></mml:msubsup></mml:mrow></mml:mfrac></mml:math></disp-formula>
</p>
<p>We assume that the encoding time of all segments of the same video sequence has similar values. Recent research [<xref ref-type="bibr" rid="ref-20">20</xref>] shows that the encoding times of segments of the same video file with the same encoding parameters have similar values and do not exceed one second for the &#x00D7;264 video codec. Our approach uses a quick estimate of the encoding speed for each new video and a new set of encoding parameters.</p>
<p>From our dataset, we extracted &#x00D7;264 codec encoding times for the base EC2 instance (c5.2 &#x00D7; large) for middle segments and all unique combinations of encoding parameters for each video sequence. We then used the instance availability speed ratio <inline-formula id="ieqn-10"><mml:math id="mml-ieqn-10"><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:msub><mml:mi>H</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> to estimate the encoding speed for video segments on different EC2 spot instances. We only used the information about the encoding time of the middle segment on the base c5.2 &#x00D7; large EC2 instance. We can use our approach to make predictions for different video codecs, for example, for &#x00D7;265. To do this, we need to automatically benchmark EC2 instances for the &#x00D7;265 video codec and then use the results for the calculations. The output of this implementation phase is an array of estimated encoding speeds <inline-formula id="ieqn-11"><mml:math id="mml-ieqn-11"><mml:msubsup><mml:mi>v</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mspace width="thickmathspace" /><mml:mi>e</mml:mi><mml:mi>n</mml:mi><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> for different video segments <italic>j</italic> and EC2 spot instances <italic>i</italic>.</p>
</sec>
<sec id="s3_3"><label>3.3</label><title>EC2 Instance Selection Using Pareto Fronts and Clustering</title>
<p>We used our dataset to calculate <inline-formula id="ieqn-12"><mml:math id="mml-ieqn-12"><mml:mrow><mml:msub><mml:mi>H</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> for all eleven EC2 spot instances and then calculated their <inline-formula id="ieqn-13"><mml:math id="mml-ieqn-13"><mml:mrow><mml:msub><mml:mi>&#x03B2;</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> using the pricing information retrieved from Amazon [<xref ref-type="bibr" rid="ref-46">46</xref>,<xref ref-type="bibr" rid="ref-47">47</xref>]. <?A3B2 "tbl5",5,"anchor"?><xref ref-type="table" rid="table-5">Tab. 5</xref> presents an example of different calculated parameters for all selected EC2 spot instances for the Amazon <italic>Europe</italic> (<italic>Frankfurt</italic>) region and <italic>eu-central-1b</italic> availability zone. Then, we applied Pareto fronts and a clustering approach to finding five EC2 spot instances for optimized video encoding in the cloud. The selected EC2 spot instances used to minimize the encoding costs are t3a.2 &#x00D7; large, t3.2 &#x00D7; large, c4.2 &#x00D7; large, c5a.2 &#x00D7; large, c5.2 &#x00D7; large. Please note that pricing information on the Amazon website changes in real-time, so in the entire encoding system, our proposed model will ask for new EC2 Spot prices every minute and recalculate the selected EC2 spot instance set.</p>
<table-wrap id="table-5"><label>Table 5</label><caption><title>Example of calculated parameters for different amazon EC2 spot instances</title></caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left">EC2 instance name</th>
<th align="left">Encoding time <inline-formula id="ieqn-45"><mml:math id="mml-ieqn-45"><mml:msub><mml:mrow><mml:mi>e</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula></th>
<th align="left">Speed factor <inline-formula id="ieqn-46"><mml:math id="mml-ieqn-46"><mml:msub><mml:mrow><mml:mi>r</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula></th>
<th align="left">Relative time <inline-formula id="ieqn-47"><mml:math id="mml-ieqn-47"><mml:msub><mml:mrow><mml:mi>G</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula></th>
<th align="left">Frequency of<break/> interruption</th>
<th align="left">Availability<break/> probability <italic>p</italic><sub>i</sub></th>
<th align="left">EC2<break/> price <inline-formula id="ieqn-48"><mml:math id="mml-ieqn-48"><mml:msub><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula></th>
<th align="left">EC2 price ratio <break/><inline-formula id="ieqn-49"><mml:math id="mml-ieqn-49"><mml:msub><mml:mrow><mml:mi>&#x03B2;</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula></th>
<th align="left">EC2 availability speed ratio <inline-formula id="ieqn-50"><mml:math id="mml-ieqn-50"><mml:msub><mml:mrow><mml:mi>H</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula></th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">c5a.2 &#x00D7; large</td>
<td align="left">4.3648</td>
<td align="left">1.220</td>
<td align="left">0.820</td>
<td align="left">15&#x0025;&#x2013;20&#x0025;</td>
<td align="left">0.825</td>
<td align="left">0.1345</td>
<td align="left">0.990</td>
<td align="left">0.821</td>
</tr>
<tr>
<td align="left">c5.2 &#x00D7;<break/> large <break/>(base)</td>
<td align="left">5.3431 (<italic>e</italic><sup><italic>base</italic></sup>)</td>
<td align="left">1.000</td>
<td align="left">1.000</td>
<td align="left">&#x003C;5&#x0025;</td>
<td align="left">0.955</td>
<td align="left">0.1358 (<italic>c</italic><sup><italic>base</italic></sup>)</td>
<td align="left">1.000</td>
<td align="left">1.000</td>
</tr>
<tr>
<td align="left">c4.2 &#x00D7;<break/> large</td>
<td align="left">5.9900</td>
<td align="left">0.892</td>
<td align="left">1.121</td>
<td align="left">&#x003C;5&#x0025;</td>
<td align="left">0.955</td>
<td align="left">0.1422</td>
<td align="left">1.047</td>
<td align="left">1.122</td>
</tr>
<tr>
<td align="left">r5.2 &#x00D7;<break/> large</td>
<td align="left">6.0300</td>
<td align="left">0.886</td>
<td align="left">1.129</td>
<td align="left">5&#x0025;&#x2013;10&#x0025;</td>
<td align="left">0.925</td>
<td align="left">0.1508</td>
<td align="left">1.110</td>
<td align="left">1.129</td>
</tr>
<tr>
<td align="left">m5.2 &#x00D7;<break/> large</td>
<td align="left">6.0400</td>
<td align="left">0.885</td>
<td align="left">1.130</td>
<td align="left">&#x003C;5&#x0025;</td>
<td align="left">0.955</td>
<td align="left">0.1435</td>
<td align="left">1.057</td>
<td align="left">1.130</td>
</tr>
<tr>
<td align="left">m5a.2 &#x00D7; <break/>large</td>
<td align="left">6.3600</td>
<td align="left">0.840</td>
<td align="left">1.191</td>
<td align="left">&#x003C;5&#x0025;</td>
<td align="left">0.955</td>
<td align="left">0.1902</td>
<td align="left">1.401</td>
<td align="left">1.191</td>
</tr>
<tr>
<td align="left">r5a.2 &#x00D7; <break/>large</td>
<td align="left">6.3700</td>
<td align="left">0.839</td>
<td align="left">1.192</td>
<td align="left">&#x003E;20&#x0025;</td>
<td align="left">0.800</td>
<td align="left">0.1981</td>
<td align="left">1.459</td>
<td align="left">1.194</td>
</tr>
<tr>
<td align="left">t3.2 &#x00D7; <break/>large</td>
<td align="left">6.4400</td>
<td align="left">0.829</td>
<td align="left">1.206</td>
<td align="left">&#x003C;5&#x0025;</td>
<td align="left">0.955</td>
<td align="left">0.1152</td>
<td align="left">0.848</td>
<td align="left">1.207</td>
</tr>
<tr>
<td align="left">t3a.2 &#x00D7; <break/>large</td>
<td align="left">6.7400</td>
<td align="left">0.793</td>
<td align="left">1.261</td>
<td align="left">&#x003C;5&#x0025;</td>
<td align="left">0.955</td>
<td align="left">0.1037</td>
<td align="left">0.764</td>
<td align="left">1.261</td>
</tr>
<tr>
<td align="left">r4.2 &#x00D7; <break/>large</td>
<td align="left">7.0600</td>
<td align="left">0.757</td>
<td align="left">1.320</td>
<td align="left">&#x003C;5&#x0025;</td>
<td align="left">0.955</td>
<td align="left">0.1523</td>
<td align="left">1.122</td>
<td align="left">1.321</td>
</tr>
<tr>
<td align="left">m4.2 &#x00D7; large</td>
<td align="left">7.0600</td>
<td align="left">0.757</td>
<td align="left">1.322</td>
<td align="left">&#x003C;5&#x0025;</td>
<td align="left">0.955</td>
<td align="left">0.1596</td>
<td align="left">1.175</td>
<td align="left">1.322</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>For each EC2 spot instance, we calculate the (i) instance availability speed ratio <inline-formula id="ieqn-14"><mml:math id="mml-ieqn-14"><mml:mrow><mml:msub><mml:mi>H</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and (ii) price ratio <inline-formula id="ieqn-15"><mml:math id="mml-ieqn-15"><mml:mrow><mml:msub><mml:mi>&#x03B2;</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and use them as input parameters for our Pareto-fronts and clustering model. We calculate different Pareto fronts between <inline-formula id="ieqn-16"><mml:math id="mml-ieqn-16"><mml:mrow><mml:msub><mml:mi>H</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula id="ieqn-17"><mml:math id="mml-ieqn-17"><mml:mrow><mml:msub><mml:mi>&#x03B2;</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> for all selected EC2 spot instances and rank each front in ascending order (see <?A3B2 "fig2",5,"anchor"?><xref ref-type="fig" rid="fig-2">Fig. 2</xref>).</p>
<p>We then apply K-means clustering on Pareto fronts points to form K clusters (see <xref ref-type="fig" rid="fig-2">Fig. 2</xref>) such that the centroid of each cluster.
<disp-formula id="eqn-6"><label>(6)</label><mml:math id="mml-eqn-6" display="block"><mml:mi>K</mml:mi><mml:mo>=</mml:mo><mml:mrow><mml:mi mathvariant="normal">m</mml:mi><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">n</mml:mi></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>q</mml:mi><mml:mi>u</mml:mi><mml:mi>o</mml:mi><mml:mi>t</mml:mi><mml:mi>i</mml:mi><mml:mi>e</mml:mi><mml:mi>n</mml:mi><mml:mi>t</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mfrac><mml:mi>n</mml:mi><mml:mn>2</mml:mn></mml:mfrac></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula>where <italic>x</italic> is the number of Pareto fronts and <italic>n</italic> is the total number of EC2 spot instances. For example, if the number of EC2 spot instances is ten, clusters will be four. Our algorithm first selects EC2 spot instances belonging to the first Pareto front to find a set of optimized EC2 spot instances. Depending on the optimization problem (minimizing encoding time or cost of encoding), the algorithm selects points from the bottom or the top of the first Pareto front. If all EC2 spot instances of the same type in one Pareto front are already in use, the proposed algorithm selects other EC2 instances belonging to the same cluster and same front. If no EC2 spot instance from the same front and the same cluster is available, the proposed algorithm searches different EC2 instances within the same cluster but from another front. If all EC2 spot instances of one cluster are already in use, it requests the remaining EC2 spot instances from the first front, which belong to different cluster(s). If all EC2 spot instances of the first Pareto front are already in use, the algorithm will move to the second Pareto front and so on. We proposed Algorithm 1 to find a set of appropriate EC2 spot instances. This phase results in a set of preselected EC2 spot instances for optimized video encoding in the cloud.</p>
<fig id="fig-2"><label>Figure 2</label><caption><title>EC2 spot instance selection by using Pareto fronts and clusters</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMC_23630-fig-2.png"/></fig>
</sec>
<sec id="s3_5"><label>3.5</label><title>Calculating Priorities and Numbers for EC2 Spot Instances</title>
<p>This phase only uses EC2 spot instances that belong to the set selected by Algorithm 1. First of all, we represent the constraints. We consider the disk speed <inline-formula id="ieqn-18"><mml:math id="mml-ieqn-18"><mml:mrow><mml:msup><mml:mi>d</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>y</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> and the network speed <inline-formula id="ieqn-19"><mml:math id="mml-ieqn-19"><mml:mrow><mml:msup><mml:mi>k</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>y</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> from the master node to a cluster of EC2 spot instances as two main parameters influencing segments&#x2019; distribution time. In actual encoding infrastructure, the open-source tool IPerf can be used to measure the network speed <inline-formula id="ieqn-20"><mml:math id="mml-ieqn-20"><mml:mrow><mml:msup><mml:mi>k</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>y</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>. The transmission speed of video segments <inline-formula id="ieqn-21"><mml:math id="mml-ieqn-21"><mml:mrow><mml:msup><mml:mi>w</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>y</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> is the minimum value between <inline-formula id="ieqn-22"><mml:math id="mml-ieqn-22"><mml:mrow><mml:msup><mml:mi>d</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>y</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> and <inline-formula id="ieqn-23"><mml:math id="mml-ieqn-23"><mml:mrow><mml:msup><mml:mi>k</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>y</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>, as shown in <xref ref-type="disp-formula" rid="eqn-7">Eq. (7)</xref>.
<disp-formula id="eqn-7"><label>(7)</label><mml:math id="mml-eqn-7" display="block"><mml:mrow><mml:msup><mml:mi>w</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>y</mml:mi></mml:mrow></mml:msup></mml:mrow><mml:mo>=</mml:mo><mml:mrow><mml:mi mathvariant="normal">m</mml:mi><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">n</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mrow><mml:msup><mml:mi>d</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>y</mml:mi></mml:mrow></mml:msup></mml:mrow><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:msup><mml:mi>k</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>y</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:math></disp-formula>
</p>
<fig id="fig-7">
<graphic mimetype="image" mime-subtype="png" xlink:href="CMC_23630-fig-7.png"/>
</fig>
<p><xref ref-type="disp-formula" rid="eqn-8">Eq. (8)</xref> calculates the minimum time to copy all segments of one video <inline-formula id="ieqn-24"><mml:math id="mml-ieqn-24"><mml:mrow><mml:msubsup><mml:mi>T</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>y</mml:mi><mml:mspace width="thickmathspace" /><mml:mi>a</mml:mi><mml:mi>l</mml:mi><mml:mi>l</mml:mi></mml:mrow></mml:msubsup></mml:mrow></mml:math></inline-formula> to multiple EC2 spot instances, where <italic>l</italic> is the number of segments for encoding and <italic>s</italic> is the average segment size. In turn, <xref ref-type="disp-formula" rid="eqn-9">Eq. (9)</xref> calculates the minimum time to encode all segments of a video on <inline-formula id="ieqn-25"><mml:math id="mml-ieqn-25"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> EC2 spot instances, where <inline-formula id="ieqn-26"><mml:math id="mml-ieqn-26"><mml:msubsup><mml:mi>v</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mi>e</mml:mi><mml:mi>n</mml:mi><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> is the estimated encoding speed (in segments/sec) of EC2 Spot instance type <italic>i</italic>.
<disp-formula id="eqn-8"><label>(8)</label><mml:math id="mml-eqn-8" display="block"><mml:msubsup><mml:mi>T</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>y</mml:mi><mml:mspace width="thickmathspace" /><mml:mi>a</mml:mi><mml:mi>l</mml:mi><mml:mi>l</mml:mi></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>l</mml:mi><mml:mo>&#x2217;</mml:mo><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:msup><mml:mi>w</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>y</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:mrow></mml:mfrac></mml:math></disp-formula>
<disp-formula id="eqn-9"><label>(9)</label><mml:math id="mml-eqn-9" display="block"><mml:msubsup><mml:mi>T</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>e</mml:mi><mml:mi>n</mml:mi><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mspace width="thickmathspace" /><mml:mi>a</mml:mi><mml:mi>l</mml:mi><mml:mi>l</mml:mi></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mfrac><mml:mi>l</mml:mi><mml:mrow><mml:msubsup><mml:mi>v</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mi>e</mml:mi><mml:mi>n</mml:mi><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:msubsup><mml:mo>&#x2217;</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mrow></mml:mfrac></mml:math></disp-formula>
</p>
<p>For continuous encoding of video segments on EC2 spot instances of type <italic>i</italic>, the following constraint must be met:
<disp-formula id="eqn-10"><label>(10)</label><mml:math id="mml-eqn-10" display="block"><mml:msubsup><mml:mi>T</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>y</mml:mi><mml:mspace width="thickmathspace" /><mml:mi>a</mml:mi><mml:mi>l</mml:mi><mml:mi>l</mml:mi><mml:mspace width="thickmathspace" /></mml:mrow></mml:msubsup><mml:mo>&#x003C;</mml:mo><mml:mspace width="thickmathspace" /><mml:msubsup><mml:mi>T</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>e</mml:mi><mml:mi>n</mml:mi><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mspace width="thickmathspace" /><mml:mi>a</mml:mi><mml:mi>l</mml:mi><mml:mi>l</mml:mi></mml:mrow></mml:msubsup></mml:math></disp-formula>
</p>
<p>Then the number <inline-formula id="ieqn-27"><mml:math id="mml-ieqn-27"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> of EC2 spot instances to use can be represented as inequality 11. Also, <inline-formula id="ieqn-28"><mml:math id="mml-ieqn-28"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> must be less than or equal to the number of <italic>l</italic> segments to encode and the maximum number <inline-formula id="ieqn-29"><mml:math id="mml-ieqn-29"><mml:mrow><mml:msup><mml:mi>z</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> of EC2 spot instances that the system can request simultaneously (See 11). The value of <inline-formula id="ieqn-30"><mml:math id="mml-ieqn-30"><mml:mrow><mml:msup><mml:mi>z</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> can be defined by the encoding infrastructure administrator or be a maximum number of EC2 instances of the specific type available in the cloud.
<disp-formula id="eqn-11"><label>(11)</label><mml:math id="mml-eqn-11" display="block"><mml:mrow><mml:mo>{</mml:mo><mml:mtable columnalign="left" rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:mrow><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo>&lt;</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mfrac><mml:mrow><mml:mrow><mml:msup><mml:mi>w</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>y</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:mrow><mml:mrow><mml:msubsup><mml:mi>v</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mi>e</mml:mi><mml:mi>n</mml:mi><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:msubsup><mml:mo>.</mml:mo><mml:mspace width="thickmathspace" /><mml:mi>s</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mrow><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo>&#x2264;</mml:mo><mml:mi>l</mml:mi><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mrow><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo>&#x2264;</mml:mo><mml:mrow><mml:msup><mml:mi>z</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:msup></mml:mrow><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /></mml:mrow></mml:mtd></mml:mtr></mml:mtable><mml:mo fence="true" stretchy="true" symmetric="true"></mml:mo></mml:mrow></mml:math></disp-formula>
</p>
<p>By satisfying defined constraints for <inline-formula id="ieqn-31"><mml:math id="mml-ieqn-31"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, we calculate the maximum possible value of <inline-formula id="ieqn-32"><mml:math id="mml-ieqn-32"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> for each EC2 spot insblence <italic>i</italic>. The next step is to prioritize EC2 spot instances. To do this, we calculate the predicted encoding time <inline-formula id="ieqn-33"><mml:math id="mml-ieqn-33"><mml:msubsup><mml:mi>T</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> as shown in <xref ref-type="disp-formula" rid="eqn-12">Eq. (12)</xref> for all segments <italic>l</italic> of a video file for different EC2 spot instances <italic>i</italic>. Next, the model uses the predicted encoding time to compute the predicted encoding cost <inline-formula id="ieqn-34"><mml:math id="mml-ieqn-34"><mml:msubsup><mml:mi>V</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> of a video for each type <italic>i</italic> of EC2 instance, as shown in <xref ref-type="disp-formula" rid="eqn-13">Eq. (13)</xref>.
<disp-formula id="eqn-12"><label>(12)</label><mml:math id="mml-eqn-12" display="block"><mml:msubsup><mml:mi>T</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mfrac><mml:mi>l</mml:mi><mml:mrow><mml:msubsup><mml:mi>v</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mi>e</mml:mi><mml:mi>n</mml:mi><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>d</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:msubsup><mml:mspace width="thickmathspace" /><mml:mo>.</mml:mo><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mrow></mml:mfrac></mml:math></disp-formula>
<disp-formula id="eqn-13"><label>(13)</label><mml:math id="mml-eqn-13" display="block"><mml:msubsup><mml:mi>V</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:msubsup><mml:mi>T</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi></mml:mrow></mml:msubsup><mml:mo>.</mml:mo><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo>.</mml:mo><mml:mspace width="thickmathspace" /><mml:mspace width="thickmathspace" /><mml:mrow><mml:msub><mml:mi>c</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></disp-formula>
</p>
<p>We sort the predicted encoding cost for all EC2 Spot instances in ascending order. The EC2 spot instance type with the lowest predicted video encoding cost has the highest priority and vise versa.</p>
<p>We calculated the priorities and optimized the number of EC2 spot instances of each type (<inline-formula id="ieqn-35"><mml:math id="mml-ieqn-35"><mml:mi>i</mml:mi></mml:math></inline-formula>) required for encoding different video sequences (see <xref ref-type="table" rid="table-1">Tab. 1</xref>). First, using defined constraints, the model finds the maximum possible number of EC2 spot instances <inline-formula id="ieqn-36"><mml:math id="mml-ieqn-36"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> to use. Then the model uses the calculated number of EC2 spot instances <inline-formula id="ieqn-37"><mml:math id="mml-ieqn-37"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, EC2 spot instance price <inline-formula id="ieqn-38"><mml:math id="mml-ieqn-38"><mml:mrow><mml:msub><mml:mi>c</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and the predicted encoding time <inline-formula id="ieqn-39"><mml:math id="mml-ieqn-39"><mml:mrow><mml:msubsup><mml:mi>T</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi></mml:mrow></mml:msubsup></mml:mrow></mml:math></inline-formula> to calculate the predicted encoding cost <inline-formula id="ieqn-40"><mml:math id="mml-ieqn-40"><mml:mrow><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi></mml:mrow></mml:msubsup></mml:mrow></mml:math></inline-formula> of a video for different EC2 spot instances. We sorted the predicted encoding cost for all EC2 spot instances in ascending order in a manner that the EC2 spot instance <italic>i</italic> with the lowest predicted video encoding cost has the highest priority and vise versa. <?A3B2 "tbl6",5,"anchor"?><xref ref-type="table" rid="table-6">Tab. 6</xref> shows the predicted video encoding cost for TOS video and different Amazon EC2 spot instances. We used 285 encoding tasks (<italic>15 video segments &#x002A; 19 bitrates</italic>) and assumed that a video segment should be delivered to an EC2 spot instance again for each encoding operation. As we can see from <xref ref-type="table" rid="table-6">Tab. 6</xref>, the proposed model recommends using eight <italic>c5a.2</italic> &#x00D7; <italic>large</italic> EC2 spot instances to minimize the encoding cost of the TOS video sequence, which results in a cost of &#x0024; 0.04.</p>
<table-wrap id="table-6"><label>Table 6</label><caption><title>Predicted video encoding costs for TOS video sequence <italic>Eu-central-1b</italic> availability zone</title></caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left">EC2 spot<break/>instance <inline-formula id="ieqn-51"><mml:math id="mml-ieqn-51"><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:math></inline-formula></th>
<th align="left">Number of EC2<break/>spot instances (<inline-formula id="ieqn-52"><mml:math id="mml-ieqn-52"><mml:msub><mml:mrow><mml:mi>z</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula>)</th>
<th align="left">Predicted encoding<break/>cost (<inline-formula id="ieqn-53"><mml:math id="mml-ieqn-53"><mml:msubsup><mml:mrow><mml:mi>V</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi></mml:mrow></mml:mrow></mml:msubsup></mml:math></inline-formula>) in &#x0024;</th>
</tr>
</thead>
<tbody>
<tr>
<th align="left">c5a.2 &#x00D7; large</th>
<th align="left">8</th>
<th align="left">0.040</th>
</tr>
<tr>
<td align="left">t3a.2 &#x00D7; large</td>
<td align="left">13</td>
<td align="left">0.049</td>
</tr>
<tr>
<td align="left">t3.2 &#x00D7; large</td>
<td align="left">12</td>
<td align="left">0.050</td>
</tr>
<tr>
<td align="left">c5.2 &#x00D7; large (base)</td>
<td align="left">10</td>
<td align="left">0.052</td>
</tr>
<tr>
<td align="left">c4.2 &#x00D7; large</td>
<td align="left">12</td>
<td align="left">0.053</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
</sec>
<sec id="s4"><label>4</label><title>Results and Analysis</title>
<p>This Section presents the proposed <italic>FSpot</italic> approach results to analyze the performance and examine its advantages for utilizing Amazon EC2 spot instances better. We compare the predicted encoding time and cost with the actual encoding time available in the dataset. We calculate the actual encoding time <inline-formula id="ieqn-41"><mml:math id="mml-ieqn-41"><mml:msubsup><mml:mi>T</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>a</mml:mi><mml:mi>c</mml:mi><mml:mi>t</mml:mi><mml:mi>u</mml:mi><mml:mi>a</mml:mi><mml:mi>l</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> of a video for each EC2 spot instance using the same number of EC2 spot instances <inline-formula id="ieqn-42"><mml:math id="mml-ieqn-42"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> predicted by the model. We calculate the actual encoding cost using <xref ref-type="disp-formula" rid="eqn-14">Eq. (14)</xref> and compare it with the predicted encoding cost <inline-formula id="ieqn-43"><mml:math id="mml-ieqn-43"><mml:msubsup><mml:mi>V</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>d</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula>.
<disp-formula id="eqn-14"><label>(14)</label><mml:math id="mml-eqn-14" display="block"><mml:msubsup><mml:mi>V</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>a</mml:mi><mml:mi>c</mml:mi><mml:mi>t</mml:mi><mml:mi>u</mml:mi><mml:mi>a</mml:mi><mml:mi>l</mml:mi></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:msubsup><mml:mi>T</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>a</mml:mi><mml:mi>c</mml:mi><mml:mi>t</mml:mi><mml:mi>u</mml:mi><mml:mi>a</mml:mi><mml:mi>l</mml:mi></mml:mrow></mml:msubsup><mml:mspace width="thickmathspace" /><mml:mo>.</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mspace width="thickmathspace" /><mml:mo>.</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:msub><mml:mi>c</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></disp-formula>
</p>
<p>Finally, we check how the predicted encoding times and costs are correlated with actual values. The predicted priorities for the EC2 spot instance have to be correct for the actual and predicted values.</p>
<p><?A3B2 "tbl7",5,"anchor"?><xref ref-type="table" rid="table-7">Tab. 7</xref> shows various parameters and their defined test values to evaluate our proposed FSpot model performance. We used the encoding times and prices for Amazon EC2 spot instances from our dataset. <?A3B2 "tbl8",5,"anchor"?><xref ref-type="table" rid="table-8">Tab. 8</xref> shows the selected EC2 spot instances marked as &#x2018;&#x002B;&#x2019; and their count calculated by the proposed FSpot model for Sintel video sequences and three availability zones <italic>eu-central-(1a&#x007C;1b&#x007C;1c)</italic> of AWS <italic>Frankfurt</italic> region. We see that the <italic>1a</italic> and <italic>1b</italic> zones have eleven, while the <italic>1c</italic> zone has only nine different Amazon EC2 spot instances. It occurs due to the dynamic availability of EC2 spot instances and dependency on the selected zone. The last column of <xref ref-type="table" rid="table-8">Tab. 8</xref> shows that the calculated numbers for the same EC2 spot instance and different availability zones have the same values. This is because the calculated numbers for EC2 spot instances primarily depend on the encoding speed and availability probability of EC2 spot instances, which remain unchanged for the same EC2 spot instance and Amazon region.</p>
<table-wrap id="table-7"><label>Table 7</label><caption><title>Test input parameters for Sintel video sequence</title></caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left">Parameter name</th>
<th align="left">Parameter value</th>
</tr>
</thead>
<tbody>
<tr>
<th align="left">Middle segment size (in MB), <inline-formula id="ieqn-54"><mml:math id="mml-ieqn-54"><mml:mi>s</mml:mi></mml:math></inline-formula></th>
<th align="left">80</th>
</tr>
<tr>
<td align="left">Maximum number of EC2 spot instances <inline-formula id="ieqn-55"><mml:math id="mml-ieqn-55"><mml:mrow><mml:msup><mml:mi>z</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula></td>
<td align="left">70</td>
</tr>
<tr>
<td align="left">Disk speed of master node (in MB/sec), <inline-formula id="ieqn-56"><mml:math id="mml-ieqn-56"><mml:mrow><mml:msup><mml:mi>d</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>y</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula></td>
<td align="left">180</td>
</tr>
<tr>
<td align="left">Network speed (in MB/sec), <inline-formula id="ieqn-57"><mml:math id="mml-ieqn-57"><mml:mrow><mml:msup><mml:mi>k</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>y</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula></td>
<td align="left">220</td>
</tr>
<tr>
<td align="left">Number of segments to encode, <inline-formula id="ieqn-58"><mml:math id="mml-ieqn-58"><mml:mi>l</mml:mi></mml:math></inline-formula></td>
<td align="left">15</td>
</tr>
<tr>
<td align="left">Number of encoding bitrates, <inline-formula id="ieqn-59"><mml:math id="mml-ieqn-59"><mml:mi>h</mml:mi></mml:math></inline-formula></td>
<td align="left">19</td>
</tr>
<tr>
<td align="left">Number of transcoding tasks, <inline-formula id="ieqn-60"><mml:math id="mml-ieqn-60"><mml:mi>r</mml:mi><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mo>&#x2217;</mml:mo><mml:mi>l</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula></td>
<td align="left">285</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="table-8"><label>Table 8</label><caption><title>Predicted numbers for EC2 spot instances. Sintel video sequence</title></caption>
<table frame="hsides" >
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left">EC2 spot instance <inline-formula id="ieqn-61"><mml:math id="mml-ieqn-61"><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:math></inline-formula></th>
<th align="left">Zone <inline-formula id="ieqn-62"><mml:math id="mml-ieqn-62"><mml:mn>1</mml:mn><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:math></inline-formula></th>
<th align="left">Zone <inline-formula id="ieqn-63"><mml:math id="mml-ieqn-63"><mml:mn>1</mml:mn><mml:mrow><mml:mi>b</mml:mi></mml:mrow></mml:math></inline-formula></th>
<th align="left">Zone <inline-formula id="ieqn-64"><mml:math id="mml-ieqn-64"><mml:mn>1</mml:mn><mml:mrow><mml:mi>c</mml:mi></mml:mrow></mml:math></inline-formula></th>
<th align="left">Number of instances</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">c5a</td>
<td align="left">&#x002B;</td>
<td align="left">&#x002B;</td>
<td align="left">&#x002B;</td>
<td align="left">9</td>
</tr>
<tr>
<td align="left">t3a</td>
<td align="left">&#x002B;</td>
<td align="left">&#x002B;</td>
<td align="left">&#x002B;</td>
<td align="left">14</td>
</tr>
<tr>
<td align="left">t3</td>
<td align="left">&#x002B;</td>
<td align="left">&#x002B;</td>
<td align="left">n/a</td>
<td align="left">13</td>
</tr>
<tr>
<td align="left">c5</td>
<td align="left">&#x002B;</td>
<td align="left">&#x002B;</td>
<td align="left">&#x002B;</td>
<td align="left">11</td>
</tr>
<tr>
<td align="left">c4</td>
<td align="left">&#x002B;</td>
<td align="left">&#x002B;</td>
<td align="left">&#x002B;</td>
<td align="left">12</td>
</tr>
<tr>
<td align="left">m5</td>
<td align="left">-</td>
<td align="left">-</td>
<td align="left">-</td>
<td align="left">12</td>
</tr>
<tr>
<td align="left">r5</td>
<td align="left">-</td>
<td align="left">-</td>
<td align="left">-</td>
<td align="left">12</td>
</tr>
<tr>
<td align="left">r4</td>
<td align="left">-</td>
<td align="left">-</td>
<td align="left">&#x002B;</td>
<td align="left">14</td>
</tr>
<tr>
<td align="left">m4</td>
<td align="left">-</td>
<td align="left">-</td>
<td align="left">n/a</td>
<td align="left">14</td>
</tr>
<tr>
<td align="left">m5a</td>
<td align="left">-</td>
<td align="left">-</td>
<td align="left">-</td>
<td align="left">13</td>
</tr>
<tr>
<td align="left">r5a</td>
<td align="left">-</td>
<td align="left">-</td>
<td align="left">-</td>
<td align="left">13</td>
</tr>
</tbody>
</table>
</table-wrap>
<p><?A3B2 "fig3",5,"anchor"?><xref ref-type="fig" rid="fig-3">Fig. 3</xref> depicts the estimated numbers of different EC2 spot instances located in <italic>the eu-central-1b</italic> availability zone. It clearly shows that the number of EC2 spot instances for the Sintel video sequence varies from nine to fourteen. The proposed FSpot model calculates a minimum of nine EC2 spot instances for c5a.2 &#x00D7; large type and a maximum of fourteen EC2 spot instances for t3a.2 &#x00D7; large, m4.2 &#x00D7; large and r4.2 &#x00D7; large instance types. <?A3B2 "fig4",5,"anchor"?><xref ref-type="fig" rid="fig-4">Fig. 4</xref> shows the predicted and actual encoding time for Sintel video on different EC2 spot instances of <italic>the eu-central-1b</italic> availability zone. The predicted encoding time for all EC2 spot instances is slightly higher than the actual encoding time extracted from the dataset. There is a slight difference of less than 4&#x0025; between the predicted and actual encoding times. It occurred because we used only one middle segment encoding information of the video sequence and replicated it to the rest of the segments to estimate the encoding time.</p>
<fig id="fig-3"><label>Figure 3</label><caption><title>The calculated number of EC2 spot instances for the sintel video sequence</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMC_23630-fig-3.png"/></fig>
<fig id="fig-4"><label>Figure 4</label><caption><title>Predicted and actual encoding time for different EC2 spot instances for the sintel video sequence</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMC_23630-fig-4.png"/></fig>
<p><?A3B2 "tbl9",5,"anchor"?><xref ref-type="table" rid="table-9">Tab. 9</xref> presents the predicted and actual encoding time results for three video sequences (BBB, Sintel, TOS) on five different EC2 spot instances. We can see that for Sintel and TOS videos, the difference between the average predicted and actual values for all five EC2 spot instances is relatively small, 3 and 4 s, respectively. However, for the BBB video sequence, the difference reaches 24 s. This is because the actual encoding time of the middle segment of the BBB video sequence has a significant difference from the average encoding time of all video segments. <?A3B2 "tbl10",5,"anchor"?><xref ref-type="table" rid="table-10">Tab. 10</xref> shows the average actual encoding times for all segments of three video sequences compared to the average encoding times of middle segments of the videos. <xref ref-type="table" rid="table-10">Tab. 10</xref> presents the results for the <italic>c5.2</italic> &#x00D7; <italic>large</italic> EC2 spot instance and <italic>eu-central-1b</italic> AWS availability zone. We see that the BBB video sequence has the highest difference of 0.64 s (3.94&#x2013;3.30) between the average actual encoding time for all segments and the middle segment. The difference for Sintel and TOS videos is only 0.09 and 0.17 s, respectively.</p>
<table-wrap id="table-9"><label>Table 9</label><caption><title>Predicted and actual encoding time (in sec) for different video sequences and eu-central-1b availability zone</title></caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left" rowspan="2">EC2<break/>instance</th>
<th align="center" colspan="2">BBB</th>
<th align="center" colspan="2">Sintel</th>
<th align="center" colspan="2">TOS</th>
</tr>
<tr>
<th align="left">Pred. time</th>
<th align="left">Act. time</th>
<th align="left">Pred. time</th>
<th align="left">Act. time</th>
<th align="left">Pred. time</th>
<th align="left">Act. time</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">t3a</td>
<td align="left">132</td>
<td align="left">156</td>
<td align="left">128</td>
<td align="left">124</td>
<td align="left">132</td>
<td align="left">131</td>
</tr>
<tr>
<td align="left">t3</td>
<td align="left">142</td>
<td align="left">166</td>
<td align="left">132</td>
<td align="left">130</td>
<td align="left">137</td>
<td align="left">130</td>
</tr>
<tr>
<td align="left">c5a</td>
<td align="left">129</td>
<td align="left">151</td>
<td align="left">130</td>
<td align="left">127</td>
<td align="left">139</td>
<td align="left">134</td>
</tr>
<tr>
<td align="left">c5</td>
<td align="left">135</td>
<td align="left">161</td>
<td align="left">130</td>
<td align="left">127</td>
<td align="left">136</td>
<td align="left">131</td>
</tr>
<tr>
<td align="left">c4</td>
<td align="left">132</td>
<td align="left">158</td>
<td align="left">133</td>
<td align="left">130</td>
<td align="left">127</td>
<td align="left">122</td>
</tr>
<tr>
<td align="left">Average</td>
<td align="left"><bold>134</bold></td>
<td align="left"><bold>158</bold></td>
<td align="left"><bold>131</bold></td>
<td align="left"><bold>128</bold></td>
<td align="left"><bold>134</bold></td>
<td align="left"><bold>130</bold></td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="table-10"><label>Table 10</label><caption><title>Average encoding times for segments of three video sequences</title></caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left" rowspan="2">Video sequence</th>
<th align="center" colspan="2">Average actual encoding time (sec)</th>
</tr>
<tr>
<th align="left">All segments</th>
<th align="left">Middle segment</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">BBB</td>
<td align="left">3.94</td>
<td align="left">3.30</td>
</tr>
<tr>
<td align="left">Sintel</td>
<td align="left">4.89</td>
<td align="left">4.98</td>
</tr>
<tr>
<td align="left">TOS</td>
<td align="left">4.59</td>
<td align="left">4.76</td>
</tr>
</tbody>
</table>
</table-wrap>
<p><?A3B2 "fig5",5,"anchor"?><xref ref-type="fig" rid="fig-5">Fig. 5</xref> shows the predicted and actual encoding costs for the Sintel video sequence on the <italic>eu-central-1b</italic> availability zone. We see that the predicted encoding times for all EC2 spot instances are slightly higher than the actual encoding times. This is because the predicted encoding times for the EC2 spot instances are slightly higher than the actual encoding times (see <xref ref-type="fig" rid="fig-4">Fig. 4</xref>). Our proposed FSpot model selects different EC2 spot instances by prioritizing the low cost. <?A3B2 "tbl11",5,"anchor"?><xref ref-type="table" rid="table-11">Tab. 11</xref> shows that the <italic>c5a.2</italic> &#x00D7; <italic>large</italic> spot instance has the highest priority. Both the predicted and actual encoding costs for <italic>c5a.2</italic> &#x00D7; <italic>large</italic> are the lowest compared to other EC2 spot instances. This means that the proposed FSpot model can select the appropriate EC2 spot instance type and the number of EC2 spot instances with minimum video encoding costs.</p>
<fig id="fig-5"><label>Figure 5</label><caption><title>Predicted and actual encoding cost (in &#x0024;) for different EC2 spot instances for sintel video sequence and <italic>eu-central-1b</italic> availability zone</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMC_23630-fig-5.png"/></fig>
<table-wrap id="table-11"><label>Table 11</label><caption><title>Predicted and actual encoding cost for the Sintel video sequence and eu-central-1b availability zone</title></caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left">EC2 spot<break/>instance <inline-formula id="ieqn-65"><mml:math id="mml-ieqn-65"><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:math></inline-formula></th>
<th align="left">Selected for<break/>zone <inline-formula id="ieqn-66"><mml:math id="mml-ieqn-66"><mml:mn>1</mml:mn><mml:mrow><mml:mi>b</mml:mi></mml:mrow></mml:math></inline-formula></th>
<th align="left">Predicted<break/>cost, &#x0024;</th>
<th align="left">Actual<break/>cost, &#x0024;</th>
<th align="left">Priority of<break/>instance</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">c5a</td>
<td align="left">Yes</td>
<td align="left">0.043</td>
<td align="left">0.042</td>
<td align="left">1</td>
</tr>
<tr>
<td align="left">t3a</td>
<td align="left">Yes</td>
<td align="left">0.052</td>
<td align="left">0.050</td>
<td align="left">2</td>
</tr>
<tr>
<td align="left">t3</td>
<td align="left">Yes</td>
<td align="left">0.055</td>
<td align="left">0.054</td>
<td align="left">3</td>
</tr>
<tr>
<td align="left">c5</td>
<td align="left">Yes</td>
<td align="left">0.057</td>
<td align="left">0.056</td>
<td align="left">4</td>
</tr>
<tr>
<td align="left">c4</td>
<td align="left">Yes</td>
<td align="left">0.058</td>
<td align="left">0.057</td>
<td align="left">5</td>
</tr>
<tr>
<td align="left">m5</td>
<td align="left">No</td>
<td align="left">0.066</td>
<td align="left">0.064</td>
<td align="left">6</td>
</tr>
<tr>
<td align="left">m5a</td>
<td align="left">No</td>
<td align="left">0.069</td>
<td align="left">0.067</td>
<td align="left">7</td>
</tr>
<tr>
<td align="left">m4</td>
<td align="left">No</td>
<td align="left">0.077</td>
<td align="left">0.075</td>
<td align="left">8</td>
</tr>
<tr>
<td align="left">r5</td>
<td align="left">No</td>
<td align="left">0.080</td>
<td align="left">0.078</td>
<td align="left">9</td>
</tr>
<tr>
<td align="left">r4</td>
<td align="left">No</td>
<td align="left">0.082</td>
<td align="left">0.081</td>
<td align="left">10</td>
</tr>
<tr>
<td align="left">r5a</td>
<td align="left">No</td>
<td align="left">0.084</td>
<td align="left">0.081</td>
<td align="left">11</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>Additionally, <xref ref-type="table" rid="table-11">Tab. 11</xref> shows all predicted priorities for all EC2 spot instances in ascending order in the last column table. Interestingly, all predicted and actual costs are mapped as per their priority and arranged in ascending order. This shows that the model assigned the correct priorities to all EC2 spot instances. Additionally, the first five EC2 spot instances (from <italic>c5a</italic> to <italic>c4</italic>) belong to a set selected by our FSpot approach. Thus, our FSpot approach outperforms in quickly reduce the number of EC2 spot instances for further and in-depth analysis.</p>
<p>We compared our proposed FSpot approach to a random method where the system randomly selects <italic>2</italic> &#x00D7; <italic>large</italic> EC2 spot instances to encode video segments. With the proposed FSpot approach, the <italic>percentage decrease of cost</italic> (PDC) for Sintel video sequence ranges from 16&#x0025; for <italic>t3a.2</italic> &#x00D7; <italic>large</italic> spot instances to 48&#x0025; for <italic>r4.2</italic> &#x00D7; <italic>large</italic> and <italic>r5a.2</italic> &#x00D7; <italic>large</italic> spot instances. <?A3B2 "fig6",5,"anchor"?><xref ref-type="fig" rid="fig-6">Fig. 6</xref> presents the PDC values for ten EC2 spot instances compared to <italic>c5a.2</italic> &#x00D7; <italic>large</italic> spot instances. We also compared our FSpot approach with another approach where the lowest price EC2 spot instance has the highest priority. According to <?A3B2 "tbl5",5,"anchor"?><xref ref-type="table" rid="table-5">Tab. 5</xref>, the EC2 spot instance <italic>t3a.2</italic> &#x00D7; <italic>large</italic> has the lowest price of 0.1037 &#x0024;. The proposed FSpot model selects c5a.2 &#x00D7; large spot instance type and achieves PDC to 16&#x0025; with the highest priority compared to the lowest price EC2 spot instance (<italic>t3a.2</italic> &#x00D7; <italic>large</italic>). This means that the model can choose the appropriate EC2 spot instance, even with a higher price. The higher price EC2 spot instances typically have higher video encoding speed and vice versa. <?A3B2 "tbl12",5,"anchor"?><xref ref-type="table" rid="table-12">Tab. 12</xref> shows PDC for all ten video sequences compared to the random approach. We can see that the <italic>ReadySetGo</italic> video sequence has the lowest PDC of 11.8&#x0025;, while <italic>the Beauty</italic> video sequence has the highest PDC of 20.8&#x0025;. The results show that, on average, our approach can reduce the encoding cost by at least 15.8&#x0025; and the maximum by 47.8&#x0025; (see the last row in <?A3B2 "tbl12",5,"anchor"?><xref ref-type="table" rid="table-12">Tab. 12</xref>). Ideally, the PDC value will be zero if the random approach selects the best EC2 spot instance and the correct number of EC2 instances. However, the chances of choosing both values correctly are meager. Our proposed FSpot model can select the best EC2 spot instances between different AWS availability zones.</p>
<fig id="fig-6"><label>Figure 6</label><caption><title>PDC for ten EC2 spot instances compared to <italic>c5a.2</italic> &#x00D7; <italic>large</italic> spot instance</title></caption><graphic mimetype="image" mime-subtype="png" xlink:href="CMC_23630-fig-6.png"/></fig>
<p>We proposed the FSpot method by combining the Pareto front with clustering techniques to optimize the AWS EC2 spot instance selection for encoding tasks allocation to minimize the encoding costs. Our model, on average, can reduce encoding costs by at least 15.8&#x0025; and up to 47.8&#x0025; compared to the random approach. FSpot can be customized and applied to the Google Cloud, and Microsoft Azure platforms with their own spare compute capacity instances. Deploying our model in an existing encoding infrastructure requires the development of an application programming interface. The encoding infrastructure will interact via the API with the model to calculate the predictions for upcoming encodings.</p>
<table-wrap id="table-12"><label>Table 12</label><caption><title>Percentage decrease of cost (PDC) for all ten video sequences compared to the random approach. Eu-central-1b Amazon availability zone</title></caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left" colspan="2">Video<break/>sequence</th>
<th align="left">Ready<break/>SetGo</th>
<th align="left">Driving<break/> POV</th>
<th align="left">Wind<break/>And<break/>Nature</th>
<th align="left">BBB</th>
<th align="left">Jockey</th>
<th align="left">Yacht Ride</th>
<th align="left">Sintel</th>
<th align="left">Honey<break/> Bee</th>
<th align="left">TOS</th>
<th align="left">Beauty</th>
<th align="left">Avg value</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" rowspan="2">PDC in &#x0025;</td>
<td align="left">Min</td>
<td align="left">11.8</td>
<td align="left">13.3</td>
<td align="left">14.8</td>
<td align="left">15</td>
<td align="left">15</td>
<td align="left">15.8</td>
<td align="left">16</td>
<td align="left">16.7</td>
<td align="left">18.4</td>
<td align="left">20.8</td>
<td align="left"><bold>15.8</bold></td>
</tr>
<tr>
<td align="left">Max</td>
<td align="left">46.4</td>
<td align="left">48</td>
<td align="left">47.7</td>
<td align="left">47.7</td>
<td align="left">48.5</td>
<td align="left">48.4</td>
<td align="left">48.1</td>
<td align="left">48.3</td>
<td align="left">47.4</td>
<td align="left">47.2</td>
<td align="left"><bold>47.8</bold></td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s5"><label>5</label><title>Conclusion and Future Work</title>
<p>In this research, we performed benchmarking on Amazon EC2 instances using different encoding parameters and video sequences. We used video sequences and segments of different genres and visual complexity. We proposed a novel FSpot approach for fast estimation of video segments encoding time at the master node and selecting the appropriate set of EC2 spot instances for video encoding. We developed an algorithm by combining Pareto front and clustering techniques to find a set of appropriate EC2 spot instances for video encoding. Our approach calculates the EC2 spot instance count and priorities for optimized video encoding in the cloud. We implemented and tested our FSpot approach to optimize the Amazon EC2 spot instance selection for encoding tasks allocation. Results show that the FSpot approach optimizes Amazon EC2 spot instances utilization and minimizes the video encoding costs in the cloud. On average, FSpot can reduce the encoding costs ranging from 15.8&#x0025; to 47.8&#x0025; compared to a random selection of EC2 spot instances.</p>
<p>We plan in the future to extend our method for predicting the encoding time using multiple video codecs on different cloud computing instances and infrastructures. We will test our model on ARM and GPU processing instances in the cloud. In addition, we plan to develop an intelligent scheduler and auto-tuner to automate the process of optimized video encoding in the cloud.</p>
</sec>
</body>
<back>
<fn-group>
<fn fn-type="other"><p><bold>Funding Statement:</bold> This work has been supported in part by the Austrian Research Promotion Agency (FFG) under the APOLLO and Karnten Fog project.</p></fn>
<fn fn-type="conflict"><p><bold>Conflicts of Interest:</bold> The authors declare that they have no conflicts of interest to report regarding the present study.</p></fn>
</fn-group>
<ref-list content-type="authoryear">
<title>References</title>
<ref id="ref-1"><label>[1]</label><mixed-citation publication-type="book"><person-group person-group-type="author"><string-name><given-names>C.</given-names> <surname>Robbins</surname></string-name></person-group>, <source>Cisco Annual Internet Report (2018&#x2013;2023). Cisco</source>, <publisher-loc>170 West Tasman Dr. San Jose, CA 95134 USA</publisher-loc>, Tech. Rep., <year>2020</year>. [Online]. Available: <uri xlink:href="https://www. cisco.com/c/en/us/solutions/collateral/executive-perspectives/annual-internet-report/white-paper-c11-741490.html">https://www. cisco.com/c/en/us/solutions/collateral/executive-perspectives/annual-internet-report/white-paper-c11-741490.html</uri>.</mixed-citation></ref>
<ref id="ref-2"><label>[2]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>A.</given-names> <surname>Javadtalab</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Semsarzadeh</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Khanchi</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Shirmohammadi</surname></string-name> and <string-name><given-names>A.</given-names> <surname>Yassine</surname></string-name></person-group>, &#x201C;<article-title>Continuous one-way detection of available bandwidth changes for video streaming over best effort networks</article-title>,&#x201D; <source>IEEE Transactions on Instrumentation and Measurement</source>, vol. <volume>64</volume>, no. <issue>1</issue>, pp. <fpage>190</fpage>&#x2013;<lpage>203</lpage>, <year>2015</year>.</mixed-citation></ref>
<ref id="ref-3"><label>[3]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>I.</given-names> <surname>Sodagar</surname></string-name></person-group>, &#x201C;<article-title>The MPEG-DASH standard for multimedia streaming over the internet</article-title>,&#x201D; <source>IEEE MultiMedia</source>, vol. <volume>18</volume>, no. <issue>4</issue>, pp. <fpage>62</fpage>&#x2013;<lpage>67</lpage>, <year>2011</year>.</mixed-citation></ref>
<ref id="ref-4"><label>[4]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>A.</given-names> <surname>Bentaleb</surname></string-name>, <string-name><given-names>B.</given-names> <surname>Taani</surname></string-name>, <string-name><given-names>A. C.</given-names> <surname>Begen</surname></string-name>, <string-name><given-names>C.</given-names> <surname>Timmerer</surname></string-name> and <string-name><given-names>R.</given-names> <surname>Zimmermann</surname></string-name></person-group>, &#x201C;<article-title>A survey on bitrate adaptation schemes for streaming media over HTTP</article-title>,&#x201D; <source>IEEE Communications Surveys Tutorials</source>, vol. <volume>21</volume>, no. <issue>1</issue>, pp. <fpage>562</fpage>&#x2013;<lpage>585</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-5"><label>[5]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>A.</given-names> <surname>Zabrovskiy</surname></string-name>, <string-name><given-names>E.</given-names> <surname>Petrov</surname></string-name>, <string-name><given-names>E.</given-names> <surname>Kuzmin</surname></string-name> and <string-name><given-names>C.</given-names> <surname>Timmerer</surname></string-name></person-group>, &#x201C;<article-title>Evaluation of the performance of adaptive HTTP streaming systems</article-title>,&#x201D; <source>CoRR</source>, vol. <volume>abs/1710.02459</volume>, pp. <fpage>1</fpage>&#x2013;<lpage>7</lpage>, <year>2017</year>. [Online]. Available: <uri xlink:href="http://arxiv.org/abs/1710.02459">http://arxiv.org/abs/1710.02459</uri>.</mixed-citation></ref>
<ref id="ref-6"><label>[6]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>A.</given-names> <surname>Zabrovskiy</surname></string-name>, <string-name><given-names>E.</given-names> <surname>Kuzmin</surname></string-name>, <string-name><given-names>E.</given-names> <surname>Petrov</surname></string-name>, <string-name><given-names>C.</given-names> <surname>Timmerer</surname></string-name> and <string-name><given-names>C.</given-names> <surname>Mueller</surname></string-name></person-group>, &#x201C;<article-title>AdViSE: Adaptive video streaming evaluation framework for the automated testing of media players</article-title>,&#x201D; in <conf-name>8th ACM on Multimedia Systems Conf. (MMSys&#x2019;17)</conf-name>, <conf-loc>New York, NY, USA</conf-loc>: <publisher-name>Association for Computing Machinery</publisher-name>, pp. <fpage>217</fpage>&#x2013;<lpage>220</lpage>, <year>2017</year>.</mixed-citation></ref>
<ref id="ref-7"><label>[7]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>T.</given-names> <surname>Wiegand</surname></string-name>, <string-name><given-names>G. J.</given-names> <surname>Sullivan</surname></string-name>, <string-name><given-names>G.</given-names> <surname>Bjontegaard</surname></string-name> and <string-name><given-names>A.</given-names> <surname>Luthra</surname></string-name></person-group>, &#x201C;<article-title>Overview of the H.264/AVC video coding standard</article-title>,&#x201D; <source>IEEE Transactions on Circuits and Systems for Video Technology</source>, vol. <volume>13</volume>, no. <issue>7</issue>, pp. <fpage>560</fpage>&#x2013;<lpage>576</lpage>, <year>2003</year>.</mixed-citation></ref>
<ref id="ref-8"><label>[8]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>G. J.</given-names> <surname>Sullivan</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Ohm</surname></string-name>, <string-name><given-names>W.</given-names> <surname>Han</surname></string-name> and <string-name><given-names>T.</given-names> <surname>Wiegand</surname></string-name></person-group>, &#x201C;<article-title>Overview of the high-efficiency video coding (HEVC) standard</article-title>,&#x201D; <source>IEEE Transactions on Circuits and Systems for Video Technology</source>, vol. <volume>22</volume>, no. <issue>12</issue>, pp. <fpage>1649</fpage>&#x2013;<lpage>1668</lpage>, <year>2012</year>.</mixed-citation></ref>
<ref id="ref-9"><label>[9]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>D.</given-names> <surname>Mukherjee</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Han</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Bankoski</surname></string-name>, <string-name><given-names>R.</given-names> <surname>Bultje</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Grange</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>A technical overview of VP9: The latest open-source video codec</article-title>,&#x201D; <conf-name>Annual Technical Conf. Exhibition (SMPTE&#x2019;2013)</conf-name>, <conf-loc>Hollywood, CA, USA</conf-loc>, pp. <fpage>1</fpage>&#x2013;<lpage>17</lpage>, <year>2013</year>.</mixed-citation></ref>
<ref id="ref-10"><label>[10]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>C.</given-names> <surname>Chen</surname></string-name>, <string-name><given-names>Y.</given-names> <surname>Lin</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Benting</surname></string-name> and <string-name><given-names>A.</given-names> <surname>Kokaram</surname></string-name></person-group>, &#x201C;<article-title>Optimized transcoding for large scale adaptive streaming using playback statistics</article-title>,&#x201D; in <conf-name>25th IEEE Int. Conf. on Image Processing (ICIP)</conf-name>, <conf-loc>Athens, Greece</conf-loc>, pp. <fpage>3269</fpage>&#x2013;<lpage>3273</lpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-11"><label>[11]</label><mixed-citation publication-type="other"><person-group person-group-type="author"><string-name><given-names>B.</given-names> <surname>Bross</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Chen</surname></string-name> and <string-name><given-names>S.</given-names> <surname>Liu</surname></string-name></person-group>, &#x201C;<article-title>Versatile video coding (Draft 7)</article-title>,&#x201D; <italic>JVET-P2001</italic>, <publisher-loc>Geneva, CH</publisher-loc>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-12"><label>[12]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>A.</given-names> <surname>Zabrovskiy</surname></string-name>, <string-name><given-names>C.</given-names> <surname>Feldmann</surname></string-name> and <string-name><given-names>C.</given-names> <surname>Timmerer</surname></string-name></person-group>, &#x201C;<article-title>Multi-codec DASH dataset</article-title>,&#x201D; in <conf-name>9th ACM Multimedia Systems Conf. (MMSys &#x2018;18)</conf-name>, <conf-loc>New York, NY, USA</conf-loc>: <publisher-name>ACM</publisher-name>, pp. <fpage>438</fpage>&#x2013;<lpage>443</lpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-13"><label>[13]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>D.</given-names> <surname>Vatolin</surname></string-name>, <string-name><given-names>D.</given-names> <surname>Kulikov</surname></string-name>, <string-name><given-names>E.</given-names> <surname>Sklyarov</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Zvezdakov</surname></string-name> and <string-name><given-names>A.</given-names> <surname>Antsiferova</surname></string-name></person-group>, &#x201C;<article-title>Video transcoding clouds comparison 2019</article-title>,&#x201D; <source>Moscow State University, Technical Report</source>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-14"><label>[14]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>M. G.</given-names> <surname>Koziri</surname></string-name>, <string-name><given-names>P. K.</given-names> <surname>Papadopoulos</surname></string-name>, <string-name><given-names>N.</given-names> <surname>Tziritas</surname></string-name>, <string-name><given-names>T.</given-names> <surname>Loukopoulos</surname></string-name>, <string-name><given-names>S. U.</given-names> <surname>Khan</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Efficient cloud provisioning for video transcoding: Review, open challenges and future opportunities</article-title>,&#x201D; <source>IEEE Internet Computing</source>, vol. <volume>22</volume>, no. <issue>5</issue>, pp. <fpage>46</fpage>&#x2013;<lpage>55</lpage>, <year>Sep. 2018</year>.</mixed-citation></ref>
<ref id="ref-15"><label>[15]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>T.</given-names> <surname>Pham</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Ristov</surname></string-name> and <string-name><given-names>T.</given-names> <surname>Fahringer</surname></string-name></person-group>, &#x201C;<article-title>Performance and behavior characterization of Amazon EC2 spot instances</article-title>,&#x201D; in <conf-name>11th IEEE Int. Conf. on Cloud Computing (CLOUD 2018)</conf-name>, <conf-loc>San Francisco, CA, USA</conf-loc>, pp. <fpage>73</fpage>&#x2013;<lpage>81</lpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-16"><label>[16]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>X.</given-names> <surname>Li</surname></string-name>, <string-name><given-names>M. A.</given-names> <surname>Salehi</surname></string-name>, <string-name><given-names>Y.</given-names> <surname>Joshi</surname></string-name>, <string-name><given-names>M. K.</given-names> <surname>Darwich</surname></string-name>, <string-name><given-names>B.</given-names> <surname>Landreneau</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Performance analysis and modeling of video transcoding using heterogeneous cloud services</article-title>,&#x201D; <source>IEEE Transactions on Parallel and Distributed Systems</source>, vol. <volume>30</volume>, no. <issue>4</issue>, pp. <fpage>910</fpage>&#x2013;<lpage>922</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-17"><label>[17]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>R.</given-names> <surname>Matha</surname></string-name>, <string-name><given-names>D.</given-names> <surname>Kimovski</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Zabrovskiy</surname></string-name>, <string-name><given-names>C.</given-names> <surname>Timmerer</surname></string-name> and <string-name><given-names>R.</given-names> <surname>Prodan</surname></string-name></person-group>, &#x201C;<article-title>Where to encode: A performance analysis of x86 and arm-based Amazon EC2 instances</article-title>,&#x201D; <source>17th International Conference on eScience (eScience)</source>, Innsbruck, Austria, IEEEXplore, pp. <fpage>118</fpage>&#x2013;<lpage>127</lpage>, <year>2021</year>. <uri xlink:href="10.1109/eScience51609.2021.00022">10.1109/eScience51609.2021.00022</uri>.</mixed-citation></ref>
<ref id="ref-18"><label>[18]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>S.</given-names> <surname>Sameti</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Wang</surname></string-name> and <string-name><given-names>D.</given-names> <surname>Krishnamurthy</surname></string-name></person-group>, &#x201C;<article-title>Stride: Distributed video transcoding in spark</article-title>,&#x201D; in <conf-name>37th Int. Performance Computing and Communications Conf. (IPCCC)</conf-name>, <conf-loc>Orlando, FL, USA</conf-loc>: <publisher-name>IEEE</publisher-name>, pp. <fpage>1</fpage>&#x2013;<lpage>8</lpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-19"><label>[19]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>O.</given-names> <surname>Barais</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Bourcier</surname></string-name>, <string-name><given-names>Y.</given-names> <surname>Bromberg</surname></string-name> and <string-name><given-names>C.</given-names> <surname>Dion</surname></string-name></person-group>, &#x201C;<article-title>Towards microservices architecture to transcode videos in the large at low costs</article-title>,&#x201D; in <conf-name>Int. Conf. on Telecommunications and Multimedia (TEMU)</conf-name>, <conf-loc>Heraklion, Greece</conf-loc>, pp. <fpage>1</fpage>&#x2013;<lpage>6</lpage>, <year>2016</year>.</mixed-citation></ref>
<ref id="ref-20"><label>[20]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>P.</given-names> <surname>Agrawal</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Zabrovskiy</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Ilangovan</surname></string-name>, <string-name><given-names>C.</given-names> <surname>Timmerer</surname></string-name> and <string-name><given-names>R.</given-names> <surname>Prodan</surname></string-name></person-group>, &#x201C;<article-title>FastTTPS: Fast approach for video transcoding time prediction and scheduling for HTTP adaptive streaming videos</article-title>,&#x201D; <source>Cluster Computing</source>, vol. <volume>24</volume>, pp. <fpage>1605</fpage>&#x2013;<lpage>1621</lpage>, <year>2021</year>.</mixed-citation></ref>
<ref id="ref-21"><label>[21]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>I.</given-names> <surname>Gog</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Schwarzkopf</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Gleave</surname></string-name>, <string-name><given-names>R. N.</given-names> <surname>Watson</surname></string-name> and <string-name><given-names>S.</given-names> <surname>Hand</surname></string-name></person-group>, &#x201C;<article-title>Firmament: Fast, centralized cluster scheduling at scale</article-title>,&#x201D; in <conf-name>12th USENIX Symp. on Operating Systems Design and Implementation (OSDI-16)</conf-name>, <conf-loc>Savannah, GA, USA</conf-loc>, pp. <fpage>99</fpage>&#x2013;<lpage>115</lpage>, <year>2016</year>.</mixed-citation></ref>
<ref id="ref-22"><label>[22]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>M.</given-names> <surname>Isard</surname></string-name>, <string-name><given-names>V.</given-names> <surname>Prabhakaran</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Currey</surname></string-name>, <string-name><given-names>U.</given-names> <surname>Wieder</surname></string-name>, <string-name><given-names>K.</given-names> <surname>Talwar</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Quincy: Fair scheduling for distributed computing clusters</article-title>,&#x201D; in <conf-name>22nd Symp. on Operating Systems Principles</conf-name>, <conf-loc>Big Sky, Montana, USA</conf-loc>: <publisher-name>ACM SIGOPS</publisher-name>, pp. <fpage>261</fpage>&#x2013;<lpage>276</lpage>, <year>2009</year>.</mixed-citation></ref>
<ref id="ref-23"><label>[23]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>A.</given-names> <surname>Tumanov</surname></string-name>, <string-name><given-names>T.</given-names> <surname>Zhu</surname></string-name>, <string-name><given-names>J. W.</given-names> <surname>Park</surname></string-name>, <string-name><given-names>M. A.</given-names> <surname>Kozuch</surname></string-name>, <string-name><given-names>M.</given-names> <surname>HarcholBalter</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Tetrisched: Global rescheduling with adaptive plan-ahead in dynamic heterogeneous clusters</article-title>,&#x201D; in <conf-name>11th European Conf. on Computer Systems</conf-name>, <conf-loc>London, United Kingdom</conf-loc>, pp. <fpage>1</fpage>&#x2013;<lpage>16</lpage>, <year>2016</year>.</mixed-citation></ref>
<ref id="ref-24"><label>[24]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>M.</given-names> <surname>Malawski</surname></string-name>, <string-name><given-names>G.</given-names> <surname>Juve</surname></string-name>, <string-name><given-names>E.</given-names> <surname>Deelman</surname></string-name> and <string-name><given-names>J.</given-names> <surname>Nabrzyski</surname></string-name></person-group>, &#x201C;<article-title>Algorithms for cost-and deadline-constrained provisioning for scientific workflow ensembles in iaas clouds</article-title>,&#x201D; <source>Future Generation Computer Systems</source>, vol. <volume>48</volume>, pp. <fpage>1</fpage>&#x2013;<lpage>18</lpage>, <year>2015</year>.</mixed-citation></ref>
<ref id="ref-25"><label>[25]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>M.</given-names> <surname>Ghobaei-Arani</surname></string-name>, <string-name><given-names>A. A.</given-names> <surname>Rahmanian</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Souri</surname></string-name> and <string-name><given-names>A. M.</given-names> <surname>Rahmani</surname></string-name></person-group>, &#x201C;<article-title>A Moth-flame optimization algorithm for web service composition in cloud computing: Simulation and verification</article-title>,&#x201D; <source>Software: Practice and Experience</source>, vol. <volume>48</volume>, no. <issue>10</issue>, pp. <fpage>1865</fpage>&#x2013;<lpage>1892</lpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-26"><label>[26]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>M. A.</given-names> <surname>Rodriguez</surname></string-name> and <string-name><given-names>R.</given-names> <surname>Buyya</surname></string-name></person-group>, &#x201C;<article-title>Budget-driven scheduling of scientific workflows in iaas clouds with fine-grained billing periods</article-title>,&#x201D; <source>ACM Transactions on Autonomous and Adaptive Systems (TAAS)</source>, vol. <volume>12</volume>, no. <issue>2</issue>, pp. <fpage>1</fpage>&#x2013;<lpage>22</lpage>, <year>2017</year>.</mixed-citation></ref>
<ref id="ref-27"><label>[27]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>M.</given-names> <surname>Malawski</surname></string-name>, <string-name><given-names>K.</given-names> <surname>Figiela</surname></string-name> and <string-name><given-names>J.</given-names> <surname>Nabrzyski</surname></string-name></person-group>, &#x201C;<article-title>Cost minimization for computational applications on hybrid cloud infrastructures</article-title>,&#x201D; <source>Future Generation Computer Systems</source>, vol. <volume>29</volume>, no. <issue>7</issue>, pp. <fpage>1786</fpage>&#x2013;<lpage>1794</lpage>, <year>2013</year>.</mixed-citation></ref>
<ref id="ref-28"><label>[28]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>F.</given-names> <surname>Garcia-Carballeira</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Calderon</surname></string-name> and <string-name><given-names>J.</given-names> <surname>Carretero</surname></string-name></person-group>, &#x201C;<article-title>Enhancing the power of two choices load balancing algorithm using round-robin policy</article-title>,&#x201D; <source>Cluster Computing</source>, vol. <volume>24</volume>, pp. <fpage>1</fpage>&#x2013;<lpage>14</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-29"><label>[29]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>A.</given-names> <surname>Chhabra</surname></string-name>, <string-name><given-names>G.</given-names> <surname>Singh</surname></string-name> and <string-name><given-names>K. S.</given-names> <surname>Kahlon</surname></string-name></person-group>, &#x201C;<article-title>Multi-criteria HPC task scheduling on IaaS cloud infrastructures using metaheuristics</article-title>,&#x201D; <source>Cluster Computing</source>, vol. <volume>24</volume>, pp. <fpage>1</fpage>&#x2013;<lpage>34</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-30"><label>[30]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>F.</given-names> <surname>Ebadifard</surname></string-name> and <string-name><given-names>S. M.</given-names> <surname>Babamir</surname></string-name></person-group>, &#x201C;<article-title>Autonomic task scheduling algorithm for dynamic workloads through a load balancing technique for the cloud-computing environment</article-title>,&#x201D; <source>Cluster Computing</source>, vol. <volume>24</volume>, pp. <fpage>1</fpage>&#x2013;<lpage>27</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-31"><label>[31]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>C.</given-names> <surname>Wang</surname></string-name>, <string-name><given-names>Q.</given-names> <surname>Liang</surname></string-name> and <string-name><given-names>B.</given-names> <surname>Urgaonkar</surname></string-name></person-group>, &#x201C;<article-title>An empirical analysis of Amazon EC2 spot instance features affecting cost-effective resource procurement</article-title>,&#x201D; <source>ACM Transactions on Modeling and Performance Evaluation of Computing Systems (TOMPECS)</source>, vol. <volume>3</volume>, no. <issue>2</issue>, pp. <fpage>1</fpage>&#x2013;<lpage>24</lpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-32"><label>[32]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>R.</given-names> <surname>Aparicio-Pardo</surname></string-name>, <string-name><given-names>K.</given-names> <surname>Pires</surname></string-name>, <string-name><given-names>A.</given-names> <surname>Blanc</surname></string-name> and <string-name><given-names>G.</given-names> <surname>Simon</surname></string-name></person-group>, &#x201C;<article-title>Transcoding live adaptive video streams at a massive scale in the cloud</article-title>,&#x201D; in <conf-name>6th ACM Multimedia Systems Conf.</conf-name>, <conf-loc>Portland, Oregon</conf-loc>, pp. <fpage>49</fpage>&#x2013;<lpage>60</lpage>, <year>2015</year>.</mixed-citation></ref>
<ref id="ref-33"><label>[33]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>P.</given-names> <surname>Oikonomou</surname></string-name>, <string-name><given-names>M. G.</given-names> <surname>Koziri</surname></string-name>, <string-name><given-names>N.</given-names> <surname>Tziritas</surname></string-name>, <string-name><given-names>A. N.</given-names> <surname>Dadaliaris</surname></string-name>, <string-name><given-names>T.</given-names> <surname>Loukopoulos</surname></string-name>, <string-name><given-names>G. I.</given-names> <surname>Stamoulis</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Scheduling video transcoding jobs in the cloud</article-title>,&#x201D; in <conf-name>Int. Conf. on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData)</conf-name>, <conf-loc>Halifax, NS, Canada</conf-loc>: <publisher-name>IEEE</publisher-name><conf-loc>, pp.</conf-loc> <fpage>442</fpage><conf-loc>&#x2013;</conf-loc><lpage>449</lpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-34"><label>[34]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>L.</given-names> <surname>Wei</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Cai</surname></string-name>, <string-name><given-names>C. H.</given-names> <surname>Foh</surname></string-name> and <string-name><given-names>B.</given-names> <surname>He</surname></string-name></person-group>, &#x201C;<article-title>QoS-Aware resource allocation for video transcoding in clouds</article-title>,&#x201D; <source>IEEE Transactions on Circuits and Systems for Video Technology</source>, vol. <volume>27</volume>, no. <issue>1</issue>, pp. <fpage>49</fpage>&#x2013;<lpage>61</lpage>, <year>2016</year>.</mixed-citation></ref>
<ref id="ref-35"><label>[35]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>D.</given-names> <surname>Kirubha</surname></string-name> and <string-name><given-names>K.</given-names> <surname>Ramar</surname></string-name></person-group>, &#x201C;<article-title>MCCA scheduling for enhancing QoS based video streaming for video surveillance applications</article-title>,&#x201D; <source>Cluster Computing</source>, vol. <volume>22</volume>, no. <issue>6</issue>, pp. <fpage>13945</fpage>&#x2013;<lpage>13955</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-36"><label>[36]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>F.</given-names> <surname>Jokhio</surname></string-name>, <string-name><given-names>T.</given-names> <surname>Deneke</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Lafond</surname></string-name> and <string-name><given-names>J.</given-names> <surname>Lilius</surname></string-name></person-group>, &#x201C;<article-title>Bitrate reduction video transcoding with distributed computing</article-title>,&#x201D; in <conf-name>20th Euromicro Int. Conf. on Parallel, Distributed and Network-Based Processing</conf-name>, <conf-loc>Munich, Germany</conf-loc>: <publisher-name>IEEE</publisher-name>, pp. <fpage>206</fpage>&#x2013;<lpage>212</lpage>, <year>2012</year>.</mixed-citation></ref>
<ref id="ref-37"><label>[37]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>X.</given-names> <surname>Li</surname></string-name>, <string-name><given-names>M. A.</given-names> <surname>Salehi</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Bayoumi</surname></string-name>, <string-name><given-names>N. -F.</given-names> <surname>Tzeng</surname></string-name> and <string-name><given-names>R.</given-names> <surname>Buyya</surname></string-name></person-group>, &#x201C;<article-title>Cost-efficient and robust on-demand video transcoding using heterogeneous cloud services</article-title>,&#x201D; <source>IEEE Transactions on Parallel and Distributed Systems</source>, vol. <volume>29</volume>, no. <issue>3</issue>, pp. <fpage>556</fpage>&#x2013;<lpage>571</lpage>, <year>2017</year>.</mixed-citation></ref>
<ref id="ref-38"><label>[38]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>S.</given-names> <surname>Sameti</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Wang</surname></string-name> and <string-name><given-names>D.</given-names> <surname>Krishnamurthy</surname></string-name></person-group>, &#x201C;<article-title>Contrast: Container-based transcoding for interactive video streaming</article-title>,&#x201D; in <conf-name>Network Operations and Management Symp. (NOMS&#x2019;2020)</conf-name>, <conf-loc>Budapest, Hungary</conf-loc>: <publisher-name>IEEE</publisher-name>, pp. <fpage>1</fpage>&#x2013;<lpage>9</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-39"><label>[39]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>L.</given-names> <surname>Li</surname></string-name>, <string-name><given-names>D.</given-names> <surname>Shi</surname></string-name>, <string-name><given-names>R.</given-names> <surname>Hou</surname></string-name>, <string-name><given-names>R.</given-names> <surname>Chen</surname></string-name>, <string-name><given-names>B.</given-names> <surname>Lin</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Energy-efficient proactive caching for adaptive video streaming via data-driven optimization</article-title>,&#x201D; <source>IEEE Internet of Things Journal</source>, vol. <volume>7</volume>, no. <issue>6</issue>, pp. <fpage>5549</fpage>&#x2013;<lpage>5561</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-40"><label>[40]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>L.</given-names> <surname>Ma</surname></string-name></person-group>, &#x201C;<article-title>An efficient scheduling multimedia transcoding method for DASH streaming in cloud environment</article-title>,&#x201D; <source>Cluster Computing</source>, vol. <volume>22</volume>, pp. <fpage>1043</fpage>&#x2013;<lpage>1053</lpage>, <year>2017</year>.</mixed-citation></ref>
<ref id="ref-41"><label>[41]</label><mixed-citation publication-type="web">&#x201C;<person-group person-group-type="author"><collab>Use Spot Instance Pricing for Your Video Encoding Workflows with Bitmovin</collab></person-group>,&#x201D; <uri xlink:href="https://aws.amazon.com/blogs/startups/use-spot-instance-pricing-for-your-video-encoding-workflow/-with-bitmovin-containerized-encoding/">https://aws.amazon.com/blogs/startups/use-spot-instance-pricing-for-your-video-encoding-workflow/-with-bitmovin-containerized-encoding/</uri>. [Online; accessed 14-Jan-2021], <year>2017</year>.</mixed-citation></ref>
<ref id="ref-42"><label>[42]</label><mixed-citation publication-type="web">&#x201C;<person-group person-group-type="author"><collab>FFprobe Documentation</collab></person-group>,&#x201D; <uri xlink:href="https://ffmpeg.org/ffprobe.html">https://ffmpeg.org/ffprobe.html</uri>. [Online; accessed 25-July-2020], <year>2020</year>.</mixed-citation></ref>
<ref id="ref-43"><label>[43]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>S.</given-names> <surname>Lederer</surname></string-name>, <string-name><given-names>C.</given-names> <surname>Muller</surname></string-name> and <string-name><given-names>C.</given-names> <surname>Timmerer</surname></string-name></person-group>, &#x201C;<article-title>Dynamic adaptive streaming over HTTP dataset</article-title>,&#x201D; in <conf-name>3rd Multimedia Systems Conf. (MMSys&#x2019;12)</conf-name>, <conf-loc>New York, NY, USA</conf-loc>: <publisher-name>ACM</publisher-name>, pp. <fpage>89</fpage>&#x2013;<lpage>94</lpage>, <year>2012</year>.</mixed-citation></ref>
<ref id="ref-44"><label>[44]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>A.</given-names> <surname>Zabrovskiy</surname></string-name>, <string-name><given-names>P.</given-names> <surname>Agrawal</surname></string-name>, <string-name><given-names>R.</given-names> <surname>Matha</surname></string-name>, <string-name><given-names>C.</given-names> <surname>Timmerer</surname></string-name> and <string-name><given-names>R.</given-names> <surname>Prodan</surname></string-name></person-group>, &#x201C;<article-title>ComplexCTTP: Complexity class-based transcoding time prediction for video sequences using artificial neural network</article-title>,&#x201D; in <conf-name>Sixth Int. Conf. on Multimedia Big Data (BigMM)</conf-name>, <conf-loc>New Delhi, India</conf-loc>, pp. <fpage>316</fpage>&#x2013;<lpage>325</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-45"><label>[45]</label><mixed-citation publication-type="web">&#x201C;<person-group person-group-type="author"><collab>H.264 Video Encoding Guide</collab></person-group>,&#x201D; <uri xlink:href="https://trac.ffmpeg.org/wiki/Encode/H.264">https://trac.ffmpeg.org/wiki/Encode/H.264</uri>. [Online; accessed 10-September-2020], <year>2020</year>.</mixed-citation></ref>
<ref id="ref-46"><label>[46]</label><mixed-citation publication-type="web"><person-group person-group-type="author"><collab>Amazon</collab></person-group>, &#x201C;<article-title>Amazon EC2 spot instances pricing</article-title>,&#x201D; <uri xlink:href="https://aws.amazon.com/ec2/spot/pricing">https://aws.amazon.com/ec2/spot/pricing</uri>. [Online; accessed 14-Jan-2021], <year>2021</year>.</mixed-citation></ref>
<ref id="ref-47"><label>[47]</label><mixed-citation publication-type="web">&#x201C;<person-group person-group-type="author"><collab>Spot Instance Advisor</collab></person-group>,&#x201D; <uri xlink:href="https://aws.amazon.com/ru/ec2/spot/instance-advisor">https://aws.amazon.com/ru/ec2/spot/instance-advisor</uri>. [Online; accessed 14-Jan-2021], <year>2021</year>.</mixed-citation></ref>
</ref-list>
</back>
</article>