a lightweight library for building scalable t ools
play

A Lightweight Library for Building Scalable T ools Emily R. - PowerPoint PPT Presentation

A Lightweight Library for Building Scalable T ools Emily R. Jacobson , Michael J. Brim, Barton P. Miller Paradyn Project University of Wisconsin jacobson@cs.wisc.edu June 6, 2010 Para 2010: State of the Art in Scientific and Parallel


  1. A Lightweight Library for Building Scalable T ools Emily R. Jacobson , Michael J. Brim, Barton P. Miller Paradyn Project University of Wisconsin jacobson@cs.wisc.edu June 6, 2010 Para 2010: State of the Art in Scientific and Parallel Computing

  2. MRNet Motivation FE Example T ool: Performance Analysis … BE BE BE BE 2

  3. MRNet Motivation FE Example T ool: Performance Analysis As scale increases, front-end becomes bottleneck … 100,000s of nodes BE BE BE BE 3

  4. MRNet Goals o Provide infrastructure for building tools that scale to the largest computing platforms o Support scalability for command, computation, and data collection 4

  5. MRNet Features o Scalable – Handle 100,000’s of nodes o Multi-platform – Cray XT, IBM BlueGene, Linux clusters, AIX, Solaris, Windows o Reliable – Automatic fault recovery o Flexible – Target a wide variety of tools, applications, and architectures o Customizable – Easily extend to new algorithms and requirements o Open Source 5

  6. TB Ō N Model FE … BE BE BE BE 6

  7. TB Ō N Model FE MRNet makes use of a software tree-based CP overlay network, TB Ō N … CP CP … CP CP CP CP … BE BE BE BE 7

  8. TB Ō N Model FE TB Ō Ns provide: o Scalable multicast CP o Scalable gather o Scalable data aggregation … CP CP … CP CP CP CP … BE BE BE BE 8

  9. TB Ō N Model Application Front-end FE CP … CP CP Tree of Communication Processes … CP CP CP CP … BE BE BE BE Application Back-ends 9

  10. MRNet: An Easy-to-use TB Ō N FE Logical channels called streams connect the front- CP end to the back-ends … CP CP Data is sent along a stream in a packet … CP CP CP CP … BE BE BE BE 10

  11. MRNet: An Easy-to-use TB Ō N FE Easily multicast messages to backend nodes CP … CP CP … CP CP CP CP … BE BE BE BE 11

  12. MRNet: An Easy-to-use TB Ō N FE Easily multicast messages to backend nodes CP and aggregate data as it is … CP CP sent to the frontend … CP CP CP CP … BE BE BE BE 12

  13. MRNet: An Easy-to-use TB Ō N FE CP Application-level packet … CP CP Packet filter … CP CP CP CP … BE BE BE BE 13

  14. MRNet Filters Packet Batching/Unbatching Transformation Filter Packet Filter Synchronization Filter Packet Batching/Unbatching 14

  15. MRNet Components Provided by MRNet libmrnet User Written T ool Front-end CP filter CP CP filter filter T ool Back-End T ool Back-End T ool Back-End T ool Back-End libmrnet libmrnet libmrnet libmrnet 15

  16. Example MRNet Tool num_vals, delay FE Performance T ool: gather load information CP from backends … CP CP … CP CP CP CP … BE BE BE BE num_vals, num_vals, num_vals, num_vals, delay delay delay delay

  17. Example MRNet Tool num_vals, delay FE Performance T ool: avg_load gather load information avg filter CP from backends avg_load avg_load … avg filter CP CP avg_load avg_load … avg filter CP CP CP CP cur_load cur_load cur_load cur_load … BE BE BE BE num_vals, num_vals, num_vals, num_vals, delay delay delay delay

  18. Example MRNet Tool num_vals, delay FE Performance T ool: avg_load gather load information avg filter CP from backends avg_load avg_load … avg filter CP CP avg_load avg_load … avg filter CP CP CP CP cur_load cur_load cur_load cur_load … BE BE BE BE num_vals, num_vals, num_vals, num_vals, delay delay delay delay

  19. Example Frontend Code front_end_main(int argc, char ** argv) { Network * net = Network::CreateNetworkFE(topo_file, bckend_exe, &dummy_argv); int filter_id = net- >load_FilterFunc(so_file, “LoadAvg”); Communicator * comm = net->get_BroadcastCommunicator(); Stream * strm = net->new_Stream(comm, filter_id, SFILTER_WAITFORALL); int tag = PROT_SUM; strm- >send(tag, “%d %d”, num_vals, delay); for (i = 0; i < num_vals; i++) { strm->recv(&tag, pkt); pkt- >unpack(“%d”, &recv_val); } strm- >send(PROT_EXIT, “”); delete net; } 19

  20. Example Frontend Code Create a new instance of a Network front_end_main(int argc, char ** argv) { Network * net = Network::CreateNetworkFE(topo_file, bckend_exe, &dummy_argv); int filter_id = net->load_FilterFunc(so_file , “ LoadAvg ”); Communicator * comm = net->get_BroadcastCommunicator(); Stream * strm = net->new_Stream(comm, filter_id, SFILTER_WAITFORALL); int tag = PROT_SUM; strm- >send(tag, “%d %d”, num_vals, delay); for (i = 0; i < num_vals; i++) { strm->recv(&tag, pkt); pkt- >unpack(“%d”, &recv_val); } strm- >send(PROT_EXIT, “”); delete net; } 20

  21. Example Frontend Code front_end_main(int argc, char ** argv) { Network * net = Network::CreateNetworkFE(topo_file, bckend_exe, &dummy_argv); int filter_id = net- >load_FilterFunc(so_file, “LoadAvg”); Communicator * comm = net->get_BroadcastCommunicator(); Stream * strm = net->new_Stream(comm, filter_id, SFILTER_WAITFORALL); Get broadcast communicator and create a Stream that uses this communicator int tag = PROT_SUM; strm- >send(tag, “%d %d”, num_vals, delay); for (i = 0; i < num_vals; i++) { strm->recv(&tag, pkt); pkt- >unpack(“%d”, &recv_val); } strm- >send(PROT_EXIT, “”); delete net; } 21

  22. Example Frontend Code front_end_main(int argc, char ** argv) { Network * net = Network::CreateNetworkFE(topo_file, bckend_exe, &dummy_argv); int filter_id = net- >load_FilterFunc(so_file, “LoadAvg”); Communicator * comm = net->get_BroadcastCommunicator(); Stream * strm = net->new_Stream(comm, filter_id, SFILTER_WAITFORALL); Send num_vals and delay to the BEs int tag = PROT_SUM; strm- >send(tag, “%d %d”, num_vals, delay); for (i = 0; i < num_vals; i++) { strm->recv(&tag, pkt); pkt- >unpack(“%d”, &recv_val); } strm- >send(PROT_EXIT, “”); delete net; } 22

  23. Example Frontend Code front_end_main(int argc, char ** argv) { Network * net = Network::CreateNetworkFE(topo_file, bckend_exe, &dummy_argv); int filter_id = net- >load_FilterFunc(so_file, “LoadAvg”); Communicator * comm = net->get_BroadcastCommunicator(); Stream * strm = net->new_Stream(comm, filter_id, SFILTER_WAITFORALL); int tag = PROT_SUM; strm- >send(tag, “%d %d”, num_vals, delay); Receive and unpack Packet with a single int for (i = 0; i < num_vals; i++) { strm->recv(&tag, pkt); pkt- >unpack(“%d”, & recv_val); } strm- >send(PROT_EXIT, “”); delete net; } 23

  24. Example Frontend Code front_end_main(int argc, char ** argv) { Network * net = Network::CreateNetworkFE(topo_file, bckend_exe, &dummy_argv); int filter_id = net- >load_FilterFunc(so_file, “LoadAvg”); Communicator * comm = net->get_BroadcastCommunicator(); Stream * strm = net->new_Stream(comm, filter_id, SFILTER_WAITFORALL); int tag = PROT_SUM; strm- >send(tag, “%d %d”, num_vals, delay); for (i = 0; i < num_vals; i++) { strm->recv(&tag, pkt); pkt- >unpack(“%d”, &recv_val); } T eardown the Network strm- >send(PROT_EXIT, “”); delete net; } 24

  25. Example Filter Code const char * LoadAvg_format_string = “%d”; void LoadAvg(std::vector<PacketPtr> & pkts_in, std::vector<PacketPtr> & pkts_out, std::vector<PacketPtr> &, /* packets_out_reverse */ void **, /* client data */ PacketPtr &) { /* params */ int avg = 0; for (unsigned int i = 0; i < pkts_in.size(); i++) { PacketPtr cur_packet = pkts_in[i]; int val; cur_packet- >unpack(“%d”, &val); avg += val; } avg = avg / pkts_in.size(); PacketPtr new_pkt (new Packet(pkts_in[0]->get_StreamId(), pkts_in[0]- >get_Tag(), “%d”, avg)); pkts_out.push_back(new_pkt); 25 }

  26. Example Filter Code Declare format of data const char * LoadAvg_format_string = “%d”; expected by the filter void LoadAvg(std::vector<PacketPtr> & pkts_in, std::vector<PacketPtr> & pkts_out, std::vector<PacketPtr> &, /* packets_out_reverse */ void **, /* client data */ PacketPtr &) { /* params */ int avg = 0; for (unsigned int i = 0; i < pkts_in.size(); i++) { PacketPtr cur_packet = pkts_in[i]; int val; cur_packet- >unpack(“%d”, &val); avg += val; } avg = avg / pkts_in.size(); PacketPtr new_pkt (new Packet(pkts_in[0]->get_StreamId(), pkts_in[0]- >get_Tag(), “%d”, avg)); pkts_out.push_back(new_pkt); 26 }

  27. Example Filter Code const char * LoadAvg_format_string = “%d”; Use generic function signature void LoadAvg(std::vector<PacketPtr> & pkts_in, std::vector<PacketPtr> & pkts_out, std::vector<PacketPtr> &, /* packets_out_reverse */ void **, /* client data */ PacketPtr &) { /* params */ int avg = 0; for (unsigned int i = 0; i < pkts_in.size(); i++) { PacketPtr cur_packet = pkts_in[i]; int val; cur_packet- >unpack(“%d”, &val); avg += val; } avg = avg / pkts_in.size(); PacketPtr new_pkt (new Packet(pkts_in[0]->get_StreamId(), pkts_in[0]- >get_Tag(), “%d”, avg)); pkts_out.push_back(new_pkt); 27 }

Recommend


More recommend