Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Llnl talk

1,652 views

Published on

These slides are from a recent talk I gave at Lawrence Livermore Labs.

The talk gives an architectural outline of the MapR system and then discusses how this architecture facilitates large scale machine learning algorithms.

Published in: Technology, Education
  • Be the first to comment

Llnl talk

  1. 1. MapR Architecture and Machine Learning<br />1<br />
  2. 2. Outline<br />MapR system overview<br />Map-reduce review<br />MapR architecture<br />Performance Results<br />Map-reduce on MapR<br />Machine learning on MapR<br />
  3. 3. Map-Reduce<br />Shuffle<br />Input<br />Output<br />
  4. 4. Bottlenecks and Issues<br />Read-only files<br />Many copies in I/O path<br />Shuffle based on HTTP<br />Can’t use new technologies<br />Eats file descriptors<br />Spills go to local file space<br />Bad for skewed distribution of sizes<br />
  5. 5. MapR Improvements<br />Faster file system<br />Fewer copies<br />Multiple NICS<br />No file descriptor or page-buf competition<br />Faster map-reduce<br />Uses distributed file system<br />Direct RPC to receiver<br />Very wide merges<br />
  6. 6. MapR Innovations<br />Volumes<br />Distributed management<br />Data placement<br />Read/write random access file system<br />Allows distributed meta-data<br />Improved scaling<br />Enables NFS access<br />Application-level NIC bonding<br />Transactionally correct snapshots and mirrors<br />
  7. 7. MapR'sContainers<br />Files/directories are sharded into blocks, whichare placed into mini NNs (containers ) on disks<br /><ul><li>Each container contains
  8. 8. Directories & files
  9. 9. Data blocks
  10. 10. Replicated on servers
  11. 11. No need to manage directly</li></ul>Containers are 16-32 GB segments of disk, placed on nodes<br />
  12. 12. Container locations and replication<br />CLDB<br />N1, N2<br />N1<br />N3, N2<br />N1, N2<br />N2<br />N1, N3<br />N3, N2<br />N3<br />Container location database (CLDB) keeps track of nodes hosting each container<br />
  13. 13. MapR Scaling<br />Containers represent 16 - 32GB of data<br /><ul><li>Each can hold up to 1 Billion files and directories
  14. 14. 100M containers = ~ 2 Exabytes (a very large cluster)</li></ul>250 bytes DRAM to cache a container<br /><ul><li>25GB to cache all containers for 2EB cluster
  15. 15. But not necessary, can page to disk
  16. 16. Typical large 10PB cluster needs 2GB</li></ul>Container-reports are 100x - 1000x < HDFS block-reports<br /><ul><li>Serve 100x more data-nodes
  17. 17. Increase container size to 64G to serve 4EB cluster
  18. 18. Map/reduce not affected</li></li></ul><li>MapR's Streaming Performance<br />11 x 7200rpm SATA<br />11 x 15Krpm SAS<br />MB<br />per<br />sec<br />Higher is better<br />Tests: i. 16 streams x 120GB ii. 2000 streams x 1GB<br />
  19. 19. Terasort on MapR<br />10+1 nodes: 8 core, 24GB DRAM, 11 x 1TB SATA 7200 rpm<br />Elapsed time (mins)<br />Lower is better<br />
  20. 20. MUCH faster for some operations<br />Same 10 nodes …<br />Teststoppedhere<br />Create<br />Rate<br /># of files (millions)<br />
  21. 21. MUCH faster for some operations<br />
  22. 22. NFS mounting models<br />Export to the world<br />NFS gateway runs on selected gateway hosts<br />Local server<br />NFS gateway runs on local host<br />Enables local compression and check summing<br />Export to self<br />NFS gateway runs on all data nodes, mounted from localhost<br />
  23. 23. Export to the world<br />NFS<br />Server<br />NFS<br />Server<br />NFS<br />Server<br />NFS<br />Server<br />NFS<br />Client<br />
  24. 24. Local server<br />Client<br />Application<br />NFS<br />Server<br />Cluster Nodes<br />
  25. 25. Universal export to self<br />Cluster Nodes<br />Cluster<br />Node<br />Application<br />NFS<br />Server<br />
  26. 26. Cluster<br />Node<br />Application<br />NFS<br />Server<br />Cluster<br />Node<br />Application<br />Cluster<br />Node<br />Application<br />NFS<br />Server<br />NFS<br />Server<br />Nodes are identical<br />
  27. 27. Shardedtext indexing<br />Mapper assigns document to shard<br />Shard is usually hash of document id<br />Reducer indexes all documents for a shard<br />Indexes created on local disk<br />On success, copy index to DFS<br />On failure, delete local files<br />Must avoid directory collisions <br />can’t use shard id!<br />Must manage local disk space<br />
  28. 28. Conventional data flows<br />Failure of search engine requires another download of the index from clustered storage.<br />Map<br />Failure of a reducer causes garbage to accumulate in the local disk<br />Reducer<br />Clustered index storage<br />Input documents<br />Local<br />disk<br />Search<br />Engine<br />Local<br />disk<br />
  29. 29. Simplified NFS data flows<br />Map<br />Reducer<br />Search<br />Engine<br />Input documents<br />Clustered index storage<br />Failure of a reducer is cleaned up by map-reduce framework<br />Search engine reads mirrored index directly.<br />
  30. 30. Application to machine learning<br />So now we have the hammer<br />Let’s see some nails!<br />
  31. 31. K-means<br />Classic E-M based algorithm<br />Given cluster centroids,<br />Assign each data point to nearest centroid<br />Accumulate new centroids<br />Rinse, lather, repeat<br />
  32. 32. K-means, the movie<br />Centroids<br />Assign<br />to<br />Nearest<br />centroid<br />I<br />n<br />p<br />u<br />t<br />Aggregate<br />new<br />centroids<br />
  33. 33. But …<br />
  34. 34. Parallel Stochastic Gradient Descent<br />Model<br />Train<br />sub<br />model<br />I<br />n<br />p<br />u<br />t<br />Average<br />models<br />
  35. 35. VariationalDirichlet Assignment<br />Model<br />Gather<br />sufficient<br />statistics<br />I<br />n<br />p<br />u<br />t<br />Update<br />model<br />
  36. 36. Old tricks, new dogs<br />Mapper<br />Assign point to cluster<br />Emit cluster id, (1, point)<br />Combiner and reducer<br />Sum counts, weighted sum of points<br />Emit cluster id, (n, sum/n)<br />Output to HDFS<br />Read from local disk from distributed cache<br />Read from<br />HDFS to local disk by distributed cache<br />Written by map-reduce<br />
  37. 37. Old tricks, new dogs<br />Mapper<br />Assign point to cluster<br />Emit cluster id, 1, point<br />Combiner and reducer<br />Sum counts, weighted sum of points<br />Emit cluster id, n, sum/n<br />Output to HDFS<br />Read from<br />NFS<br />Written by map-reduce<br />MapR FS<br />
  38. 38. Click modeling architecture<br />Map-reduce<br />Side-data<br />Now via NFS<br />Feature<br />extraction<br />and<br />down<br />sampling<br />I<br />n<br />p<br />u<br />t<br />Data<br />join<br />Sequential<br />SGD<br />Learning<br />
  39. 39. Poor man’s Pregel<br />Mapper<br />Lines in bold can use conventional I/O via NFS<br />while not done:<br /> read and accumulate input models<br /> for each input:<br /> accumulate model<br /> write model<br /> synchronize<br /> reset input format<br />emit summary<br />31<br />
  40. 40. Trivial visualization interface<br />Map-reduce output is visible via NFS<br />Legacy visualization just works<br />$ R<br />> x <- read.csv(“/mapr/my.cluster/home/ted/data/foo.out”)<br />> plot(error ~ t, x)<br />> q(save=‘n’)<br />
  41. 41. Conclusions<br />We used to know all this<br />Tab completion used to work<br />5 years of work-arounds have clouded our memories<br />We just have to remember the future<br />

×