SlideShare a Scribd company logo
Meltdown, Spectre and
Apache Spark™
Performance
Chris Stevens
June 5, 2018
1
Databricks Performance on AWS
2
3-5% performance degradation
Overview
Goal: Understand the 3-5% degradation
Steps:
- TPC-DS Benchmarks
- System Analysis
- Breakdown the exploits and patches
- Meltdown
- Spectre V1 - Bounds Check Bypass
- Specter V2 - Branch Target Injection
3
TPC-DS: q1-v2.4
4
WITH customer_total_return AS
(SELECT sr_customer_sk AS ctr_customer_sk,
sr_store_sk AS ctr_store_sk,
sum(sr_return_amt) AS ctr_total_return
FROM store_returns, date_dim
WHERE sr_returned_date_sk = d_date_sk
AND d_year = 2000
GROUP BY sr_customer_sk, sr_store_sk)
SELECT c_customer_id
FROM customer_total_return ctr1, store, customer
WHERE ctr1.ctr_total_return >
(SELECT avg(ctr_total_return)*1.2
FROM customer_total_return ctr2
WHERE ctr1.ctr_store_sk = ctr2.ctr_store_sk)
AND s_store_sk = ctr1.ctr_store_sk
AND s_state = 'TN'
AND ctr1.ctr_customer_sk = c_customer_sk
ORDER BY c_customer_id LIMIT 100
TPC-DS: q1-v2.4
5
TPC-DS: q1-v2.4
6
q1-v2.4 CPU Utilization
7mpstat -P ALL
TPC-DS: q1-v2.4
8strace -f -c -p PID
Exploits Background
Out-of-Order Execution + Side Channel Attacks
9
In-order Execution
x = a + b
y = c + d
z = x + y
Add
A + B
Store
X
Decode
Add
Retire
Add
C + B
Store
Y
Decode
Add
Retire
Add
X + Y
Store
Z
Decode
Add
Retire
Time
10
Out-of-order Execution
x = a + b
y = c + d
z = x + y
Add
A + B
Store
X
Decode
Add
Retire
Add
C + D
Store
Y
Decode
Add
Retire
Add
X+Y
Store
Z
Decode
Add
Retire
Time
11
Side-Channel Attacks
FLUSH +RELOAD
0 0xABAB
1 0xCDCD
2 0xEFEF
3 0x1212
0 INVALID
1 INVALID
2 INVALID
3 INVALID
0 INVALID
1 INVALID
2 0xEFEF
3 INVALID
Speculative execution
fills cache entry 2
0 0xABAB
1 0xCDCD
2 0xEFEF
3 0x1212
ATTACK
clflush instruction
invalidates the cache
Reload measures the time
to read each cache entry
12
Side-Channel Attacks
https://meltdownattack.com/meltdown.pdf
13
Meltdown
14
Meltdown
kernelByte = *kernelAddr;
probeArray[kernelByte * 4096];
15
Meltdown
kernelByte = *kernelAddr;
probeArray[kernelByte * 4096];
Get value of
kernelAddr
Get value of
probeArray
Read 1 Byte
at kernelAddr
Retire
Multiply
kernel byte
by 4096
Read
probeArray
at offset
Time
Decode
Multiply
Decode
Array Access
Decode
Memory
Read
Retire
Retire
Permission
Check Here
Side Channel
Attack 16
Side-Channel Attack
FLUSH +RELOAD
0*4096 INVALID
1*4096 INVALID
2*4096 INVALID
3*4096 INVALID
Speculative execution
reads probeArray at
kernelByte * 4096
ATTACK
Flush each page in
probeArray
Reload measures the time
to read each page in
probeArray
0*4096 INVALID
1*4096 INVALID
2*4096 0xEFEF
3*4096 INVALID
0*4096 0xABAB
1*4096 0xCDCD
2*4096 0xEFEF
3*4096 0x1212
Sees that page 2
was the fastest =>
kernelByte = 0x2
17
Kernel Page-Table Isolation
Process Page Tables without KPTI
Combined
Page Tables
Kernel
Virtual Memory
User
Virtual Memory
Sensitive Data
Meltdown
Code
Process Page Tables with KPTI
Kernel
Page Tables
Kernel
Virtual Memory
User
Virtual Memory
Sensitive Data
Meltdown
Code
Meltdown
Code
User Mode
Page Tables
Same Physical Memory 18
Meltdown
kernelByte = *kernelAddr;
probeArray[kernelByte * 4096];
Get value of
kernelAddr
Get value of
probeArray
Read 1 Byte
at kernelAddr
Retire
Multiply
kernel byte
by 4096
Read
probeArray
at offset
Time
Decode
Multiply
Decode
Array Access
Decode
Memory
Read
Retire
Retire
19
Kernel Page-Table Isolation
Process Page Tables without KPTI
Combined
Page Tables
Kernel
Virtual Memory
User
Virtual Memory
Sensitive Data
Meltdown
Code
Process Page Tables with KPTI
Kernel
Page Tables
Kernel
Virtual Memory
User
Virtual Memory
Sensitive Data
Meltdown
Code
Meltdown
Code
User Mode
Page Tables
Same Physical Memory 20
TLB before KPTI
Virtual
Address
Physical
Address
- -
- -
while True:
print *UserAddress
sys_clock_gettime
Virtual
Address
Physical
Address
UserAddress Page 1
- -
Virtual
Address
Physical
Address
UserAddress Page 1
KernelTime Page 2
print *UserAddress print *UserAddresssys_clock_gettime
TLB MISS TLB MISS TLB HIT
21
TLB with KPTI
Virtual
Address
Physical
Address
- -
- -
while True:
print *UserAddress
sys_clock_gettime
Virtual
Address
Physical
Address
- -
- -
Virtual
Address
Physical
Address
- -
- -
print *UserAddress print *UserAddresssys_clock_gettime
TLB MISS TLB MISS TLB MISS
22
Meltdown TLB Misses
23perf stat -e dtlb-load-misses
TLB with KPTI and PCID
Virtual
Address
PCID Physical
Address
- - -
- - -
while True:
print *UserAddress
sys_clock_gettime
print *UserAddress print *UserAddresssys_clock_gettime
TLB MISS TLB MISS TLB HIT
Virtual
Address
PCID Physical
Address
UserAddress 1 Page 1
- - -
Virtual
Address
PCID Physical
Address
UserAddress 1 Page 1
KernelTime 0 Page 2
Meltdown Runtime
25
Spectre V1
Bounds Check Bypass
26
Bounds Check Bypass
if (index < size) {
val = array[index];
probeArray[val];
}
27
Bounds Check Bypass
28
if (index < size) {
val = array[index];
probeArray[val];
}
Read size Is (index < size)? Retire
Read array
at index
Time
Was
(index < size)?
Decode If
Is
(index < size>)?
Yes
Read
probeArray
Retire
Retire
Is
(index < size>)?
Yes
Yes
Side Channel Attack
Bounds Check Bypass
29
if (index < size) {
val = array[index];
probeArray[val];
} ATTACKTRAIN
Was (index < size)?
-
Was (index < size)?
yes
Code
size = 10
index = 1000
Code
size = 10
index = 5
Observable Speculation Barrier
30
- Protects against Spectre V1 - Bounds Check Bypass
- ~14 in the Ubuntu kernel and drivers
- Stops speculative array access with the LFENCE barrier
if (index < size) {
val = array[index];
probeArray[val];
}
if (index < size) {
osb();
val = array[index];
probeArray[val];
}
Before After
Observable Speculation Barrier
31
if (index < size) {
osb()
val = array[index];
probeArray[val];
}
Read size Is (index < size)? Retire
LFENCE
Time
Was
(index < size)?
Decode If
Is
(index < size>)?
Yes
Retire
Yes
Read array
at index
Spectre V2
Branch Target Injection
32
Branch Target Injection
33
def call_func(func, arg):
func(arg)
Branch Target Injection
34
def call_func(func, arg):
func(arg)
Read func
from memory
Call func Retire
Call previous
func
Time
What was func
last time?
Decode call
func ==
previous func
Retire
func ==
previous func
No
Yes
Branch Target Injection
35
def call_func(func, arg):
func(arg)
ATTACKTRAIN
What was func?
-
What was func?
attack_widget
call_func(attack_widget, 1000)
innocent, 10
call_func(innocent, 10)
attack_widget, 1000
Intel Microcode Updates
36
- Protect against Spectre V2 - Branch Target Injection
- Indirect Branch Restricted Speculation (IBRS)
- Stops attacks from code running at lower privilege levels
- Stops attacks from code running on the sibling hyperthread (STIBP)
- Indirect Branch Prediction Barrier (IBPB)
- Stops attacks from code running at the same privilege level
- Inserted at User-to-User and Guest-to-Guest transitions
IBPB and IBRS Patches
37
def call_func(func, arg):
func(arg)
ATTACKTRAIN
What was func?
-
What was func?
-
call_func(attack_widget, 1000)
innocent, 10
call_func(innocent, 10)
attack_widget, 1000
IBPB, IBRS
Branch Target Injection
38
def call_func(func, arg):
func(arg)
Read func
from memory
Call func Retire
Cache Miss
Time
What was func
last time?
Decode call
func ==
previous func
No
Spectre V2 Branch Misses
39perf stat -e branch-misses
Spectre V2 Runtime
40
Retpoline
- Protects indirect branches/calls from speculative execution
- Uses an infinite loop to do it
41
jmp rax call set_up_target
speculative_loop:
pause
lfence
jmp speculative_loop
set_up_target:
mov rax, [rsp]
ret
Before After Return Stack Buffer
.
.
.
speculative_loop
Stack
.
.
.
speculative_loop
Retpoline
- Protects indirect branches/calls from speculative execution
- Uses an infinite loop to do it
42
jmp rax call set_up_target
speculative_loop:
pause
lfence
jmp speculative_loop
set_up_target:
mov rax, [rsp]
ret
Before After Return Stack Buffer
.
.
.
speculative_loop
Stack
.
.
.
rax
Retpoline
- Protects indirect branches/calls from speculative execution
- Uses an infinite loop to do it
43
jmp rax call set_up_target
speculative_loop:
pause
lfence
jmp speculative_loop
set_up_target:
mov rax, [rsp]
ret
Before After Return Stack Buffer
.
.
.
speculative_loop
Stack
.
.
.
rax
Retpoline
- Protects indirect branches/calls from speculative execution
- Uses an infinite loop to do it
44
jmp rax call set_up_target
speculative_loop:
pause
lfence
jmp speculative_loop
set_up_target:
mov rax, [rsp]
ret
Before After Return Stack Buffer
.
.
.
speculative_loop
Stack
.
.
.
rax
Retpoline
- Protects indirect branches/calls from speculative execution
- Uses an infinite loop to do it
45
jmp rax call set_up_target
speculative_loop:
pause
lfence
jmp speculative_loop
set_up_target:
mov rax, [rsp]
ret
Before After Return Stack Buffer
.
.
.
speculative_loop
Stack
.
.
.
rax
Retpoline (Improved)
- Check against a known target and direct branch
46
jmp rax cmp rax, known_target
jne retpoline
jmp known_target
retpoline:
call set_up_target
speculative_loop:
pause
jmp speculative_loop
set_up_target:
mov rax, [rsp]
ret
Before After
Direct Branch (fast)
Retpoline Runtime
47
Retpoline CPU Utilization
48mpstat -P ALL
Retpoline System Calls
49strace -f -c -p PID
A Tale of Two Queries
50
q1-v2.4 ss_max-v2.4
SELECT
count(*) AS total,
count(ss_sold_date_sk) AS not_null_total,
count(DISTINCT ss_sold_date_sk) AS unique_days,
max(ss_sold_date_sk) AS max_ss_sold_date_sk,
max(ss_sold_time_sk) AS max_ss_sold_time_sk,
max(ss_item_sk) AS max_ss_item_sk,
max(ss_customer_sk) AS max_ss_customer_sk,
max(ss_cdemo_sk) AS max_ss_cdemo_sk,
max(ss_hdemo_sk) AS max_ss_hdemo_sk,
max(ss_addr_sk) AS max_ss_addr_sk,
max(ss_store_sk) AS max_ss_store_sk,
max(ss_promo_sk) AS max_ss_promo_sk
FROM store_sales
WITH customer_total_return AS
(SELECT sr_customer_sk AS ctr_customer_sk,
sr_store_sk AS ctr_store_sk,
sum(sr_return_amt) AS ctr_total_return
FROM store_returns, date_dim
WHERE sr_returned_date_sk = d_date_sk
AND d_year = 2000
GROUP BY sr_customer_sk, sr_store_sk)
SELECT c_customer_id
FROM customer_total_return ctr1, store, customer
WHERE ctr1.ctr_total_return >
(SELECT avg(ctr_total_return)*1.2
FROM customer_total_return ctr2
WHERE ctr1.ctr_store_sk = ctr2.ctr_store_sk)
AND s_store_sk = ctr1.ctr_store_sk
AND s_state = 'TN'
AND ctr1.ctr_customer_sk = c_customer_sk
ORDER BY c_customer_id LIMIT 100
q1-v2.4 vs ss_max-v2.4
51perf stat -e raw_syscalls:sys_enter -a -I 1000
Thank You
chris.stevens@databricks.com
https://www.linkedin.com/in/chriscstevens/
52
Backup Slides
53
array_index_nospec()
54
- Protects against Spectre V1 - Bounds Check Bypass
- ~50 in the Linux kernel and drivers (not in Ubuntu)
- Stops speculative array access by clamping the index
if (index < size) {
val = array[index];
probeArray[val];
}
if (index < size) {
index = array_index_nospec(index, size);
val = array[index];
probeArray[val];
}
Before After
Speculative Store Bypass
55
- CVE-2018-3639
- “Variant 4”
- Public Date: May 21, 2018
- Details:
- https://access.redhat.com/security/vulnerabilities/ssbd
- Ubuntu Command Line Parameter:
- spec_store_bypass_disable=on
TPC-DS: ss_max-v2.4
56
TPC-DS: q1-v2.4
57
Baselines Pre-Skylake 2% Skylake+ 11%
TPC-DS: ss_max-v2.4
58
Baselines Pre-Skylake 0% Skylake+ 1%
q1-v2.4 Runtime Box Plots
59
ss_max-v2.4 Runtime Box Plots
60
Single Node TPC-DS Setup
• Intel Core i7-4820k @ 3.70GHz (Ivy Bridge - ca. 2012)
• 8 CPUs
• 8GB of RAM
• Disk: Western Digital Blue
– WDC10EZEX-08M2NA0
– 1TB
– 7200 rpm
– 146MB/s sequential read (http://hdd.userbenchmark.com/)
• Ubuntu 16.04.4 LTS (Xenial Xerus)
– 64-bit server image
– 4.4.0-116-generic Linux kernel
61
Repositories
- https://github.com/apache/spark.git
- https://github.com/databricks/spark-sql-perf.git
- https://github.com/databricks/tpcds-kit
- https://github.com/speed47/spectre-meltdown-checker
- https://github.com/brendangregg/pmc-cloud-tools
- https://github.com/brendangregg/perf-tools
62

More Related Content

What's hot

ComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical SciencesComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical Sciencesalexstorer
 
Go Programming Patterns
Go Programming PatternsGo Programming Patterns
Go Programming Patterns
Hao Chen
 
Full Text Search in PostgreSQL
Full Text Search in PostgreSQLFull Text Search in PostgreSQL
Full Text Search in PostgreSQL
Aleksander Alekseev
 
Spark RDD-DF-SQL-DS-Spark Hadoop User Group Munich Meetup 2016
Spark RDD-DF-SQL-DS-Spark Hadoop User Group Munich Meetup 2016Spark RDD-DF-SQL-DS-Spark Hadoop User Group Munich Meetup 2016
Spark RDD-DF-SQL-DS-Spark Hadoop User Group Munich Meetup 2016
Comsysto Reply GmbH
 
1 Dundee - Cassandra 101
1 Dundee - Cassandra 1011 Dundee - Cassandra 101
1 Dundee - Cassandra 101
Christopher Batey
 
ClickHouse Features for Advanced Users, by Aleksei Milovidov
ClickHouse Features for Advanced Users, by Aleksei MilovidovClickHouse Features for Advanced Users, by Aleksei Milovidov
ClickHouse Features for Advanced Users, by Aleksei Milovidov
Altinity Ltd
 
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
Alex Pruden
 
Oracle 10g Performance: chapter 00 sampling
Oracle 10g Performance: chapter 00 samplingOracle 10g Performance: chapter 00 sampling
Oracle 10g Performance: chapter 00 samplingKyle Hailey
 
Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...
Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...
Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...
Altinity Ltd
 
Scaling the #2ndhalf
Scaling the #2ndhalfScaling the #2ndhalf
Scaling the #2ndhalf
Salo Shp
 
Machinelearning Spark Hadoop User Group Munich Meetup 2016
Machinelearning Spark Hadoop User Group Munich Meetup 2016Machinelearning Spark Hadoop User Group Munich Meetup 2016
Machinelearning Spark Hadoop User Group Munich Meetup 2016
Comsysto Reply GmbH
 
From Zero to Application Delivery with NixOS
From Zero to Application Delivery with NixOSFrom Zero to Application Delivery with NixOS
From Zero to Application Delivery with NixOS
Susan Potter
 
Cassandra lesson learned - extended
Cassandra   lesson learned  - extendedCassandra   lesson learned  - extended
Cassandra lesson learned - extended
Andrzej Ludwikowski
 
Efficient Programs
Efficient ProgramsEfficient Programs
Efficient Programs
Gabriel Grill
 
SSL Failing, Sharing, and Scheduling
SSL Failing, Sharing, and SchedulingSSL Failing, Sharing, and Scheduling
SSL Failing, Sharing, and Scheduling
David Evans
 
Leveraging Hadoop for Legacy Systems
Leveraging Hadoop for Legacy SystemsLeveraging Hadoop for Legacy Systems
Leveraging Hadoop for Legacy Systems
Mathias Herberts
 
Artimon - Apache Flume (incubating) NYC Meetup 20111108
Artimon - Apache Flume (incubating) NYC Meetup 20111108Artimon - Apache Flume (incubating) NYC Meetup 20111108
Artimon - Apache Flume (incubating) NYC Meetup 20111108
Mathias Herberts
 

What's hot (20)

Spark_Documentation_Template1
Spark_Documentation_Template1Spark_Documentation_Template1
Spark_Documentation_Template1
 
ComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical SciencesComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical Sciences
 
Go Programming Patterns
Go Programming PatternsGo Programming Patterns
Go Programming Patterns
 
Full Text Search in PostgreSQL
Full Text Search in PostgreSQLFull Text Search in PostgreSQL
Full Text Search in PostgreSQL
 
Spark RDD-DF-SQL-DS-Spark Hadoop User Group Munich Meetup 2016
Spark RDD-DF-SQL-DS-Spark Hadoop User Group Munich Meetup 2016Spark RDD-DF-SQL-DS-Spark Hadoop User Group Munich Meetup 2016
Spark RDD-DF-SQL-DS-Spark Hadoop User Group Munich Meetup 2016
 
1 Dundee - Cassandra 101
1 Dundee - Cassandra 1011 Dundee - Cassandra 101
1 Dundee - Cassandra 101
 
ClickHouse Features for Advanced Users, by Aleksei Milovidov
ClickHouse Features for Advanced Users, by Aleksei MilovidovClickHouse Features for Advanced Users, by Aleksei Milovidov
ClickHouse Features for Advanced Users, by Aleksei Milovidov
 
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
 
Oracle 10g Performance: chapter 00 sampling
Oracle 10g Performance: chapter 00 samplingOracle 10g Performance: chapter 00 sampling
Oracle 10g Performance: chapter 00 sampling
 
Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...
Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...
Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...
 
Scaling the #2ndhalf
Scaling the #2ndhalfScaling the #2ndhalf
Scaling the #2ndhalf
 
Machinelearning Spark Hadoop User Group Munich Meetup 2016
Machinelearning Spark Hadoop User Group Munich Meetup 2016Machinelearning Spark Hadoop User Group Munich Meetup 2016
Machinelearning Spark Hadoop User Group Munich Meetup 2016
 
From Zero to Application Delivery with NixOS
From Zero to Application Delivery with NixOSFrom Zero to Application Delivery with NixOS
From Zero to Application Delivery with NixOS
 
Cassandra lesson learned - extended
Cassandra   lesson learned  - extendedCassandra   lesson learned  - extended
Cassandra lesson learned - extended
 
Efficient Programs
Efficient ProgramsEfficient Programs
Efficient Programs
 
SSL Failing, Sharing, and Scheduling
SSL Failing, Sharing, and SchedulingSSL Failing, Sharing, and Scheduling
SSL Failing, Sharing, and Scheduling
 
Advanced locking
Advanced lockingAdvanced locking
Advanced locking
 
Lec24
Lec24Lec24
Lec24
 
Leveraging Hadoop for Legacy Systems
Leveraging Hadoop for Legacy SystemsLeveraging Hadoop for Legacy Systems
Leveraging Hadoop for Legacy Systems
 
Artimon - Apache Flume (incubating) NYC Meetup 20111108
Artimon - Apache Flume (incubating) NYC Meetup 20111108Artimon - Apache Flume (incubating) NYC Meetup 20111108
Artimon - Apache Flume (incubating) NYC Meetup 20111108
 

Similar to Analyzing the Performance Effects of Meltdown + Spectre on Apache Spark Workloads with Chris Stevens

Building High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low EffortBuilding High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low Effort
Stefan Marr
 
Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...
Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...
Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...
confluent
 
What the CRaC - Superfast JVM startup
What the CRaC - Superfast JVM startupWhat the CRaC - Superfast JVM startup
What the CRaC - Superfast JVM startup
Gerrit Grunwald
 
Open stack pike-devstack-tutorial
Open stack pike-devstack-tutorialOpen stack pike-devstack-tutorial
Open stack pike-devstack-tutorial
Eueung Mulyana
 
Beyond the Query – Bringing Complex Access Patterns to NoSQL with DataStax - ...
Beyond the Query – Bringing Complex Access Patterns to NoSQL with DataStax - ...Beyond the Query – Bringing Complex Access Patterns to NoSQL with DataStax - ...
Beyond the Query – Bringing Complex Access Patterns to NoSQL with DataStax - ...
StampedeCon
 
Replication MongoDB Days 2013
Replication MongoDB Days 2013Replication MongoDB Days 2013
Replication MongoDB Days 2013
Randall Hunt
 
LSFMM 2019 BPF Observability
LSFMM 2019 BPF ObservabilityLSFMM 2019 BPF Observability
LSFMM 2019 BPF Observability
Brendan Gregg
 
Linux Ethernet device driver
Linux Ethernet device driverLinux Ethernet device driver
Linux Ethernet device driver
艾鍗科技
 
Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Ontico
 
Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)
Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)
Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)
Gavin Guo
 
