大數(shù)據(jù)技術(shù)基礎(chǔ)培訓(xùn)-GraphLab技術(shù)培訓(xùn)_第1頁
大數(shù)據(jù)技術(shù)基礎(chǔ)培訓(xùn)-GraphLab技術(shù)培訓(xùn)_第2頁
大數(shù)據(jù)技術(shù)基礎(chǔ)培訓(xùn)-GraphLab技術(shù)培訓(xùn)_第3頁
大數(shù)據(jù)技術(shù)基礎(chǔ)培訓(xùn)-GraphLab技術(shù)培訓(xùn)_第4頁
大數(shù)據(jù)技術(shù)基礎(chǔ)培訓(xùn)-GraphLab技術(shù)培訓(xùn)_第5頁
已閱讀5頁,還剩25頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、大數(shù)據(jù)技術(shù)基礎(chǔ)培訓(xùn)1GraphLab 技術(shù)培訓(xùn)2Social Media3圖用來編碼/描述知識和聯(lián)系::Big: billions of vertices and edges and rich metadataAdvertisingScienceWeb人事實產(chǎn)品興趣想法4圖是機器學(xué)習(xí)和數(shù)據(jù)挖掘的重要基礎(chǔ)之一發(fā)現(xiàn)有影響力的人或者信息發(fā)現(xiàn)社區(qū)或者社交圈或者團(tuán)伙精準(zhǔn)廣告/產(chǎn)品定位 復(fù)雜數(shù)據(jù)/知識依賴性建模圖并行算法的特性DependencyGraphIterativeComputationWhat I LikeWhat My Friends LikeFactored Computation 為什么M

2、apReduce不合適Map-Reduce不能高效表示依賴圖User must code substantial data transformations Costly data replicationIndependent Data RowsSlowProcessor為什么MapReduce不合適(2)Map-Reduce 無法高效描述迭代算法:DataDataDataDataDataDataDataDataDataDataDataDataDataDataCPU 1CPU 2CPU 3DataDataDataDataDataDataDataCPU 1CPU 2CPU 3DataDataDat

3、aDataDataDataDataCPU 1CPU 2CPU 3IterationsBarrierBarrierBarrier為什么MapReduce不合適(3)圖算法通常只有一部分?jǐn)?shù)據(jù)(子圖)需要計算:DataDataDataDataDataDataDataDataDataDataDataDataDataDataCPU 1CPU 2CPU 3DataDataDataDataDataDataDataCPU 1CPU 2CPU 3DataDataDataDataDataDataDataCPU 1CPU 2CPU 3IterationsBarrierBarrierBarrier為什么MapRedu

4、ce不合適(4)Hadoop Map/Reduce沒有為迭代算法優(yōu)化DataDataDataDataDataDataDataDataDataDataDataDataDataDataCPU 1CPU 2CPU 3DataDataDataDataDataDataDataCPU 1CPU 2CPU 3DataDataDataDataDataDataDataCPU 1CPU 2CPU 3IterationsDisk PenaltyDisk PenaltyDisk PenaltyStartupPenaltyStartup PenaltyStartup Penalty10圖并行算法抽象A user-def

5、ined Vertex-Program runs on each vertexGraph constrains interaction along edgesUsing messages (e.g. Pregel PODC09, SIGMOD10)Through shared state (e.g., GraphLab UAI10, VLDB12)Parallelism: run multiple vertex programs simultaneously11示例Whats the popularityof this user?Popular?Depends on popularityof

6、her followersDepends on the popularity their followersPageRank AlgorithmUpdate ranks in parallel Iterate until convergenceRank of user iWeighted sum of neighbors ranks12BarrierPregel (Giraph)Bulk Synchronous Parallel Model:ComputeCommunicate14The Pregel AbstractionVertex-Programs interact by sending

7、 messages.iPregel_PageRank(i, messages) : / Receive all the messages total = 0 foreach( msg in messages) : total = total + msg / Update the rank of this vertex Ri = 0.15 + total / Send new messages to neighbors foreach(j in out_neighborsi) : Send msg(Ri * wij) to vertex jMalewicz et al. PODC09, SIGM

