My Photo
Name:
Location: Bloomington, Indiana, United States

Friday, April 09, 2010

Graham and Brent theorem for speedup when using multiprocessors or multicores

Since we are big into multicores these days and it would be useful to predict or make a conservative estimate the behavior of an application speedup as we throw more and more processors at it. Let us consider the two obvious extreme cases, one favorable the other unfavorable. The are embarrassingly parallel applications and strictly sequential applications respectively and we will have a look at an example in the reverse order.

Strictly Sequential.

Lets consider calculating the famous nth Fibonacci number and lets assume we do NOT know how to solve a second order recurrence using the clever mathematical way so we will just use the formula as it is. So starting from F0 and F1 we can calculate F2 and so fourth upto the nth number. So if we write a program to calculate Fi we can observe that it has a strict data dependency on Fi-1 and Fi-2. So in such data dependent cases there is no room for making things parallel. Such application obviously won't speed up as you throw more processors at the problem.


Fn+2 = Fn+1 + Fn


Embarrassingly parallel

Consider an application that requires adding two large matrices. Addition of two elements from the matrices are totally independent of any other element. So there is no data dependency in such a case and the matrices can be easily split into sub-problems and given to the number of processors that are available and can be made to run in parallel easily. In such applications programs could achieve linear speed up and in some cases with some clever caching techniques even super linear speedups can be achieved.

In the two cases discussed above we can calculate how an application may speedup in the boundary cases, but most applications that we encounter are in between strictly sequential and embarrassingly parallel. Most applications have certain degree of parallelism and some amount of data dependency which forces sequential behavior and analyzing speed up of such application is much harder. In this post we have a look at a clever theorem invented by Graham[1] and Brent[2] independently and one of the MIT talks i listened to consolidated their ideas to a very insightful theorem.

First Some naming conventions.

T_n - Time taken for the application to run when n processors are at its disposal. T_1 represent the sequential case and T_infinity represent that case where application may have as many processors as needed

based on above conventions we could define:

Parallelism = T_1/T_infinity
Speedup for p processors = T_1/T_p

An observation assuming no cache tricks to achieve super-linear speedup:

T_p > T_1/p

This simply mean that by having two processors you cannot cut the time exactly by half, it will always be a little more due to possible data dependencies and of course the extra overhead associated with making the application parallel.


Model

This theorem models a given application using a graph where nodes would represent computational units and edges would represent the data dependencies similar to the workflow idea. Graham and Brent argue that if you have infinite processors available for the application, the time will depend upon the critical path of the graph or longest path of the graph from start to finish. So T_infinity may also looked upon as the critical path time. They argue that the speedup that can be achieved depend on this critical path as well as the number of processors that is available to the scheduler at the execution of the application. Based on these two parameters they propose a upper bound to the time taken by an application when its presented with p processors. Upper bound of time is useful because it may allow you to provision your resources for worst case scenario.

Theorem:

T_p <= T_1/p + T_infinity


Theorem means an application with p processors at most would take time that is addition of sequential time / p and critical path time. Many techniques have since developed to reduce that upper bound but in my view this is the most insightful theorem of its nature and its simplicity makes it quite appealing when making an conservative estimate or during formal analysis.




