1 / 28

A Static Load-Balancing Scheme for Parallel XML Parsing on Multicore CPUs

A Static Load-Balancing Scheme for Parallel XML Parsing on Multicore CPUs. Yinfei Pan1, Wei Lu2, Ying Zhang1, Kenneth Chiu1 1. Department of Computer Science, State University of New York, Binghamton 2. Computer Science Department, Indiana University

keenan
Download Presentation

A Static Load-Balancing Scheme for Parallel XML Parsing on Multicore CPUs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Static Load-Balancing Scheme for Parallel XML Parsing on Multicore CPUs Yinfei Pan1, Wei Lu2, Ying Zhang1, Kenneth Chiu1 1. Department of Computer Science, State University of New York, Binghamton 2. Computer Science Department, Indiana University ypan3@binghamton.edu, kchiu@cs.binghamton.edu 碩資工一甲廖祥虎 1098308113

  2. 大綱 介紹 概述 任務分割 任務分配 平行剖析 效能結果 結論

  3. 摘要 • 如何達到平行XML文件? • 軟體方法:DOM 、 SAX。 • 硬體方法:CPU內多個核心。 • 從本篇論文中所提出的方法是? • 主要優點是? • 減少同步問題和負載平衡的額外負擔。 Company Logo

  4. 1. 介紹 • SAX: • 全名: Simple API for XML 。 • 是個循序存取XML的解析器API 。 • 優點:記憶體使用量遠低DOM。 • 缺點:某些種類XML需要存取整份文件。 • DOM(文件物件模型): • 全名: Document Object Model 。 • 優點:它內置在很多應用程式中。 • 缺點:記憶體使用量高。 Company Logo

  5. 2. 概述 • 如何達到平行剖析XML? • 管線處理。 • 資料平行:PXP結構 • 資料平行的四個步驟: • Pre-parsing • Task partitioning • Parallel parsing • Post-parsing Company Logo

  6. 2. 概述 • PXP結構 第三、四 部分介紹 第五部分介紹

  7. 2. 概述 root xmlns <root xmlns=“www.indiana.edu”> <foo id=“0”>hello</foo> <bar> <!– comment --> <?name pidata?> <a>world</a> </bar> </root> foo bar a comment id hello pidata world

  8. 3. 任務分割 • 我們將XML文件分割成數個區塊,每一個區塊表示一個任務。 • 此階段的目標: • 中找出一組任務集合。 • 對每個任務做最佳的運作。 • 分割方式: • 靜態分割。 • 動態分割。 Company Logo

  9. 3.1 子樹任務 Company Logo

  10. 3.1 子樹任務

  11. 3.1 子樹任務 永久的DOM節點 臨時的DOM節點

  12. 3.1 子樹任務

  13. 3.2 陣列任務 如果孩子的數目大於一定的限制時,把一個節點作為陣列。

  14. 3.2 陣列任務

  15. 3.2 陣列任務 Company Logo

  16. 4. 任務分配 • 此階段主要目標: • 將分割好的任務均衡的分配給thread。 • 兩種任務分配: • 子樹任務。 • 陣列任務。 • 分配步驟: • 1.我們把XML分割成任務。 • 2.用FIFO循序的方法把陣列任務分配給thread 。 • 3.接著把子樹任務也分配給thread 。 Company Logo

  17. 5. 平行剖析 • 使用的剖析器: libxm12。 • 是Gnome專案開發的可跨平台XML 剖析器。 • 它是根據MIT License的 免費軟體。 • 剖析時使用的libxm12函數: • xmlParseInNodeContext() • xmlReplaceNode() • xmlAddChildList() Company Logo

  18. 5. 平行剖析

  19. 5. 平行剖析

  20. 6. 效能結果 • 硬體: • Sun Fire T1000的機器,6核心且24thread。 • library版本: • libxml22.6.16 。 • 結果探討: • Performance Breakdown。 • Speedup and Efficiency Analysis。 • Scalability Analysis。

  21. 6. 效能結果 • XML的文件: • 來源:Protein Data Bank。 • 它由兩個大陣代表分子資料,以及一組元素表示分子屬性。

  22. 6.1 Performance Breakdown 53% 13% 0.57% 0.17%

  23. 6.2 Speedup and Efficiency Analysis 6 12 18 24 30

  24. 6.2 Speedup and Efficiency Analysis

  25. 6.2 Speedup and Efficiency Analysis

  26. 6.3 Scalability Analysis Speedup大約3.7 。 Speedup大約2.5 。 Speedup大約1.5 。 當文件大小超過256KB時,有比較明顯的差異。

  27. 7. 結論 • 我們證明靜態剖析構想在多核心電腦且一般XML文件架構,可擴展性和效能上比動態更好。 • 靜態負載平衡構想最重要,是可以直接使用目前已經有的XML剖析器。 • 未來發展: • 一個混合的解決方案,它可以提供靜態和動態負載平衡控制。 • 動態構想可以考慮改善地方: work-stealing、scheduling policies and lock-free structures。 Company Logo

  28. Thank You ! www.themegallery.com

More Related