Debugging Ruby Systems
Debugging Ruby SystemsDebugging Ruby Systems
Debugging Ruby Systems
Engine Yard
 
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacket
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacketCsw2016 wheeler barksdale-gruskovnjak-execute_mypacket
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacket
CanSecWest
 
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
Universitat Politècnica de Catalunya
 
Scala to assembly
Scala to assemblyScala to assembly
Scala to assembly
Jarek Ratajski
 
VLANs in the Linux Kernel
VLANs in the Linux KernelVLANs in the Linux Kernel
VLANs in the Linux Kernel
Kernel TLV
 
Beyond the Query: A Cassandra + Solr + Spark Love Triangle Using Datastax Ent...
Beyond the Query: A Cassandra + Solr + Spark Love Triangle Using Datastax Ent...Beyond the Query: A Cassandra + Solr + Spark Love Triangle Using Datastax Ent...
Beyond the Query: A Cassandra + Solr + Spark Love Triangle Using Datastax Ent...
DataStax Academy
 
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Data Provenance Support in...
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Data Provenance Support in...Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Data Provenance Support in...
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Data Provenance Support in...
Data Con LA
 
A Cassandra + Solr + Spark Love Triangle Using DataStax Enterprise
A Cassandra + Solr + Spark Love Triangle Using DataStax EnterpriseA Cassandra + Solr + Spark Love Triangle Using DataStax Enterprise
A Cassandra + Solr + Spark Love Triangle Using DataStax Enterprise
Patrick McFadin
 

