UDT Tutorial Yunhong Gu Robert Grossman University of
UDT Tutorial Yunhong Gu & Robert Grossman University of Illinois at Chicago
Outline n n n Introduction Installation Programming using UDT Performance tuning Conclusion
Introduction n n UDT – UDP-based Data Transfer Application level End-to-end Bi-directional For shared networks q n But can be tuned for private networks C++ library
UDT History n n n n 2000: SABUL Concept 2001: SABUL version 1. 0 2002: d. SABUL 2002: SABUL version 2. 0, 2. 1, 2. 2, 2. 3, 2003: UDT 1. 0 2004: UDT 1. 1 & 1. 2 2004: UDT 2. 0 2005: UDT 3. 0
Project Online n n n sf. net/projects/udt Source code, documentations, mailing lists, bug reports Tarball release and CVS
Installation n n Make the C++ source code Tested support hardware q n Tested support OS q n IA 32, IA 64, AMD 64, Power PC, SPARC Linux, OS X, Windows, UNIX make -e arch=XXX os=YYY
Post-Installation n n LD_LIBRARY_PATH Testing using appserver and appclient. /appserver [port]. /appclient <server-addr> <server-port>
Programming using UDT n n socket-like API UDT: : namespace qualifier UDTSOCKET UDTERROR
Programming using UDT int client = socket(AF_INET, SOCK_STREAM, 0); connect(client, (sockaddr*)&serv_addr, sizeof(serv_addr)); If (-1 == send(client, data, size, 0)) { //error processing } UDTSOCKET client = UDT: : socket(AF_INET, SOCK_STREAM, 0); UDT: : connect(client, (sockaddr*)&serv_addr, sizeof(serv_addr)); If (UDTERROR == UDT: : send(client, data, size, 0)) { //error processing }
Configuration n setsockopt/getsockopt
Overlapped IO int send( UDTSOCKET, const char *buf, int len, int flags, int *handle = NULL, UDT_MEM_ROUTINE routine = NULL ); void (UDT_MEME_ROUTINE*)(char*, int);
Overlapped IO bool getoverlappedresult( UDTSOCKET u, const int& handle, int& progress, const bool& wait );
Overlapped IO User Buffer Data Protocol Buffer New Data
Performance monitoring n n n Monitor UDT performance statistics Monitor internal UDT parameters Diagnose network and application configurations int perfmon( UDTSOCKET u, TRACEINFO* perf );
Performance monitoring n TRACEINFO structure q Aggregate information n q Local information (values since last time perfmon was called) n q Timestamp, Total send/recv/retrans/loss, etc. Local send/recv/retrans/loss, send/recv rate Instant value n RTT, cwnd, ipt, etc.
Performance Tuning n UDT buffer size q n UDP buffer size q q n Larger is better SNDBUF << RCVBUF Larger is NOT better IO block size q q Larger is better, but better less than the UDT buffer size File IO block size: mystery
Thank you!
- Slides: 17