8、OD1015The GraphLab AbstractionVertex-Programs directly read the neighbors stateiGraphLab_PageRank(i) / Compute sum over neighbors total = 0 foreach( j in in_neighbors(i): total = total + Rj * wji / Update the PageRank Ri = 0.15 + total / Trigger neighbors to run again if Ri not converged then foreac

9、h( j in out_neighbors(i): signal vertex-program on jLow et al. UAI10, VLDB12自然圖16Power-Law Degree Distribution冪律分布 長尾分布17Power-Law Degree DistributionTop 1% of vertices are adjacent to50% of the edges!High-Degree VerticesNumber of VerticesAltaVista WebGraph1.4B Vertices, 6.6B EdgesDegreeMore than 10

10、8 vertices have one neighbor.Asynchronous Executionrequires heavy locking (GraphLab)18Challenges of High-Degree VerticesTouches a largefraction of graph(GraphLab)Sequentially processedgesSends manymessages(Pregel)Edge meta-datatoo large for singlemachineSynchronous Executionprone to stragglers (Preg

11、el)19Power-Law Degree Distribution“Star Like” MotifPresidentObamaFollowers20Power-Law Graphs are Difficult to PartitionPower-Law graphs do not have low-cost balanced cuts Leskovec et al. 08, Lang 04Traditional graph-partitioning algorithms perform poorly on Power-Law Graphs.Abou-Rjeili et al. 06CPU

12、1CPU 2Machine 1Machine 221Split High-Degree verticesNew Abstraction Equivalence on Split VerticesPowerGraphProgramFor ThisRun on ThisGather InformationAbout NeighborhoodUpdate VertexSignal Neighbors &Modify Edge Data22A Common Pattern forVertex-ProgramsGraphLab_PageRank(i) / Compute sum over neighbo

13、rs total = 0 foreach( j in in_neighbors(i): total = total + Rj * wji / Update the PageRank Ri = 0.1 + total / Trigger neighbors to run again if Ri not converged then foreach( j in out_neighbors(i) signal vertex-program on j23GAS DecompositionY+ + YParallelSumUser Defined:Gather( ) Y1 + 2 3YGather (R

14、educe)Apply the accumulated value to center vertexApplyUpdate adjacent edgesand vertices.ScatterAccumulate information about neighborhoodY+ User Defined:Apply( , ) YYYYUpdate Edge Data &Activate NeighborsUser Defined:Scatter( ) YY24PageRank in PowerGraphPowerGraph_PageRank(i)Gather( j i ) : return w

15、ji * Rjsum(a, b) : return a + b;Apply(i, ) : Ri = 0.15 + Scatter( i j ) :if Ri changed then trigger j to be recomputedMachine 2Machine 1Machine 4Machine 325Distributed Execution of a PowerGraph Vertex-Program1234+ + + YYYYYYYYGatherApplyScatterMasterMirrorMirrorMirror26Minimizing CommunicationYYYA v

16、ertex-cut minimizes machines each vertex spansPercolation theory suggests that power law graphs have good vertex cuts. Albert et al. 2000Communication is linear in the number of machines each vertex spansNew Approach to PartitioningRather than cut edges:we cut vertices:27CPU 1CPU 2YYMust synchronize

17、 many edgesCPU 1CPU 2YYMust synchronize a single vertexNew Theorem:For any edge-cut we can directly construct a vertex-cut which requires strictly less communication and storage.System DesignImplemented as C+ APIUses HDFS for Graph Input and OutputFault-tolerance is achieved by check-pointing Snapsh

18、ot time 5 seconds for twitter network28EC2 HPC NodesMPI/TCP-IPPThreadsHDFSPowerGraph (GraphLab2) SystemImplemented Many AlgorithmsCollaborative FilteringAlternating Least SquaresStochastic Gradient DescentSVDNon-negative MFStatistical InferenceLoopy Belief PropagationMax-Product Linear ProgramsGibbs SamplingGraph Analyti

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論