Similar to Analyzing the Performance Effects of Meltdown + Spectre on Apache Spark Workloads with Chris Stevens (20)

Building High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low EffortBuilding High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low Effort
 
Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...
Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...
Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...
 
What the CRaC - Superfast JVM startup
What the CRaC - Superfast JVM startupWhat the CRaC - Superfast JVM startup
What the CRaC - Superfast JVM startup
 
Open stack pike-devstack-tutorial
Open stack pike-devstack-tutorialOpen stack pike-devstack-tutorial
Open stack pike-devstack-tutorial
 
A22 Introduction to DTrace by Kyle Hailey
A22 Introduction to DTrace by Kyle HaileyA22 Introduction to DTrace by Kyle Hailey
A22 Introduction to DTrace by Kyle Hailey
 
Beyond the Query – Bringing Complex Access Patterns to NoSQL with DataStax - ...
Beyond the Query – Bringing Complex Access Patterns to NoSQL with DataStax - ...Beyond the Query – Bringing Complex Access Patterns to NoSQL with DataStax - ...
Beyond the Query – Bringing Complex Access Patterns to NoSQL with DataStax - ...
 
Replication MongoDB Days 2013
Replication MongoDB Days 2013Replication MongoDB Days 2013
Replication MongoDB Days 2013
 
LSFMM 2019 BPF Observability
LSFMM 2019 BPF ObservabilityLSFMM 2019 BPF Observability
LSFMM 2019 BPF Observability
 