[1]R. L. Graham. Bounds on multiprocessing timing anomalies. SIAM Journal on Applied
Mathematics, 17(2):416{429, March 1969
[2]Richard P. Brent. The parallel evaluation of general arithmetic expressions. Journal of
the ACM, 21(2):201{206, April 1974

Labels: , , , ,

67 Comments:

Blogger Shiney Julia said...

The Governor of the Commonwealth of Kentucky is the head of the executive branch of government in the U.S. state of Kentucky.


CRM Softwareraw wholefood

7:54 AM  
Blogger Super Saiyan said...

Following the resignation of George Papandreou, Lucas Papademos is sworn in as Prime Minister of Greece.


kuala lumpur hotel ratesbuy salvia

8:30 PM  
Blogger Super Saiyan said...

Perfume (English: /ˈpɝː.fjuːm/, French parfum pronounced: [paʁ.fœ̃]) is a mixture of fragrant essential oils and/or aroma compounds, fixatives, and solvents used to give the human body, animals, objects, and living spaces "a pleasant scent"


Movers in San Franciscobuy silver bullion

8:33 AM  
Blogger Super Saiyan said...

Combined with wide transparency, this results in the clear, colorless appearance of most natural diamonds.


Discount Voucher Codesdørgreb

8:39 AM  
Blogger Super Saiyan said...

They embark on a quest to destroy the One Ring made by the Dark Lord Sauron, and ensure his destruction.


steroidsCheap Car Hire In Barbados

8:43 AM  
Blogger Đẹp zai cóa gì sai said...

The Qing reached its height under the Qianlong Emperor in the 18th century, expanding beyond China's prior and later boundaries and including parts of modern Kazakhstan, Mongolia, Russian Far East and Burma, and overlord status over others including Korea, Vietnam, and Nepal.


online markedsføringstone veneer

5:54 PM  
Blogger blogcar said...

As we enter into the winter of our bridge construction season, the beginning of it brings news that a neighborhood street will be used for two way traffic
southern maryland real estateHouston Apartments

9:45 PM  
Blogger blogcar said...

Read it. I mean, you like Blade Runner, right? Ok. So read it!
Cisco Securityestimating software

11:07 PM  
Blogger blogcar said...

Combined with wide transparency, this results in the clear
transfer factor plus tri-factor formulacelebrity news

8:40 PM  
Blogger blogcar said...

They embark on a quest to destroy the One Ring made by the Dark Lord Sauron, and ensure his destruction.
corrugated tanksDamp cigaret

8:59 PM  
Blogger Enricque said...

The Battle of Vukovar (Croatian: Bitka za Vukovar, Serbian: Битка за Вуковар) was an 87-day siege of Vukovar in eastern Croatia by the Yugoslav People's Army (JNA), supported by various paramilitary forces from Serbia, between August and November 1991Sorrento Real Estatefresno church

9:44 PM  
Blogger Đẹp zai cóa gì sai said...

The crew carried a plush, red toy bird from the popular smartphone game Angry Birds inside their space capsule. The doll belonged to Shkaplerov's 5-year-old daughter. Hanging from a long cord and subject to G-forces, the bird swung and returned to its original position during the early stages of the flight


mobile web site designwebsites perth

9:49 PM  
Blogger blogcar said...

If you haven't already noticed by now, Android.com has gotten an overhaul. It makes the site more inviting and user friendly, giving users a rundown of
the republic of texasweb design for real estate

8:04 PM  
Blogger blogcar said...

Heads Up! HostGator is having their once-a-year Half Off Hosting deal RIGHT NOW!
pearlDebenhams Voucher Codes

10:40 PM  
Blogger blogcar said...

Nice to see that Om's guys are finally echoing the sentiments of SiliconANGLE on Big Data and Hadoop. We've been saying the same things since the start of the year.
claw foot tub faucetsGun Oil

10:42 PM  
Blogger Enricque said...

The idea that Jimmy Kudo would be turned into a child stemmed from the idea of a Tortoiseshell cat Sherlock Holmes as a protagonist.[3] Gosho Aoyoma's idea was the cat would indicate the crucial evidence needed to solve the case; a performance the child-turned Kudo does to help those around with the investigation.kenmare hotelReal Estate Hervey Bay

1:31 AM  
Blogger Enricque said...

With questions concerning overseas deployment resolved, the division's respective commands were formed in May and June 1940, and at British Prime Minister Winston Churchill's request, it was deployed to the United Kingdom between 1 August and 25 December 1940.vestidos de fiestaEducation Franchise

9:33 PM  
Blogger blogcar said...

I only love Christians because Jesus said we should. ;)
health insurance WyomingIT Support UK

1:54 AM  
Blogger blogcar said...

Some really nice shots in there. I would love to try and get something like this going over here in Ireland once I get my camera, maybe in the new year.
websites for beginnersconstruction estimating

1:58 AM  
Blogger blogcar said...

I snapped a part from one of your posts on how authoritative is different to authoritarian
Microlon Engine TreatmentVolkswagen Control Arm

2:00 AM  
Blogger blogcar said...

IT workers are treated with thinly veiled contempt in many organisations - Tom Brewster finds out why
Sales Recruitment AgenciesLOS ANGELES CAR SERVICE

8:14 AM  
Blogger Đẹp zai cóa gì sai said...

Asa Candler was tentative about bottling the drink, but two entrepreneurs from Chattanooga, Tennessee, Benjamin F. Thomas and Joseph B. Whitehead, proposed the idea and were so persuasive that Candler signed a contract giving them control of the procedure for only one dollar

clases particulares de alemén en Santiago de ChileQuail West Naples Florida

11:05 AM  
Blogger Đẹp zai cóa gì sai said...

An army officer of Slavic origin from the Pontus region, Thomas rose to prominence under the protection of general Bardanes Tourkos


botoxfrases tuenti

8:30 PM  
Blogger _Chỉ yêu mình em_ said...

In common parlance, the term jet engine loosely refers to an internal combustion airbreathing jet engine (a duct engine). These typically consist of an engine with a rotary (rotating) air compressor powered by a turbine ("Brayton cycle"), with the leftover power providing thrust via a propelling nozzle.


DJ Chuck T mixtapesRO-120

8:55 AM  
Blogger _Chỉ yêu mình em_ said...

The United Kingdom expels all Iranian diplomats from the country following an attack on its embassy in Tehran.


heatersInterior Designer Miami

7:00 PM  
Blogger _Chỉ yêu mình em_ said...

As the mass of solid fuel is melted and consumed, the candle grows shorter. Portions of the wick that are not emitting vaporized fuel are consumed in the flame.


sonia rykielvegetables for dogs

9:06 AM  
Blogger bạn park said...

The arrival of Michael Jordan, in particular, ushered in a new era of commercial bounty for the NBA. With him came his flair and talent for the game, and that brought in shoe contracts from Nike which helped to give the league even more national attention. Jordan and the two other premier basketball legends of the 1980s, Larry Bird and Magic Johnson, took the game to new heights of popularity and profit. By 2004, Stern oversaw the NBA expand from 10 to 30 franchises (since 1966), expand into Canada, and televise games in countries around the worldfurnace partsCarnival in Rio

6:33 PM  
Blogger _Chỉ yêu mình em_ said...

Jupiter has been explored on several occasions by robotic spacecraft, most notably during the early Pioneer and Voyager flyby missions and later by the Galileo orbiter.


Outerwear salescarbonfolie

7:18 AM  
Blogger _Chỉ yêu mình em_ said...

Since a helium atom has about four times as much mass as a hydrogen atom, the composition changes when described as the proportion of mass contributed by different atoms.


online businessbest price kumho tyres

7:31 AM  
Blogger bạn park said...

Under the Laws, the two basic states of play during a game are ball in play and ball out of play. From the beginning of each playing period with a kick-off until the end of the playing period, the ball is in play at all times, except when either the ball leaves the field of play, or play is stopped by the referee.vvscheap wedding cake topper

2:46 AM  
Blogger _Chỉ yêu mình em_ said...

This was to address the limited range of existing interceptor aircraft compared to the greater range of new bomber designs.


as per excel spreadsheetIT Support services

10:20 PM  
Blogger _Chỉ yêu mình em_ said...

Although black is sometimes described as an "achromatic", or hueless, color, in practice it can be considered a color, as in expressions like "black cat" or "black paint".



exhibition design companyrc hobby store

10:25 PM  
Blogger _Chỉ yêu mình em_ said...

If appropriate proportions of three primary pigments are mixed, the result reflects so little light as to be called "black".


salle mariage marseilleivr prompts

10:36 PM  
Blogger Enricque said...

A hook was installed along the aircraft's center of gravity; in flight, it retracted to lie flat in the upper part of the nose.[13] The aircraft had an empty weight just short of 4,000 pounds (1.8 t).Mann sucht FrauAtlanta Wedding Catering

11:19 PM  
Blogger bạn park said...

It is also Catholic belief that in objective reality, not merely symbolically, the wheaten bread and grape wine are converted into Christ's body and blood, a conversion referred to as transubstantiation,transfer factor plusdecoratiefolie

4:43 AM  
Blogger bạn park said...

Next the Priest calls upon the people to pray and everybody, together with the Priest, observes a brief silence so that they may become aware of being in God’s presence and may call to mind their intentions. Then the Priest pronounces the prayer usually called the “Collect”Interactive DisplaysAudio Production

5:27 AM  
Blogger Games4And said...

A crystal or crystalline solid is a solid material whose constituent atoms, molecules, or ions are arranged in an orderly repeating pattern extending in all three spatial dimensions.


best ecig 2011Medicos dentistas

5:56 AM  
Blogger Administrator! said...

She was brown with the dust and draped with the cobwebs which had come from the walls of her hiding-place. Her face, too, was streaked with grime, and at the best she could never have been handsome, for she had the exact physical characteristics which Holmes had divined, with, in addition, a long and obstinate chin. What with her natural blindness, and what with the change from dark to light, she stood as one dazed, blinking about her to see where and who we were. And yet, in spite of all these disadvantages, there was a certain nobility in the woman's bearing -- a gallantry in the defiant chin and in the upraised head, which compelled something of respect and admiration.
offene jobsRoofers Salem Oregon

6:00 AM  
Blogger bạn park said...

Production methods have been streamlined since colonial days, yet remain basically the same. Sap must first be collected and boiled down to obtain pure syrup without chemical agents or preservativeswind power generationarticle writing service

11:24 PM  
Blogger depchaick said...

The Life and Advent Union was founded by George Storrs in the year of 1863. He had established The Bible Examiner in 1842. It merged with the Adventist Christian Church in 1964reverse mortgages how they workDebt Settlement Company

9:36 PM  
Blogger depchaick said...

The Primitive Advent Christian Church later separated from a few congregations in West Virginia.sports welcome matsErotic Lingerie

9:39 PM  
Blogger depchaick said...

His biography notes, "Storrs, while a member of the New Hampshire Conference, was a strong man, able and influential in its councils, and the beloved pastor of several important churches.ac repair nycPenisringe

10:02 PM  
Blogger Administrator! said...

Peter Kent said the protocol "does not represent a way forward for Canada" and the country would face crippling fines for failing to meet its targets.

The move, which is legal and was expected, makes it the first nation to pull out of the global treaty.
ventiladordepression help for you

8:54 AM  
Blogger Topol M said...

Before drainage, the Everglades were an interwoven mesh of marshes and prairies covering 4,000 square miles (10,000 km2)





nikon d3100 reviewpet shop

9:09 AM  
Blogger depchaick said...

A significant amount of water is also diverted for use in California; occasionally (formerly naturally and consistently) the flow of water reaches northern Mexico.single dating onlineEasy Opener

10:48 PM  
Blogger Topol M said...

His party arrived at the pole on 14 December 1911, five weeks ahead of a British team led by Robert Falcon Scott. Amundsen and his companions returned safely to their base, and later learned that Scott and his four companions had died on their return journey.





Arthritis Helpcorporate video production

12:01 AM  
Blogger Topol M said...

Amundsen's initial plans had been to explore the Arctic, but he decided to go south on hearing that both Frederick Cook and Robert E. Peary were claiming to have reached the North Pole.






stone veneerErotic Lingerie

12:04 AM  
Blogger Enricque said...

Amundsen's initial plans focused on the Arctic and the conquest of the North Pole by means of an extended drift in an icebound ship. He obtained the use of Fridtjof Nansen's polar exploration ship Fram, and undertook extensive fundraising activities.Passages MalibuArthritis Aids

12:05 AM  
Blogger depchaick said...

Colorado also has some African-American communities located in Denver, in the neighborhoods of Montbello, Green Valley Ranch, Park Hill, Five Points, Whittier, and many other East Denver areas. A decent amount of African Americans are also found in Colorado Springs on the east and southeast side of the city. Banniéres Personnaliséescrimp tool

8:34 AM  
Blogger 1 said...

Electronic Cigarettesfloor home plansProbation literally means testing of behaviour or abilities. In a legal sense, an offender on probation is ordered to follow certain conditions set forth by the court, often under the supervision of a probation officer.

7:33 AM  
Blogger 1 said...

The population of Baghdad as of 2011 is approximately 7,216,040, making it the largest city in IraqAustralia ShoesKitchen Accessories

1:15 AM  
Blogger ss5360 said...

Eggs x 3: Huevos Raviolos, Egg Roll Egg Rolls, and Twice Baked Egg-atos. Posted In: Food | Posted By: Anj. Tweet. That's right. After delving into the wonderful world of eggs for dinner, we decide...

pure acai berry maxdetox foot bath

12:06 AM  
Blogger Topol M said...

The cost of inert gas limited its use in steels until several years later, when the use of semi-inert gases such as carbon dioxide became common. Further developments during the 1950s and 1960s gave the process more versatility and as a result, it became a highly used industrial process.



Pashminaпроизводство штампов пресс форм

11:02 AM  
Blogger Topol M said...

In 1958 and 1959, the short-arc variation of GMAW was released, which increased welding versatility and made the welding of thin materials possible while relying on smaller electrode wires and more advanced power supplies. It quickly became the most popular GMAW variation




office coffee machinesmarriage coaching

11:36 AM  
Blogger blogcar said...

Go to savemore.com and signup for a free account when you get prompted for a free $10 dollar credit as a new member (little window pops up)
HämorrhoidenDual Diagnosis Rehab Los Angeles

11:46 PM  
Blogger 1 said...

Terminal bronchioles contain a limited number of ciliated cells and no goblet cells. Clara cells are non-ciliated, rounded protein secreting cells. group buying in south africatop 10 lists

12:03 AM  
Blogger MANHHIEU said...

is a mixture of fragrant essential oils and/or aroma compounds, fixatives, and solvents used to give the human body, animals, objects, and living spaces "a pleasant scent"
ล่องเรือToyota Prius Steering Rack

3:26 AM  
Blogger Arismixtapes said...

I never fully understood this until I read this blog. Excellent info, very easy to read.
Styles P mixtapes
DJ Whoo Kid mixtapes

7:44 PM  
Blogger blogcar said...

Találtam egy kis weboldalt üzletről, befektetésről, gondolkodásmódról, ami szerintem Téged is érdekelne! Mellesleg szerintem zseniális és teljesen ingyenes. Én már olvasom és most tartok a 7. résznél, nagyon ajánlom Neked is.
suzanne gudakunstTop 10 Fastest Animals

11:51 PM  
Blogger blogcar said...

De La Soul - Buddy (Remix) feat. Jungle Brothers, Q-Tip, Monie Love & Queen Latifah
security bekleidung auf rechnung kaufenCar Insurance Comparison Chart

12:52 AM  
Blogger kratos____s said...

designer clothingtest taking strategiesThe Governor of the Commonwealth of Kentucky is the head of the executive branch of government in the U.S. state of Kentucky.

11:52 AM  
Blogger SLeES said...

Dancing Rain was bred by Swettenham Stud, an Australian breeding operation owned by the Sangster family,[2] and was foaled on 24 April 2008[1] at Camas Park Stud in TipperaryNorth American power supply cordInternational Business Class Tickets

12:16 PM  
Blogger kysirong said...

fine jewelryvestidos para madrinasPerfume (English: /ˈpɝː.fjuːm/, French parfum pronounced: [paʁ.fœ̃]) is a mixture of fragrant essential oils and/or aroma compounds, fixatives, and solvents used to give the human body, animals, objects, and living spaces "a pleasant scent"

3:54 AM  
Blogger Enricque said...

London's 43 universities form the largest concentration of higher education in Europe.[19] In 2012 London will become the first city to host the modern Summer Olympic Games three times.[20]dog cancer dietTransfer Factor Glucoach

8:31 AM  
Blogger JACKLEE said...

In 1953 the French protectorate of Cambodia was granted full independence by France, allowing the young King Norodom Sihanouk to lead the government of the first post-colonial state in French-ruled IndochinaPowerboat LessonsFlorida VA Loan

12:20 PM  
Blogger den_den said...

This comment has been removed by the author.

9:58 AM  
Blogger den_den said...

The two insist that the show is still more about "kids being kids" and "what it's like to be in [elementary school] in America",[39] stating that the introduction of a more satirical element to the series was the result of the two adding more of a "moral center" to the show so that it would rely less on simply being crude and shocking in an attempt to maintain an audience.[34][35] While profane, and with a tendency to sometimes be cynical, Parker notes that there is still an "underlying sweetness" aspect to the child characters,[32] and Time described the boys as "sometimes cruel but with a core of innocence".[9] Usually, the boys and/or other characters ponder over what has transpired during an episode and convey the important lesson taken from it with a short monologue. During earlier seasons, this speech would commonly begin with a variation of the phrase "You know what? I've learned something today.Car Insurance Guide2003 Honda Civic AC Compressor

9:58 AM  

Post a Comment

<< Home