t bb - h ip h o p · ag end a ¥ m ultico re - parallelism - o pen parallel: ba ckg ro und and co...

49
TBB - HipHop !"#$ &’(’))#) !"#$%&’( #"’ *+,$-."’( &/0 1&’&,,(, 2"34+$-/5 Thursday, 27 January 2011

Upload: others

Post on 19-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

TBB - HipHop

!"#$%&'('))#)!"#$%&'()#"')*+,$-."'()&/0)1&'&,,(,)2"34+$-/5

Thursday, 27 January 2011

Page 2: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Integration of Intel's TBB into Facebook's

HipHopNicolás Erdödy

Lenz Gschwendtner

Sam Vilain

!"#$%&'('))#)!"#$%&'()#"')*+,$-."'()&/0)1&'&,,(,)2"34+$-/5

Thursday, 27 January 2011

Page 3: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

This presentation discusses Open Parallel's model, the background and

major technology changes that originated it, its first major project

(2010-2011) sponsored by Intel, and explains the invitation for the audience

to be part of this and following projects

Thursday, 27 January 2011

Page 4: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Agenda

• Multicore - Parallelism - Open Parallel: Background and Context

• TBB - HipHop

• The Future (what we can do)

Thursday, 27 January 2011

Page 5: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

The problem

Thursday, 27 January 2011

Page 6: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Certain things don't last forever

Thursday, 27 January 2011

Page 7: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Thursday, 27 January 2011

Page 8: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

The options

Thursday, 27 January 2011

Page 9: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

You can chose to ignore it

Thursday, 27 January 2011

Page 10: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Thursday, 27 January 2011

Page 11: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

You can wait for help

Thursday, 27 January 2011

Page 12: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Thursday, 27 January 2011

Page 13: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

You can discuss in committees

Thursday, 27 January 2011

Page 14: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Thursday, 27 January 2011

Page 15: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

It's better to aim high

Thursday, 27 January 2011

Page 16: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Thursday, 27 January 2011

Page 17: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Discuss Creative Solutions with all the

members of your Team

Thursday, 27 January 2011

Page 18: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Thursday, 27 January 2011

Page 19: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Parallelism is out there

Thursday, 27 January 2011

Page 20: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Thursday, 27 January 2011

Page 21: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

But has some problems

Thursday, 27 January 2011

Page 22: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Thursday, 27 January 2011

Page 23: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

And you learned it here: S... Happens!

Thursday, 27 January 2011

Page 24: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Thursday, 27 January 2011

Page 25: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

So before you go for help somewhere else

Thursday, 27 January 2011

Page 26: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Thursday, 27 January 2011

Page 27: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Let's discuss together, how to deal with it, because there are different options

Thursday, 27 January 2011

Page 28: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Thursday, 27 January 2011

Page 29: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Multicore“The Trouble with Multicore”

(Chipmakers are busy designing microprocessors that most programmers can't handle)

Prof David Patterson, Berkeley (IEEE Spectrum, July 2010)

An entrepreneur's dream: a big gap in the market!

Thursday, 27 January 2011

Page 30: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Parallelism

Peter Denning (ACM) – Jack Dennis (MIT)

The Resurgence of Parallelism

(Communications of ACM – June 2010)

Thursday, 27 January 2011

Page 31: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

About

Open Parallel Limited

Incorporated in 2010 in NZ, Open Parallel is a company supported by an ecosystem that works around parallel programming independently of the size of the problems.

Thursday, 27 January 2011

Page 32: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Background (2005 - 2008)

World45, first multicore software company in NZ - partner with Sun Microsystems

Niagara - NDPS - Otago University: first Sun OpenSparc Centre of Excellence outside US

Multicore Expo Santa Clara

Thursday, 27 January 2011

Page 33: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Those were the days!

!!!! We even went to the NBA!!

Thursday, 27 January 2011

Page 34: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Thursday, 27 January 2011

Page 35: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

The Transition 2008 - 2009

• MulticoreNZ - Japan

• Open Source Learning Lab

• LCA2010 - LCA2011 - Multicore and Parallel Computing Miniconf

Thursday, 27 January 2011

Page 36: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

HipHop - what is it

• PHP to C++ compiler

• developed by Facebook

• not the only one (phc)

Thursday, 27 January 2011

Page 37: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

why special

• dropped feature of core lang

• tuned towards performance

• no drop in replacement for Zend

Thursday, 27 January 2011

Page 38: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

why bother?

• reduces resource consumption by 50-70%

• can use threading

• did I mention performance?

Thursday, 27 January 2011

Page 39: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

WordPress -> HipHop

• patch set (remove eval statements)

• use hphpi for development

• results on github

Thursday, 27 January 2011

Page 40: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

performance difference 1

• WordPress LAMP stack

• crashed the VM

• clearly we pushed it too hard

Thursday, 27 January 2011

Page 41: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

performance difference 2

• WordPress HipHop stack

• responsive, worked nicely

• did we push it enough?

Thursday, 27 January 2011

Page 42: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Thursday, 27 January 2011

Page 43: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

TBB, what is it?

• open source threading lib

• easy to use

• Intel but runs on other platforms

Thursday, 27 January 2011

Page 44: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

TBB in HipHop

• already used in memory management

• parallel_for extension

• extended PHP language

Thursday, 27 January 2011

Page 45: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

TBB in WordPress

• run tasks in parallel

• hacked WordPress to use parallel_for

• compiled on HipHop

Thursday, 27 January 2011

Page 46: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

performance difference 3

• even faster than HipHop

• even less resources than HipHop

• TBB rocks

Thursday, 27 January 2011

Page 47: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

Thursday, 27 January 2011

Page 48: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

conclusion

• TBB and HipHop is a good fit

• HipHop can drastically speed up PHP

• HipHop can be hacked to certain needs

Thursday, 27 January 2011

Page 49: T BB - H ip H o p · Ag end a ¥ M ultico re - Parallelism - O pen Parallel: Ba ckg ro und and Co ntext ¥ TBB - Hi pHo p ¥ The Futur e (w ha t w e ca n do ) T h u rsd a y, 2 7 Ja

!"#$%&'('))#)!"#$%&'()#"')*+,$-."'()&/0)1&'&,,(,)2"34+$-/5

Thursday, 27 January 2011