Linux Ethernet device driver
Linux Ethernet device driverLinux Ethernet device driver
Linux Ethernet device driver
 
Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)
 
Solr @ Etsy - Apache Lucene Eurocon
Solr @ Etsy - Apache Lucene EuroconSolr @ Etsy - Apache Lucene Eurocon
Solr @ Etsy - Apache Lucene Eurocon
 
Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)
Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)
Spectre(v1%2 fv2%2fv4) v.s. meltdown(v3)
 
Debugging Ruby Systems
Debugging Ruby SystemsDebugging Ruby Systems
Debugging Ruby Systems
 
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacket
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacketCsw2016 wheeler barksdale-gruskovnjak-execute_mypacket
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacket
 
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
 
Scala to assembly
Scala to assemblyScala to assembly
Scala to assembly
 
VLANs in the Linux Kernel
VLANs in the Linux KernelVLANs in the Linux Kernel
VLANs in the Linux Kernel
 
Beyond the Query: A Cassandra + Solr + Spark Love Triangle Using Datastax Ent...
Beyond the Query: A Cassandra + Solr + Spark Love Triangle Using Datastax Ent...Beyond the Query: A Cassandra + Solr + Spark Love Triangle Using Datastax Ent...
Beyond the Query: A Cassandra + Solr + Spark Love Triangle Using Datastax Ent...
 
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Data Provenance Support in...
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Data Provenance Support in...Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Data Provenance Support in...
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Data Provenance Support in...
 
