Measuring and Optimizing Tail Latency
Kathryn S McKinley, Google
CRA-W Undergraduate Town Hall April 5th, 2018
Measuring and Optimizing Tail Latency Kathryn S McKinley, Google - - PowerPoint PPT Presentation
Measuring and Optimizing Tail Latency Kathryn S McKinley, Google CRA-W Undergraduate Town Hall April 5 th , 2018 Speaker & Moderator The image part with relationship ID rId3 was not found in the file. Lori Pollock Kathryn S McKinley Dr.
Measuring and Optimizing Tail Latency
Kathryn S McKinley, Google
CRA-W Undergraduate Town Hall April 5th, 2018
Speaker & Moderator
Kathryn S McKinley
Scientist at Google and previously was a Researcher at Microsoft and an Endowed Professorship at The University of Texas at Austin. Her research spans programming languages, compilers, runtime systems, architecture, performance, and energy. She and her collaborators have produced several widely used tools: the DaCapo Java Benchmarks (30,000+ downloads), the TRIPS Compiler, Hoard memory manager, MMTk memory management toolkit, and the Immix garbage collector. She served as program chair for ASPLOS, PACT, PLDI, ISMM, and CGO. She is currently a CRA and CRA-W Board member. Dr. McKinley was honored to testify to the House Science Committee (Feb. 14, 2013). She is an IEEE and ACM Fellow. She has graduated 22 PhD students.
Lori Pollock
Information Sciences at University of
program analysis for building better software maintenance tools, software testing, energy- efficient software and computer science
Scientist and was awarded the University of Delaware’s Excellence in Teaching Award and the E.A. Trabant Award for Women’s Equity.
The image part with relationship ID rId3 was not found in the file.Kathryn S McKinley, Google Xi Yang, Stephen M Blackburn, Md Haque, Sameh Elnikety, Yuxiong He, Ricardo Bianchini
4
Two second slowdown reduced revenue/user by 4.3%. [Eric Schurman, Bing] 400 millisecond delay decreased searches/user by 0.59%. [Jack Brutlag, Google]
5
Photo: Google/Connie Zhou
~ $30,000,000 Savings from 1% less work Lots more by not building a datacenter
6
~ $500,000 Cost of small datacenter ~3,000,000 US datacenters in 2016 ~ $1.5 trillion US Capital investment to date ~ $3,000,000,000 KW dollars / year
*Shehabi et al., United States Data Center Energy Usage Report, Lawrence Berkeley, 2016.
8
8
9
9
10
aggregator workers client
11
0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 2 4 6 8 1
20 40 60 80 100
Percentage of requests Latency (ms)
LC
Bursty, diurnal CDF changes slowly Slowest server dictates tail Orders of magnitude diff average & tail - 99th %tile
12
0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 2 4 6 8 1
20 40 60 80 100
Percentage of requests Latency (ms)
4
HT1 IPC
4
Core IPC
4
HT2 SHIM IPC
13
[ISCA’15 (Top Picks HM), ATC’16] HT1 HT2
counters tags
performance counters memory locations ✓ ✓ ✓ ✓
HT1 IPC = Core IPC – HT2 SHIM IPC
14
0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 2 4 6 8 1
20 40 60 80 100
Percentage of requests Latency (ms)
15
20 40 60 80 100 120 50 100 150 200
latency (ms)
Top 200 requests Network and networking queueing time Idle time CPU time Dispatch queueing time
latency Network & other Idle CPU work Queuing at worker
not noise
Network imperfections OS imperfections Long requests Overload
Diagnosing the tail with continuous profiling No Noise ise systems are not perfect Queuing Queuing too much load is bad, but so is over provisioning Wo Work many requests are long
In Insights Use the CDF off line
Long requests reveal themselves, treat them specially
16
17
The Tail at Scale, Dean & Barroso, CACM’13
18 18
0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 2 4 6 8 1
20 40 60 80 100
Percentage of requests Latency (ms)
All requests? CFD for cost & potential Fixed issue time 10 % reissued 5% reissued
noise
Optimal Reissue Policies for Reducing Tail Latencies, Kaler, He, & Elnickety , SPAA’17
19 19
0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 2 4 6 8 1
20 40 60 80 100
Percentage of requests Latency (ms)
Adding randomness to reissue makes one earlier reissue time d (vs n) optimal Probability is proportional to reissue budget & noise in tail
1-3% reissue w/ prob. p
noise
5% reissued
20
Optimal Reissue Policies for Reducing Tail Latencies, Kaler, He, & Elnickety , SPAA’17
21
0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 2 4 6 8 1
20 40 60 80 100
Percentage of requests Latency (ms)
Judicious parallelism
[ASPLOS’15]
DVFS faster on the tail
[DISC’14, MICRO’17]
Asymmetric multicore
[DISC’14, MICRO’17]
Parallelism historically for throughput Parallelism for tail latency Idea
23
24
Insight Approach Long requests reveal themselves Incrementally add parallelism to long requests – the tail – based on request progress & load Parallelism historically for throughput Parallelism for tail latency Idea
300 600 900 1200 1500 30 32 34 36 38 40 42 44 46 48
Tail latency ms Lucene RPS
Sequential 4 way Fixed interval 20 ms Fixed interval 100 ms Fixed interval 500 ms
Fi Fixe xed: add thread every d ms Dynamic: u : use l load
short delay good at low load long delay good at high load best at all loads
300 600 900 1200 1500 30 32 34 36 38 40 42 44 46 48
Tail latency ms Requests per Second
27
0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 2 4 6 8 1
20 40 60 80 100
Percentage of requests Latency (ms)
Judicious parallelism
[ASPLOS’15]✔
28
28
Diagnosing the tail with continuous profiling No Noise ise replication, systems are not perfect Queuing Queuing replication + judicious choice Wo Work judicious use of resources on long requests Request latency CDF is a powerful tool Tail efficiency ≠ average or throughput Hardware heterogeneity
29
Professional and Research Relationships
Your Academic Village
My Professional Village
– Undergrads, PhD students, post docs – Faculty, industrial researchers, staff, administrators
– Software engineers in all career stages – Managers, directors, admins, – in/out my management chain
Faculty Mentors
Don Johnson My Professor PhD Advisor
Ken Kennedy Dave Stemple
Building a Village
Networking is….
Building and sustaining professional relationships
relationship
Networking is not….
But I am Horrible at Small Talk
– Practice – Meet people – Learn – Go places – Volunteer! – Sustain your relationships
With whom do you network?
Peer Mentors
Mary Hall Doug Burger Margaret Martonosi
Your Village Will