Video streaming became an undivided part of the Internet. To efficiently utilise the limited network bandwidth it is essential to encode the video content. However, encoding is a computationally intensive task, involving high-performance resources provided by private infrastructures or public clouds. Public clouds, such as Amazon EC2, provide a large portfolio of services and instances optimized for specific purposes and budgets. The majority of Amazon’s instances use x86 processors, such as Intel Xeon or AMD EPYC. However, following the recent trends in computer architecture, Amazon introduced Arm based instances that promise up to 40% better cost performance
ratio than comparable x86 instances for specific workloads. We evaluate in this paper the video encoding performance of x86 and Arm instances of four instance families using the latest FFmpeg version and two video codecs. We examine the impact of the encoding parameters, such as different presets and bitrates, on the time and cost for encoding. Our experiments reveal that Arm instances show high time and cost saving potential of up to
33.63% for specific bitrates and presets, especially for the x264 codec. However, the x86 instances are more general and achieve low encoding times, regardless of the codec.
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Where to Encode: A Performance Analysis of Intel x86 and Arm-based Amazon EC2 Instances
1. Where to Encode: A Performance Analysis of
x86 and Arm-based Amazon EC2 Instances
a
Roland Matha, Dragi Kimovski, Anatoliy Zabrovskiy, Christian Timmerer and Radu Prodan
Institute for Information Technology
Klagenfurt University, Klagenfurt
September 20-23, 2021
eScience 2021, Innsbruck, Austria
1
3. Introduction
Video streaming is undivided part of the Internet network.
It enables us to consume multi-modal digital media with high
quality.
Multiple essential services rely on video streaming to convey
information, such es traffic control, and crowd and security
surveillance.
Furthermore, the whole entertainment and information
industry relies on video streaming to provide on-demand and
real-live video services.
3
4. Video encoding – How is it done?
Raw stream Segment, encode,
store
Stream in different
parameters
4
5. Barriers
Unfortunately, the Internet network connectivity can
significantly change over time depending on many factors.
HTTP Adaptive Streaming (HAS) technology encodes video
content, divided into small segments, in multiple bitrate-
resolution pairs to adapt to varying bandwidth fluctuations.
HAS is compute demanding, and thus requires vast
computational resources, which are now provided by the
cloud.
5
6. Motivation
Cloud providers offer a vast set of computing resources
with different architectures (x86 and ARM), capabilities
and prices.
It is, therefore, difficult to choose most appropriate cloud
resources for performing video HAS considering the
heterogeneity of the resources and the different encoding
implementations.
6
8. Goals
To evaluate the relative video encoding time
and cost differences between and x86 and
Arm instance families.
To identify the fastest and cheapest instance
types among all instances of the same
processor architecture.
To provide a reference table indicating our
recommendation for the fastest and cheapest
encoding options for the practitioners.
8
10. Evaluation methodology
Encoding data generation describes the selection
of representative video sequences, identifies
video codecs, and selects encoding parameters.
Instance selection describes the selection of
cloud instances based on the processor micro-
architecture (x86 and ARM).
10
11. Encoding data generation
• Video sequence selection: We choose for the performance evaluation videos
with duration below 10 seconds in accordance with the industry best
practices.
• Codec selection: We identify x264 and x265 (FFmpeg 4.3) as the most widely
spread codecs for executing video encoding tasks, deployed by more than
90% of the video streaming industry.
• Encoding parameters selection: We select 19 bitrates from 100 kbps to 20
Mbps.
11
12. Instance selection
• Instance type selection: We selected instance types based on three
commonly used processors for video encoding:
– Intel Xeon Platinum: is a multi-purpose processor with 26 cores and 52 threads based on the
latest extension of the x86 architecture with the Advanced Vector Extension (AVX-512)
instruction set.
– AMD EPYC: is a multi-purpose processor based on the x86 Zen architecture with up to 32
cores and 64 concurrent threads.
– Graviton2: is the second generation of Graviton Arm processors. It is a 64-core monolithic
server chip that uses Arm’s new Neoverse N1 cores, derived from the mobile Cortex-A76
cores.
12
14. Metric definition
• Metric definition: We compare the Arm instances with the Intel and AMD
based x86 instances using three metrics:
– Relative encoding time
– Encoding cost
– Relative encoding cost
Video segment V, with bitrate b and preset p
Instance price in USD per second
14
15. Experimental design
• Instance family:
– Relative encoding time: difference of each x86 and Arm instance from the same instance
family.
– Relative encoding cost: difference across both processor architectures from the same
instance family.
• Processor architecture:
– Fastest encoding time: of Arm and x86 instances independent of the instance family.
– Lowest encoding cost: across all instance families from the same processor architecture.
15
22. Conclusion and future work
• We provide a performance analysis for video encoding tasks of Arm
and x86 instances of four Amazon EC2 instance families with three
different processors.
• We conducted a total of 20.520 experiments in two evaluation
scenarios for the two most widely used video codecs.
• We compiled a set of recommendations for the practitioners in the
industry.
• In the future, we plan to extend our analysis with different emerging
codec implementations and longer video segments to generalize our
recommendations.
22
23. Thank you for your attention
Please contact me for any query on: dragi.kimovski@aau.at
23