A Cassandra + Solr + Spark Love Triangle Using DataStax Enterprise
A Cassandra + Solr + Spark Love Triangle Using DataStax EnterpriseA Cassandra + Solr + Spark Love Triangle Using DataStax Enterprise
A Cassandra + Solr + Spark Love Triangle Using DataStax Enterprise
 

More from Databricks

DW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptxDW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptx
Databricks
 
Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1
Databricks
 
Data Lakehouse Symposium | Day 1 | Part 2
Data Lakehouse Symposium | Day 1 | Part 2Data Lakehouse Symposium | Day 1 | Part 2
Data Lakehouse Symposium | Day 1 | Part 2
Databricks
 
Data Lakehouse Symposium | Day 2
Data Lakehouse Symposium | Day 2Data Lakehouse Symposium | Day 2
Data Lakehouse Symposium | Day 2
Databricks
 
Data Lakehouse Symposium | Day 4
Data Lakehouse Symposium | Day 4Data Lakehouse Symposium | Day 4
Data Lakehouse Symposium | Day 4
Databricks
 
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
Databricks
 
Democratizing Data Quality Through a Centralized Platform
Democratizing Data Quality Through a Centralized PlatformDemocratizing Data Quality Through a Centralized Platform
Democratizing Data Quality Through a Centralized Platform
Databricks
 
Learn to Use Databricks for Data Science
Learn to Use Databricks for Data ScienceLearn to Use Databricks for Data Science
Learn to Use Databricks for Data Science
Databricks
 
Why APM Is Not the Same As ML Monitoring
Why APM Is Not the Same As ML MonitoringWhy APM Is Not the Same As ML Monitoring
Why APM Is Not the Same As ML Monitoring
Databricks
 
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch FixThe Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
Databricks
 
Stage Level Scheduling Improving Big Data and AI Integration
Stage Level Scheduling Improving Big Data and AI IntegrationStage Level Scheduling Improving Big Data and AI Integration
Stage Level Scheduling Improving Big Data and AI Integration
Databricks
 
Simplify Data Conversion from Spark to TensorFlow and PyTorch
Simplify Data Conversion from Spark to TensorFlow and PyTorchSimplify Data Conversion from Spark to TensorFlow and PyTorch
Simplify Data Conversion from Spark to TensorFlow and PyTorch
Databricks
 
Scaling your Data Pipelines with Apache Spark on Kubernetes
Scaling your Data Pipelines with Apache Spark on KubernetesScaling your Data Pipelines with Apache Spark on Kubernetes
Scaling your Data Pipelines with Apache Spark on Kubernetes
Databricks
 
Scaling and Unifying SciKit Learn and Apache Spark Pipelines
Scaling and Unifying SciKit Learn and Apache Spark PipelinesScaling and Unifying SciKit Learn and Apache Spark Pipelines
Scaling and Unifying SciKit Learn and Apache Spark Pipelines
Databricks
 
