sector-sphere

1,190 views
1,080 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,190
On SlideShare
0
From Embeds
0
Number of Embeds
31
Actions
Shares
0
Downloads
17
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

sector-sphere

  1. 1. Distributed Data Storage and Parallel Processing Engine Sector & Sphere Yunhong Gu Univ. of Illinois at Chicago
  2. 2. What is Sector/Sphere? <ul><li>Sector: Distributed File System </li></ul><ul><li>Sphere: Parallel Data Processing Engine (generic MapReduce) </li></ul><ul><li>Open source software, GPL/BSD, written in C++. </li></ul><ul><li>Started since 2006, current version 1.23 </li></ul><ul><li>http://sector.sf.net </li></ul>
  3. 3. Overview <ul><li>Motivation </li></ul><ul><li>Sector </li></ul><ul><li>Sphere </li></ul><ul><li>Experimental Results </li></ul>
  4. 4. Motivation Super-computer model: Expensive, data IO bottleneck Sector/Sphere model: Inexpensive, parallel data IO, data locality
  5. 5. Motivation Parallel/Distributed Programming with MPI, etc.: Flexible and powerful. But too complicated Sector/Sphere model (cloud model): Clusters are a unity to the developer, simplified programming interface. Limited to certain data parallel applications.
  6. 6. Motivation Systems for single data centers: Requires additional effort to locate and move data. Sector/Sphere model: Support wide-area data collection and distribution.
  7. 7. Sector Distributed File System Security Server Masters slaves slaves SSL SSL Clients User account Data protection System Security Metadata Scheduling Service provider System access tools App. Programming Interfaces Storage and Processing Data UDT Encryption optional
  8. 8. Sector Distributed File System <ul><li>Sector stores files on the native/local file system of each slave node. </li></ul><ul><li>Sector does not split files into blocks </li></ul><ul><ul><li>Pro: simple/robust, suitable for wide area, fast and flexible data processing </li></ul></ul><ul><ul><li>Con: users need to handle file size properly </li></ul></ul><ul><li>The master nodes maintain the file system metadata. No permanent metadata is needed. </li></ul><ul><li>Topology aware </li></ul>
  9. 9. Sector: Performance <ul><li>Data channel is set up directly between a slave and a client </li></ul><ul><li>Multiple active-active masters (load balance), starting from 1.24 </li></ul><ul><li>UDT is used for high speed data transfer </li></ul><ul><ul><li>UDT is a high performance UDP-based data transfer protocol. </li></ul></ul><ul><ul><li>Much faster than TCP over wide area </li></ul></ul>
  10. 10. UDT: UDP-based Data Transfer <ul><li>http://udt.sf.net </li></ul><ul><li>Open source UDP based data transfer protocol </li></ul><ul><ul><li>With reliability control and congestion control </li></ul></ul><ul><li>Fast, firewall friendly, easy to use </li></ul><ul><li>Already used in many commercial and research software </li></ul>
  11. 11. Sector: Fault Tolerance <ul><li>Sector uses replications for better reliability and availability </li></ul><ul><li>Replicas can be made either at write time (instantly) or periodically </li></ul><ul><li>Sector supports multiple active-active masters for high availability </li></ul>
  12. 12. Sector: Security <ul><li>Sector uses a security server to maintain user account and IP access control for masters, slaves, and clients </li></ul><ul><li>Control messages are encrypted </li></ul><ul><ul><li>not completely finished in the current version </li></ul></ul><ul><li>Data transfer can be encrypted as an option </li></ul><ul><li>Data transfer channel is set up by rendezvous, no listening server. </li></ul>
  13. 13. Sector: Tools and API <ul><li>Supported file system operation: ls, stat, mv, cp, mkdir, rm, upload, download </li></ul><ul><ul><li>Wild card characters supported </li></ul></ul><ul><li>System monitoring: sysinfo. </li></ul><ul><li>C++ API: list, stat, move, copy, mkdir, remove, open, close, read, write, sysinfo. </li></ul><ul><li>FUSE </li></ul>
  14. 14. Sphere: Simplified Data Processing <ul><li>Data parallel applications </li></ul><ul><li>Data is processed at where it resides, or on the nearest possible node (locality) </li></ul><ul><li>Same user defined functions (UDF) are applied on all elements (records, blocks, or files) </li></ul><ul><li>Processing output can be written to Sector files or sent back to the client </li></ul><ul><li>Generalized Map/Reduce </li></ul>
  15. 15. Sphere: Simplified Data Processing for each file F in (SDSS datasets) for each image I in F findBrownDwarf(I, …); SphereStream sdss; sdss.init(&quot;sdss files&quot;); SphereProcess myproc; myproc->run(sdss,&quot; findBrownDwarf &quot;, …); myproc->read(result); findBrownDwarf(char* image, int isize, char* result, int rsize);
  16. 16. Sphere: Data Movement <ul><li>Slave -> Slave Local </li></ul><ul><li>Slave -> Slaves (Shuffle/Hash) </li></ul><ul><li>Slave -> Client </li></ul>
  17. 17. Sphere/UDF vs. MapReduce <ul><li>Record Offset Index </li></ul><ul><li>UDF </li></ul><ul><li>Hashing / Bucket </li></ul><ul><li>- </li></ul><ul><li>UDF </li></ul><ul><li>- </li></ul><ul><li>Parser / Input Reader </li></ul><ul><li>Map </li></ul><ul><li>Partition </li></ul><ul><li>Compare </li></ul><ul><li>Reduce </li></ul><ul><li>Output Writer </li></ul>
  18. 18. Sphere/UDF vs. MapReduce <ul><li>Sphere is more straightforward and flexible </li></ul><ul><ul><li>UDF can be applied directly on records, blocks, files, and even directories </li></ul></ul><ul><ul><li>Native binary data support </li></ul></ul><ul><ul><li>Sorting is required by Reduce, but it is optional in Sphere </li></ul></ul><ul><li>Sphere uses PUSH model for data movement, faster than the PULL model used by MapReduce </li></ul>
  19. 19. Why Sector doesn’t Split Files? <ul><li>Certain applications need to process a whole file or even directory </li></ul><ul><li>Certain legacy applications need a file or a directory as input </li></ul><ul><li>Certain applications need multiple inputs, e.g., everything in a directory </li></ul><ul><li>In Hadoop, all blocks would have to be moved to one node for processing, hence no data locality benefit. </li></ul>
  20. 20. Load Balance <ul><li>The number of data segments is much more than the number of SPEs. When an SPE completes a data segment, a new segment will be assigned to the SPE. </li></ul><ul><li>Data transfer is balanced across the system to optimize network bandwidth usage. </li></ul>
  21. 21. Fault Tolerance <ul><li>Map failure is recoverable </li></ul><ul><ul><li>If one SPE fails, the data segment assigned to it will be re-assigned to another SPE and be processed again. </li></ul></ul><ul><li>Reduce failure is unrecoverable </li></ul><ul><ul><li>In small-medium systems, machine failure during run time is rare </li></ul></ul><ul><ul><li>If necessary, developers can split the input into multiple sub-tasks to reduce the cost of reduce failure. </li></ul></ul>
  22. 22. Open Cloud Testbed <ul><li>4 Racks in Baltimore (JHU), Chicago (StarLight and UIC), and San Diego (Calit2) </li></ul><ul><li>10Gb/s inter-site connection on CiscoWave </li></ul><ul><li>2Gb/s inter-rack connection </li></ul><ul><li>Two dual-core AMD CPU, 12GB RAM, 1TB single disk </li></ul><ul><li>Will be doubled by Sept. 2009. </li></ul>
  23. 23. Open Cloud Testbed
  24. 24. The TeraSort Benchmark <ul><li>Data is split into small files, scattered on all slaves </li></ul><ul><li>Stage 1: On each slave, an SPE scans local files, sends each record to a bucket file on a remote node according to the key. </li></ul><ul><li>Stage 2: On each destination node, an SPE sort all data inside each bucket. </li></ul>
  25. 25. TeraSort 10-byte 90-byte Key Value 10-bit Bucket-0 Bucket-1 Bucket-1023 0-1023 Stage 1 : Hash based on the first 10 bits Bucket-0 Bucket-1 Bucket-1023 Stage 2 : Sort each bucket on local node 100 bytes record
  26. 26. Performance Results: TeraSort Run time: seconds Sector v1.16 vs Hadoop 0.17 1.2TB 900GB 600GB 300GB Data Size 3702 6675 1526 UIC + StarLight + Calit2 + JHU 3069 4341 1430 UIC + StarLight + Calit2 2617 2896 1361 UIC + StarLight 2252 2889 1265 UIC Hadoop (1 replica) Hadoop (3 replicas) Sphere
  27. 27. Performance Results: TeraSort <ul><li>Sorting 1.2TB on 120 nodes </li></ul><ul><li>Sphere Hash & Local Sort: 981sec + 545sec </li></ul><ul><li>Hadoop: 3702/6675 seconds </li></ul><ul><li>Sphere Hash </li></ul><ul><ul><li>CPU: 130% MEM: 900MB </li></ul></ul><ul><li>Sphere Local Sort </li></ul><ul><ul><li>CPU: 80% MEM: 1.4GB </li></ul></ul><ul><li>Hadoop: CPU 150% MEM 2GB </li></ul>
  28. 28. The MalStone Benchmark <ul><li>Drive-by problem: visit a web site and get comprised by malware. </li></ul><ul><li>MalStone-A: compute the infection ratio of each site. </li></ul><ul><li>MalStone-B: compute the infection ratio of each site from the beginning to the end of every week. </li></ul>http://code.google.com/p/malgen/
  29. 29. MalStone Site ID Time Key Value 3-byte site-000X site-001X site-999X 000-999 Stage 1 : Process each record and hash into buckets according to site ID site-000X site-001X site-999x Stage 2 : Compute infection rate for each merchant Event ID | Timestamp | Site ID | Compromise Flag | Entity ID 00000000005000000043852268954353585368|2008-11-08 17:56:52.422640|3857268954353628599|1|000000497829 Text Record Transform Flag
  30. 30. Performance Results: MalStone * Courtesy of Collin Bennet and Jonathan Seidman of Open Data Group. Process 10 billions records on 20 OCT nodes (local). 43m 44s 33m 40s Sector/Sphere 142m 32s 87m 29s Hadoop Streaming/Python 840m 50s 454m 13s Hadoop MalStone-B MalStone-A
  31. 31. System Monitoring (Testbed)
  32. 32. System Monitoring (Sector/Sphere)
  33. 33. For More Information <ul><li>Sector/Sphere code & docs: http://sector.sf.net </li></ul><ul><li>Open Cloud Consortium: http://www.opencloudconsortium.org </li></ul><ul><li>NCDM: http://www. ncdm . uic . edu </li></ul>

×