C o z : F i n d i n g C o d e t h a t C o u n - - PowerPoint PPT Presentation

c o z f i n d i n g c o d e t h a t c o u n t s w i t h c
SMART_READER_LITE
LIVE PREVIEW

C o z : F i n d i n g C o d e t h a t C o u n - - PowerPoint PPT Presentation

C o z : F i n d i n g C o d e t h a t C o u n t s w i t h C a s u a l P r o f i l i n g C h a r l i e C u r t s i n g e r , E m e r y D . B e r g e r G r i n e l l C


slide-1
SLIDE 1

2 2 . 1 . 2 1 5 P a p e r

  • R

e a d i n g G r

  • u

p

C

  • z

: F i n d i n g C

  • d

e t h a t C

  • u

n t s w i t h C a s u a l P r

  • f

i l i n g

C h a r l i e C u r t s i n g e r , E m e r y D . B e r g e r G r i n e l l C

  • l

l e g e U n i v e r s i t y

  • f

M a s s a c h u s e t t s A m h e r s t P r e s e n t e d a t S O S P 2 1 5

slide-2
SLIDE 2

2 2 . 1 . 2 1 5 P a p e r

  • R

e a d i n g G r

  • u

p

C

  • z

: F i n d i n g C

  • d

e t h a t C

  • u

n t s w i t h C a s u a l P r

  • f

i l i n g

C h a r l i e C u r t s i n g e r , E m e r y D . B e r g e r G r i n e l l C

  • l

l e g e U n i v e r s i t y

  • f

M a s s a c h u s e t t s A m h e r s t P r e s e n t e d a t S O S P 2 1 5

C a u s a l

slide-3
SLIDE 3

2 2 . 1 . 2 1 5 P a p e r

  • R

e a d i n g G r

  • u

p

M

  • t

i v a t i

  • n

C

  • n

v e n t i

  • n

a l P r

  • f

i l e r s :

  • d
  • n

' t t e l l y

  • u

w h a t t

  • p

t i m i z e

  • d
  • n

' t t e l l y

  • u

a b

  • u

t g a i n s

  • a

r e n

  • t

r e a l l y m a d e f

  • r

c

  • n

c u r r e n c y

slide-4
SLIDE 4

2 2 . 1 . 2 1 5 P a p e r

  • R

e a d i n g G r

  • u

p 4

M

  • t

i v a t i

  • n
slide-5
SLIDE 5

2 2 . 1 . 2 1 5 P a p e r

  • R

e a d i n g G r

  • u

p 5

I d e a

P e r f

  • r

m p e r f

  • r

m a n c e e x p e r i m e n t s d u r i n g p r

  • g

r a m e x e c u t i

  • n

t h a t m e a s u r e h

  • w

f a s t a p r

  • g

r a m g e t s i f y

  • u

s l

  • w

d

  • w

n a s p e c i f i c l i n e

  • f

c

  • d

e

slide-6
SLIDE 6

2 2 . 1 . 2 1 5 P a p e r

  • R

e a d i n g G r

  • u

p 6

I d e a

slide-7
SLIDE 7

2 2 . 1 . 2 1 5 P a p e r

  • R

e a d i n g G r

  • u

p 7

I mp l e me n t a t i

  • n

1) Startup c

  • z

r u n

  • <

p r

  • g

r a m > < a r g s > 2) Experiment Initialization randomly choose source line and speedup (5% steps) 3) Apply virtual speedup sample each thread every ms, apply virtual speedup when selected source line runs 4) Ending virtual experiment after predetermined time, at least five visits to selected line, else double time 5) Produce profile analyze all logged results, calculate speedups 6) Interpret casual profiles

slide-8
SLIDE 8

2 2 . 1 . 2 1 5 P a p e r

  • R

e a d i n g G r

  • u

p 8

C h a l l a n g e s

Blocking: Who has to wait when? → I/O simple (delay after io finishes) → Synchronization primitives: hard, don't punish twice

slide-9
SLIDE 9

2 2 . 1 . 2 1 5 P a p e r

  • R

e a d i n g G r

  • u

p 9

R e s u l t s ( d e d u p )

While toop in h a s h t a b l e _ s e a r c h function

9 % S p e e d u p

slide-10
SLIDE 10

2 2 . 1 . 2 1 5 P a p e r

  • R

e a d i n g G r

  • u

p 1

R e s u l t s ( f e r r e t )

2 1 % S p e e d u p

Improvement

  • pportunities in three of

the four threads

slide-11
SLIDE 11

2 2 . 1 . 2 1 5 P a p e r

  • R

e a d i n g G r

  • u

p 1 1 b

R e s u l t s ( S Q L i t e )

2 6 % S p e e d u p

Remove unnecessary 'vtable' calls

slide-12
SLIDE 12

2 2 . 1 . 2 1 5 P a p e r

  • R

e a d i n g G r

  • u

p 1 2

R e s u l t s ( mo r e )

Benchmark Cause Improvement fluidanimate Custom barrier 37.5% streamcluster Custom barrier 68% memcached 'false' Lock sharing 9% blackscholes Common subexpressions 2.6% swaptions Inefficient array handling 15%

slide-13
SLIDE 13

2 2 . 1 . 2 1 5 P a p e r

  • R

e a d i n g G r

  • u

p 1 3

E fg i c i e n c y

slide-14
SLIDE 14

2 2 . 1 . 2 1 5 P a p e r

  • R

e a d i n g G r

  • u

p 1 4

D i s c u s s i

  • n
  • Cool Idea
  • How long do you have to sample for reasonable coverage of

148k lines of sqlite? (1ms, each 5 times, so 500s? How is the coverage of this?)