Sawtooth Windows for Feature Aggregations
Sawtooth Windows for Feature AggregationsSawtooth Windows for Feature Aggregations
Sawtooth Windows for Feature Aggregations
Databricks
 
Redis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Redis + Apache Spark = Swiss Army Knife Meets Kitchen SinkRedis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Redis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Databricks
 
Re-imagine Data Monitoring with whylogs and Spark
Re-imagine Data Monitoring with whylogs and SparkRe-imagine Data Monitoring with whylogs and Spark
Re-imagine Data Monitoring with whylogs and Spark
Databricks
 
Raven: End-to-end Optimization of ML Prediction Queries
Raven: End-to-end Optimization of ML Prediction QueriesRaven: End-to-end Optimization of ML Prediction Queries
Raven: End-to-end Optimization of ML Prediction Queries
Databricks
 
Processing Large Datasets for ADAS Applications using Apache Spark
Processing Large Datasets for ADAS Applications using Apache SparkProcessing Large Datasets for ADAS Applications using Apache Spark
Processing Large Datasets for ADAS Applications using Apache Spark
Databricks
 
Massive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta LakeMassive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta Lake
Databricks
 

More from Databricks (20)

DW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptxDW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptx
 
Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1
 
Data Lakehouse Symposium | Day 1 | Part 2
Data Lakehouse Symposium | Day 1 | Part 2Data Lakehouse Symposium | Day 1 | Part 2
Data Lakehouse Symposium | Day 1 | Part 2
 
Data Lakehouse Symposium | Day 2
Data Lakehouse Symposium | Day 2Data Lakehouse Symposium | Day 2
Data Lakehouse Symposium | Day 2
 
Data Lakehouse Symposium | Day 4
Data Lakehouse Symposium | Day 4Data Lakehouse Symposium | Day 4
Data Lakehouse Symposium | Day 4
 
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
 
Democratizing Data Quality Through a Centralized Platform
Democratizing Data Quality Through a Centralized PlatformDemocratizing Data Quality Through a Centralized Platform
Democratizing Data Quality Through a Centralized Platform
 
Learn to Use Databricks for Data Science
Learn to Use Databricks for Data ScienceLearn to Use Databricks for Data Science
Learn to Use Databricks for Data Science
 
Why APM Is Not the Same As ML Monitoring
Why APM Is Not the Same As ML MonitoringWhy APM Is Not the Same As ML Monitoring
Why APM Is Not the Same As ML Monitoring
 
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch FixThe Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
 
Stage Level Scheduling Improving Big Data and AI Integration
Stage Level Scheduling Improving Big Data and AI IntegrationStage Level Scheduling Improving Big Data and AI Integration
Stage Level Scheduling Improving Big Data and AI Integration
 
Simplify Data Conversion from Spark to TensorFlow and PyTorch
Simplify Data Conversion from Spark to TensorFlow and PyTorchSimplify Data Conversion from Spark to TensorFlow and PyTorch
Simplify Data Conversion from Spark to TensorFlow and PyTorch
 
Scaling your Data Pipelines with Apache Spark on Kubernetes
Scaling your Data Pipelines with Apache Spark on KubernetesScaling your Data Pipelines with Apache Spark on Kubernetes
Scaling your Data Pipelines with Apache Spark on Kubernetes
 
Scaling and Unifying SciKit Learn and Apache Spark Pipelines
Scaling and Unifying SciKit Learn and Apache Spark PipelinesScaling and Unifying SciKit Learn and Apache Spark Pipelines
Scaling and Unifying SciKit Learn and Apache Spark Pipelines
 
Sawtooth Windows for Feature Aggregations
Sawtooth Windows for Feature AggregationsSawtooth Windows for Feature Aggregations
Sawtooth Windows for Feature Aggregations
 
Redis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Redis + Apache Spark = Swiss Army Knife Meets Kitchen SinkRedis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Redis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
 
Re-imagine Data Monitoring with whylogs and Spark
Re-imagine Data Monitoring with whylogs and SparkRe-imagine Data Monitoring with whylogs and Spark
Re-imagine Data Monitoring with whylogs and Spark
 
Raven: End-to-end Optimization of ML Prediction Queries
Raven: End-to-end Optimization of ML Prediction QueriesRaven: End-to-end Optimization of ML Prediction Queries
Raven: End-to-end Optimization of ML Prediction Queries
 
Processing Large Datasets for ADAS Applications using Apache Spark
Processing Large Datasets for ADAS Applications using Apache SparkProcessing Large Datasets for ADAS Applications using Apache Spark
Processing Large Datasets for ADAS Applications using Apache Spark
 
Massive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta LakeMassive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta Lake
 

Recently uploaded

一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
ahzuo
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
javier ramirez
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
balafet
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
pchutichetpong
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
dwreak4tg
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
AnirbanRoy608946
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
ewymefz
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
Roger Valdez
 
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
2023240532
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
jerlynmaetalle
 

Recently uploaded (20)

一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
 
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
 

Analyzing the Performance Effects of Meltdown + Spectre on Apache Spark Workloads with Chris Stevens

  • 1. Meltdown, Spectre and Apache Spark™ Performance Chris Stevens June 5, 2018 1
  • 2. Databricks Performance on AWS 2 3-5% performance degradation
  • 3. Overview Goal: Understand the 3-5% degradation Steps: - TPC-DS Benchmarks - System Analysis - Breakdown the exploits and patches - Meltdown - Spectre V1 - Bounds Check Bypass - Specter V2 - Branch Target Injection 3
  • 4. TPC-DS: q1-v2.4 4 WITH customer_total_return AS (SELECT sr_customer_sk AS ctr_customer_sk, sr_store_sk AS ctr_store_sk, sum(sr_return_amt) AS ctr_total_return FROM store_returns, date_dim WHERE sr_returned_date_sk = d_date_sk AND d_year = 2000 GROUP BY sr_customer_sk, sr_store_sk) SELECT c_customer_id FROM customer_total_return ctr1, store, customer WHERE ctr1.ctr_total_return > (SELECT avg(ctr_total_return)*1.2 FROM customer_total_return ctr2 WHERE ctr1.ctr_store_sk = ctr2.ctr_store_sk) AND s_store_sk = ctr1.ctr_store_sk AND s_state = 'TN' AND ctr1.ctr_customer_sk = c_customer_sk ORDER BY c_customer_id LIMIT 100
  • 10. In-order Execution x = a + b y = c + d z = x + y Add A + B Store X Decode Add Retire Add C + B Store Y Decode Add Retire Add X + Y Store Z Decode Add Retire Time 10
  • 11. Out-of-order Execution x = a + b y = c + d z = x + y Add A + B Store X Decode Add Retire Add C + D Store Y Decode Add Retire Add X+Y Store Z Decode Add Retire Time 11
  • 12. Side-Channel Attacks FLUSH +RELOAD 0 0xABAB 1 0xCDCD 2 0xEFEF 3 0x1212 0 INVALID 1 INVALID 2 INVALID 3 INVALID 0 INVALID 1 INVALID 2 0xEFEF 3 INVALID Speculative execution fills cache entry 2 0 0xABAB 1 0xCDCD 2 0xEFEF 3 0x1212 ATTACK clflush instruction invalidates the cache Reload measures the time to read each cache entry 12
  • 16. Meltdown kernelByte = *kernelAddr; probeArray[kernelByte * 4096]; Get value of kernelAddr Get value of probeArray Read 1 Byte at kernelAddr Retire Multiply kernel byte by 4096 Read probeArray at offset Time Decode Multiply Decode Array Access Decode Memory Read Retire Retire Permission Check Here Side Channel Attack 16
  • 17. Side-Channel Attack FLUSH +RELOAD 0*4096 INVALID 1*4096 INVALID 2*4096 INVALID 3*4096 INVALID Speculative execution reads probeArray at kernelByte * 4096 ATTACK Flush each page in probeArray Reload measures the time to read each page in probeArray 0*4096 INVALID 1*4096 INVALID 2*4096 0xEFEF 3*4096 INVALID 0*4096 0xABAB 1*4096 0xCDCD 2*4096 0xEFEF 3*4096 0x1212 Sees that page 2 was the fastest => kernelByte = 0x2 17
  • 18. Kernel Page-Table Isolation Process Page Tables without KPTI Combined Page Tables Kernel Virtual Memory User Virtual Memory Sensitive Data Meltdown Code Process Page Tables with KPTI Kernel Page Tables Kernel Virtual Memory User Virtual Memory Sensitive Data Meltdown Code Meltdown Code User Mode Page Tables Same Physical Memory 18
  • 19. Meltdown kernelByte = *kernelAddr; probeArray[kernelByte * 4096]; Get value of kernelAddr Get value of probeArray Read 1 Byte at kernelAddr Retire Multiply kernel byte by 4096 Read probeArray at offset Time Decode Multiply Decode Array Access Decode Memory Read Retire Retire 19
  • 20. Kernel Page-Table Isolation Process Page Tables without KPTI Combined Page Tables Kernel Virtual Memory User Virtual Memory Sensitive Data Meltdown Code Process Page Tables with KPTI Kernel Page Tables Kernel Virtual Memory User Virtual Memory Sensitive Data Meltdown Code Meltdown Code User Mode Page Tables Same Physical Memory 20
  • 21. TLB before KPTI Virtual Address Physical Address - - - - while True: print *UserAddress sys_clock_gettime Virtual Address Physical Address UserAddress Page 1 - - Virtual Address Physical Address UserAddress Page 1 KernelTime Page 2 print *UserAddress print *UserAddresssys_clock_gettime TLB MISS TLB MISS TLB HIT 21
  • 22. TLB with KPTI Virtual Address Physical Address - - - - while True: print *UserAddress sys_clock_gettime Virtual Address Physical Address - - - - Virtual Address Physical Address - - - - print *UserAddress print *UserAddresssys_clock_gettime TLB MISS TLB MISS TLB MISS 22
  • 23. Meltdown TLB Misses 23perf stat -e dtlb-load-misses
  • 24. TLB with KPTI and PCID Virtual Address PCID Physical Address - - - - - - while True: print *UserAddress sys_clock_gettime print *UserAddress print *UserAddresssys_clock_gettime TLB MISS TLB MISS TLB HIT Virtual Address PCID Physical Address UserAddress 1 Page 1 - - - Virtual Address PCID Physical Address UserAddress 1 Page 1 KernelTime 0 Page 2
  • 27. Bounds Check Bypass if (index < size) { val = array[index]; probeArray[val]; } 27
  • 28. Bounds Check Bypass 28 if (index < size) { val = array[index]; probeArray[val]; } Read size Is (index < size)? Retire Read array at index Time Was (index < size)? Decode If Is (index < size>)? Yes Read probeArray Retire Retire Is (index < size>)? Yes Yes Side Channel Attack
  • 29. Bounds Check Bypass 29 if (index < size) { val = array[index]; probeArray[val]; } ATTACKTRAIN Was (index < size)? - Was (index < size)? yes Code size = 10 index = 1000 Code size = 10 index = 5
  • 30. Observable Speculation Barrier 30 - Protects against Spectre V1 - Bounds Check Bypass - ~14 in the Ubuntu kernel and drivers - Stops speculative array access with the LFENCE barrier if (index < size) { val = array[index]; probeArray[val]; } if (index < size) { osb(); val = array[index]; probeArray[val]; } Before After
  • 31. Observable Speculation Barrier 31 if (index < size) { osb() val = array[index]; probeArray[val]; } Read size Is (index < size)? Retire LFENCE Time Was (index < size)? Decode If Is (index < size>)? Yes Retire Yes Read array at index
  • 32. Spectre V2 Branch Target Injection 32
  • 33. Branch Target Injection 33 def call_func(func, arg): func(arg)
  • 34. Branch Target Injection 34 def call_func(func, arg): func(arg) Read func from memory Call func Retire Call previous func Time What was func last time? Decode call func == previous func Retire func == previous func No Yes
  • 35. Branch Target Injection 35 def call_func(func, arg): func(arg) ATTACKTRAIN What was func? - What was func? attack_widget call_func(attack_widget, 1000) innocent, 10 call_func(innocent, 10) attack_widget, 1000
  • 36. Intel Microcode Updates 36 - Protect against Spectre V2 - Branch Target Injection - Indirect Branch Restricted Speculation (IBRS) - Stops attacks from code running at lower privilege levels - Stops attacks from code running on the sibling hyperthread (STIBP) - Indirect Branch Prediction Barrier (IBPB) - Stops attacks from code running at the same privilege level - Inserted at User-to-User and Guest-to-Guest transitions
  • 37. IBPB and IBRS Patches 37 def call_func(func, arg): func(arg) ATTACKTRAIN What was func? - What was func? - call_func(attack_widget, 1000) innocent, 10 call_func(innocent, 10) attack_widget, 1000 IBPB, IBRS
  • 38. Branch Target Injection 38 def call_func(func, arg): func(arg) Read func from memory Call func Retire Cache Miss Time What was func last time? Decode call func == previous func No
  • 39. Spectre V2 Branch Misses 39perf stat -e branch-misses
  • 41. Retpoline - Protects indirect branches/calls from speculative execution - Uses an infinite loop to do it 41 jmp rax call set_up_target speculative_loop: pause lfence jmp speculative_loop set_up_target: mov rax, [rsp] ret Before After Return Stack Buffer . . . speculative_loop Stack . . . speculative_loop
  • 42. Retpoline - Protects indirect branches/calls from speculative execution - Uses an infinite loop to do it 42 jmp rax call set_up_target speculative_loop: pause lfence jmp speculative_loop set_up_target: mov rax, [rsp] ret Before After Return Stack Buffer . . . speculative_loop Stack . . . rax
  • 43. Retpoline - Protects indirect branches/calls from speculative execution - Uses an infinite loop to do it 43 jmp rax call set_up_target speculative_loop: pause lfence jmp speculative_loop set_up_target: mov rax, [rsp] ret Before After Return Stack Buffer . . . speculative_loop Stack . . . rax
  • 44. Retpoline - Protects indirect branches/calls from speculative execution - Uses an infinite loop to do it 44 jmp rax call set_up_target speculative_loop: pause lfence jmp speculative_loop set_up_target: mov rax, [rsp] ret Before After Return Stack Buffer . . . speculative_loop Stack . . . rax
  • 45. Retpoline - Protects indirect branches/calls from speculative execution - Uses an infinite loop to do it 45 jmp rax call set_up_target speculative_loop: pause lfence jmp speculative_loop set_up_target: mov rax, [rsp] ret Before After Return Stack Buffer . . . speculative_loop Stack . . . rax
  • 46. Retpoline (Improved) - Check against a known target and direct branch 46 jmp rax cmp rax, known_target jne retpoline jmp known_target retpoline: call set_up_target speculative_loop: pause jmp speculative_loop set_up_target: mov rax, [rsp] ret Before After Direct Branch (fast)
  • 50. A Tale of Two Queries 50 q1-v2.4 ss_max-v2.4 SELECT count(*) AS total, count(ss_sold_date_sk) AS not_null_total, count(DISTINCT ss_sold_date_sk) AS unique_days, max(ss_sold_date_sk) AS max_ss_sold_date_sk, max(ss_sold_time_sk) AS max_ss_sold_time_sk, max(ss_item_sk) AS max_ss_item_sk, max(ss_customer_sk) AS max_ss_customer_sk, max(ss_cdemo_sk) AS max_ss_cdemo_sk, max(ss_hdemo_sk) AS max_ss_hdemo_sk, max(ss_addr_sk) AS max_ss_addr_sk, max(ss_store_sk) AS max_ss_store_sk, max(ss_promo_sk) AS max_ss_promo_sk FROM store_sales WITH customer_total_return AS (SELECT sr_customer_sk AS ctr_customer_sk, sr_store_sk AS ctr_store_sk, sum(sr_return_amt) AS ctr_total_return FROM store_returns, date_dim WHERE sr_returned_date_sk = d_date_sk AND d_year = 2000 GROUP BY sr_customer_sk, sr_store_sk) SELECT c_customer_id FROM customer_total_return ctr1, store, customer WHERE ctr1.ctr_total_return > (SELECT avg(ctr_total_return)*1.2 FROM customer_total_return ctr2 WHERE ctr1.ctr_store_sk = ctr2.ctr_store_sk) AND s_store_sk = ctr1.ctr_store_sk AND s_state = 'TN' AND ctr1.ctr_customer_sk = c_customer_sk ORDER BY c_customer_id LIMIT 100
  • 51. q1-v2.4 vs ss_max-v2.4 51perf stat -e raw_syscalls:sys_enter -a -I 1000
  • 54. array_index_nospec() 54 - Protects against Spectre V1 - Bounds Check Bypass - ~50 in the Linux kernel and drivers (not in Ubuntu) - Stops speculative array access by clamping the index if (index < size) { val = array[index]; probeArray[val]; } if (index < size) { index = array_index_nospec(index, size); val = array[index]; probeArray[val]; } Before After
  • 55. Speculative Store Bypass 55 - CVE-2018-3639 - “Variant 4” - Public Date: May 21, 2018 - Details: - https://access.redhat.com/security/vulnerabilities/ssbd - Ubuntu Command Line Parameter: - spec_store_bypass_disable=on
  • 61. Single Node TPC-DS Setup • Intel Core i7-4820k @ 3.70GHz (Ivy Bridge - ca. 2012) • 8 CPUs • 8GB of RAM • Disk: Western Digital Blue – WDC10EZEX-08M2NA0 – 1TB – 7200 rpm – 146MB/s sequential read (http://hdd.userbenchmark.com/) • Ubuntu 16.04.4 LTS (Xenial Xerus) – 64-bit server image – 4.4.0-116-generic Linux kernel 61
  • 62. Repositories - https://github.com/apache/spark.git - https://github.com/databricks/spark-sql-perf.git - https://github.com/databricks/tpcds-kit - https://github.com/speed47/spectre-meltdown-checker - https://github.com/brendangregg/pmc-cloud-tools - https://github.com/brendangregg/perf-tools 62