500 likes | 620 Views
A Performance Analysis of Page Retrieval with HTTP-MPLEX on Asymmetric Links. Robert LR Mattson rlmattson@ieee.org. Somnath Ghosh somnath@cs.latrobe.edu.au. La Trobe University Department of Computer Science and Computer Engineering Melbourne, Australia, 3086. Presentation Format.
E N D
A Performance Analysis of Page Retrieval withHTTP-MPLEX on Asymmetric Links Robert LR Mattson rlmattson@ieee.org Somnath Ghosh somnath@cs.latrobe.edu.au La Trobe University Department of Computer Science and Computer Engineering Melbourne, Australia, 3086
Presentation Format • Brief HTTP overview • Brief overview of HTTP-MPLEX • Request compression model • Multiplex response scheme • Simulation Result • Experimentation Result • Future progress
Hypertext Transfer Protocol (HTTP) • Evolution of HTTP improves utilisation of TCP • HTTP 0.9 • single connection per object request/response • HTTP 1.0 • somewhat persistent connections (‘connection: open’) • HTTP 1.1 • Fully pipelined and persistent • HTTP-MPLEX • Request compression, response multiplexing / encoding, single connection optimised.
Hypertext Transfer Protocol (HTTP) • Evolution of HTTP improves utilisation of TCP • HTTP 0.9 • single connection per object request/response • HTTP 1.0 • somewhat persistent connections (‘connection: open’) • HTTP 1.1 • Fully pipelined and persistent • HTTP-MPLEX • Request compression, response multiplexing / encoding, single connection optimised. V. Many Many 1 or 2 1
HTTP Transport Protocol • Transmission Control Protocol (TCP) • Mis-match • Bursty Vs. Stream Oriented • Slow Start (cwnd = cwnd + 1) Relies on the free and uncontested flow of ACKS • Congestion avoidance • Fast retransmit • Fast recovery
HTTP Requests GET /ltu_assets/images/interface/home_logo.gif HTTP/1.1\r\n Host: www.latrobe.edu.au\r\n User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910\r\n Accept: image/png,*/*;q=0.5\r\n Accept-Language: en-us,en;q=0.5\r\n Accept-Encoding: gzip,deflate\r\n Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n Keep-Alive: 300\r\n Connection: keep-alive\r\n Referer: http://www.latrobe.edu.au/\r\n Cookie: phpbb2mysql_data=a%3A0%3A%7B%7D; ltusitevisitor=131.172.xx.xxx.319901096779449440\r\n\r\n
HTTP Requests GET /ltu_assets/images/interface/home_logo.gif HTTP/1.1\r\n Host: www.latrobe.edu.au\r\n User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910\r\n Accept: image/png,*/*;q=0.5\r\n Accept-Language: en-us,en;q=0.5\r\n Accept-Encoding: gzip,deflate\r\n Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n Keep-Alive: 300\r\n Connection: keep-alive\r\n Referer: http://www.latrobe.edu.au/\r\n Cookie: phpbb2mysql_data=a%3A0%3A%7B%7D; ltusitevisitor=131.172.xx.xxx.319901096779449440\r\n\r\n GET /ltu_assets/images/interface/home_random3.jpgHTTP/1.1\r\n Host: www.latrobe.edu.au\r\n User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910\r\n Accept: image/png,*/*;q=0.5\r\n Accept-Language: en-us,en;q=0.5\r\n Accept-Encoding: gzip,deflate\r\n Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n Keep-Alive: 300\r\n Connection: keep-alive\r\n Referer: http://www.latrobe.edu.au/\r\n Cookie: phpbb2mysql_data=a%3A0%3A%7B%7D; ltusitevisitor=131.172.xx.xxx.319901096779449440\r\n\r\n
HTTP Requests GET /ltu_assets/images/interface/home_logo.gif HTTP/1.1\r\n Host: www.latrobe.edu.au\r\n User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910\r\n Accept: image/png,*/*;q=0.5\r\n Accept-Language: en-us,en;q=0.5\r\n Accept-Encoding: gzip,deflate\r\n Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n Keep-Alive: 300\r\n Connection: keep-alive\r\n Referer: http://www.latrobe.edu.au/\r\n Cookie: phpbb2mysql_data=a%3A0%3A%7B%7D; ltusitevisitor=131.172.xx.xxx.319901096779449440\r\n\r\n GET /ltu_assets/images/interface/home_random3.jpgHTTP/1.1\r\n Host: www.latrobe.edu.au\r\n User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910\r\n Accept: image/png,*/*;q=0.5\r\n Accept-Language: en-us,en;q=0.5\r\n Accept-Encoding: gzip,deflate\r\n Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n Keep-Alive: 300\r\n Connection: keep-alive\r\n Referer: http://www.latrobe.edu.au/\r\n Cookie: phpbb2mysql_data=a%3A0%3A%7B%7D; ltusitevisitor=131.172.xx.xxx.319901096779449440\r\n\r\n GET /images2/home_campuspages.gifHTTP/1.1\r\n Host: www.latrobe.edu.au\r\n User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910\r\n Accept: image/png,*/*;q=0.5\r\n Accept-Language: en-us,en;q=0.5\r\n Accept-Encoding: gzip,deflate\r\n Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n If-None-Match: "17b477-16ac-3fce87c2“\r\n Keep-Alive: 300\r\n Connection: keep-alive\r\n Referer: http://www.latrobe.edu.au/\r\n Cookie: phpbb2mysql_data=a%3A0%3A%7B%7D; ltusitevisitor=131.172.xx.xxx.319901096779449440\r\n\r\n
HTTP Requests GET /ltu_assets/images/interface/home_logo.gif HTTP/1.1\r\n Host: www.latrobe.edu.au\r\n User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910\r\n Accept: image/png,*/*;q=0.5\r\n Accept-Language: en-us,en;q=0.5\r\n Accept-Encoding: gzip,deflate\r\n Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n Keep-Alive: 300\r\n Connection: keep-alive\r\n Referer: http://www.latrobe.edu.au/\r\n Cookie: phpbb2mysql_data=a%3A0%3A%7B%7D; ltusitevisitor=131.172.xx.xxx.319901096779449440\r\n\r\n GET /ltu_assets/images/interface/home_random3.jpgHTTP/1.1\r\n Host: www.latrobe.edu.au\r\n User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910\r\n Accept: image/png,*/*;q=0.5\r\n Accept-Language: en-us,en;q=0.5\r\n Accept-Encoding: gzip,deflate\r\n Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n Keep-Alive: 300\r\n Connection: keep-alive\r\n Referer: http://www.latrobe.edu.au/\r\n Cookie: phpbb2mysql_data=a%3A0%3A%7B%7D; ltusitevisitor=131.172.xx.xxx.319901096779449440\r\n\r\n GET /images2/home_campuspages.gifHTTP/1.1\r\n Host: www.latrobe.edu.au\r\n User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910\r\n Accept: image/png,*/*;q=0.5\r\n Accept-Language: en-us,en;q=0.5\r\n Accept-Encoding: gzip,deflate\r\n Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n If-None-Match: "17b477-16ac-3fce87c2“\r\n Keep-Alive: 300\r\n Connection: keep-alive\r\n Referer: http://www.latrobe.edu.au/\r\n Cookie: phpbb2mysql_data=a%3A0%3A%7B%7D; ltusitevisitor=131.172.xx.xxx.319901096779449440\r\n\r\n GET /images2/text_00.gifHTTP/1.1\r\n Host: www.latrobe.edu.au\r\n User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910\r\n Accept: image/png,*/*;q=0.5\r\n Accept-Language: en-us,en;q=0.5\r\n Accept-Encoding: gzip,deflate\r\n Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n Keep-Alive: 300\r\n Connection: keep-alive\r\n Referer: http://www.latrobe.edu.au/\r\n Cookie: phpbb2mysql_data=a%3A0%3A%7B%7D; ltusitevisitor=131.172.xx.xxx.319901096779449440\r\n\r\n
Compression • Consistent with established design principles • Request similarity • RFC 2145: “An implementation receiving a message header that it does not understand MUST ignore that header” • Object Oriented tenets • Inheritance • Overriding
Compression Algorithm For all requests in outgoing queue: • Select the request with the most attributes in common with other requests • Make a serialised entry for each request in the queue after the mandatory “Host” header • For any sub-requests with attributes that cannot be inherited or need overriding, include a parenthesised expression • Append super-request headers
Syntactic elements GET2: /images2/home_campuspages.gif {111111111; If-None-Match: "17b477-16ac-3fce87c2"} • Get<int> { [BITMAP] [; overriding header: overriding value]* } • BITMAP: • ASCII ‘1’ or ‘0’ • Breaks 1 caveat of RFC 2616, reordering. • Any number of overriding or specified headers
HTTP Requests GET /ltu_assets/images/interface/home_logo.gif HTTP/1.1\r\n Host: www.latrobe.edu.au\r\n GET1: /ltu_assets/images/interface/home_random3.jpg {111111111}\r\n GET2: /images2/home_campuspages.gif {111111111; If-None-Match: "17b477-16ac-3fce87c2"}\r\n GET3: /images2/text_00.gif {111111111}\r\n User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910\r\n Accept: image/png,*/*;q=0.5\r\n Accept-Language: en-us,en;q=0.5\r\n Accept-Encoding: gzip,deflate\r\n Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n Keep-Alive: 300\r\n Connection: keep-alive\r\n Referer: http://www.latrobe.edu.au/\r\n Cookie: phpbb2mysql_data=a%3A0%3A%7B%7D; ltusitevisitor=131.172.xx.xxx.319901096779449440\r\n\r\n
Compression Optimisation • Minimum Bytes – 4380. (3 x 1460 bytes). • Minimum Segments – 3 • Minimum number of References – 5 • HTML EOF / </BODY> received. • 4 Pending and Waiting requests required to permit compression caching.
Multiplexing • Head of the line blocking • Trend to minimise connections, ideally to use only one • Multiplexing means that more objects than the number of connections can be rendered simultaneously • Accelerated delivery of file headers (image dimensions) and HTTP responses • Prolonged transmission – less ‘bursty’ • Delivery prioritisation • Channel identifier ‘Get<int>’ identifier
Normal Response 1.jpg, 6000 Bytes 2.jpg, 4500 Bytes 3.jpg, 3000 Bytes 4.jpg, 450 Bytes 13,950 Bytes MPLEX Response 1.jpg, 6000 Bytes 2.jpg, 4500 Bytes Chunk Size 3.jpg, 3000 Bytes 4.jpg, 1650 Bytes 15,638 Bytes
Stream PDU’s struct mplexChanHdr{ char NameSize; char ChanName[]; u_int ChunkID; u_int CheckSum; u_int FileSize; }; struct mplexHdr{ char Mplex_Definition[10]; u_int NumStreams; u_short ChunkSize; }; struct mplexChunkHdr{ u_int ChunkID; u_int EOF : 1; u_int ChunkLength : 31; };
Protocol Performance Evaluation • Engine Implementation • Page Models • Simulation • Experimentation
Comparative Protocol Evaluation • Implemented a protocol engine for: - • HTTP 1.1 • HTTP-MPLEX • 1 code base / engine per protocol for both native Linux sockets and ns Internet HTTP 1.1 sockets HTTP-MPLEX App/TCP/FullTCP ns
Page Models – 20th July 2005 • Photo Gallery • www.cnn.com • www.whitehouse.gov • www.latrobe.edu.au
Page Models – 20th July 2005 • Photo Gallery • A photo gallery of 48 JPEG tiles and CSS built with Mino Studio. Image references are uniformly spaced at 100 bytes (with the exception of end of row references and start of row references which are separated by 143 bytes). Tiles are on average 3KB. A minimum of 1,997, maximum of 3,776 and standard deviation of 468 bytes. • www.cnn.com • www.whitehouse.gov • www.latrobe.edu.au
Page Models – 20th July 2005 • Photo Gallery • www.cnn.com • An index page of 55.4KB, with 70 widely dispersed references. Referenced objects average 1,720 bytes, with a minimum of 37 and maximum of 28,579 bytes. A standard deviation of 4,070 bytes. • www.whitehouse.gov • www.latrobe.edu.au
Page Models – 20th July 2005 • Photo Gallery • www.cnn.com • www.whitehouse.gov • An index page of 41KB, with 57 references. A tightly clustered number of references are present in the first 8,746 bytes. A common feature of many web pages, these images are used to compose a page banner with different link targets. Images average 3,649 bytes, with a minimum of 43 and maximum 17,729 bytes. A standard deviation of 3,852 bytes. • www.latrobe.edu.au
Page Models – 20th July 2005 • Photo Gallery • www.cnn.com • www.whitehouse.gov • www.latrobe.edu.au • An index page of 21,398 bytes. 25 references to objects are tightly clustered in the middle of the HTML. Referenced objects average 3,042 bytes. A minimum of 43 bytes, maximum of 50,729 bytes and standard deviation of 10,101.
Simulation • ns-2.29-snapshot-20050921 (http://isis.edu.au/nsnam/ns/) • gcc 3.2.3, RH AS 3, pent 4, Kernel 2.4.21-47 • No synthetic loss, delay or jitter. • MTU 1,500 bytes. • 385 bytes of request overhead.
Performance • 1 Connection 16.1% faster using HTTP-MPLEX Best with cnn.com (2), 22.31% HTTP: 21,876 bytes, 26 pkts HTTP-MPLEX: 4,412 bytes, 6 pkts • 2 Connections • 12.9% faster using HTTP-MPLEX • Best with La Trobe University (3), 19.17%
Modified Network Packet Diagram Slow-Start • At connection establishment, the congestion window of the sender (cwnd_) increases by one for each packet acknowledged.
Experimentation • ‘Dedicated’ (uncontested) hardware. • After hours, for limited congestion at University / Internet (AARNET) gateway. • Same protocol engines, but using sockets interface instead of ns.
Experimental Environment • Late at Night • HTTP 1.1 / HTTP-MPLEX interleaved at 2 second intervals • 75 runs • Average – τ • Standard Deviation – σ • 95% Confidence Interval – α • 2 TCP Connections
Outcomes • HTTP-MPLEX • cleans up slow-start • Acclerates servers transmission of packets. • Reduces overhead • Simulation vs. Experimentation • Difference in average performance: 12.9%vs. 25.64% • Simulation ‘clean’ vs. real world, contested, unpredictable. • Performance improvement mainly due to request compression, not response multiplexing. • A very positive outcome.
Future work “A performance analysis of page and object retrieval using HTTP-MPLEX in symmetric network environments” 6th IEEE International Conference on Computer and Information Science(ICIS 2007)July 11-13, 2007Rydges Hotel, Melbourne, Australia - • Larger page survey. • Varying network topology's.
2 4 a: 1, 2; b: 3; a: 1, 2; b: 50; 3 a: 1, 2; Selection of ‘super’ request 1 a: 1, 2; b: 3; c: 4; Similarity dis-similarity
2 4 2 1 3 3 4 a: 1, 2; b: 3; a: 1, 2; b: 50; a: 1, 2; b: 3; c: 4; a: 1, 2; Not ‘b’ b: 50; 1 a: 1, 2; b: 3; c: 4;
Connection Throughput http://www.juicemedia.com.au/cisco/networkers2002/popups/wed_ip_1.htm, Cisco Presentation, Martin Lindeman .
MPLEX Response (2) 1.jpg, 6000 Bytes 2.jpg, 4500 Bytes 3.jpg, 3000 Bytes 4.jpg, 1650 Bytes 15,638 Bytes 1.jpg, 6000 Bytes 2.jpg, 4500 Bytes 3.jpg, 3000 Bytes 4.jpg, 1650 Bytes 15,638 Bytes
MPLEX Response (2) 1.jpg, 6000 Bytes 2.jpg, 4500 Bytes 3.jpg, 3000 Bytes 4.jpg, 1650 Bytes 15,638 Bytes 1.jpg, 6000 Bytes Chunk Size 2.jpg, 4500 Bytes 3.jpg, 3000 Bytes 4.jpg, 1650 Bytes 15,638 Bytes
Chunksize – Varied chunk size ChunkSize: 500 Bytes 1.jpg, 6000 Bytes 2.jpg, 4500 Bytes 3.jpg, 3000 Bytes 4.jpg, 450 Bytes 14,598 Bytes ChunkSize: 3000 Bytes 1.jpg, 6000 Bytes 2.jpg, 4500 Bytes 3.jpg, 3000 Bytes 4.jpg, 450 Bytes 14,422 Bytes (+/- 176 Bytes)
MPLEX Response • An Error. The server may encounter an internal or other error; the server should return the appropriate HTTP 1.x error code. • Non-compliant response. An agent not-compliant with HTTPMPLEX simply ignores the augmented ‘GET<int>’ headers, responding to the parent request only, returning a 200 response code. • Conventional response. The agent de-multiplexes the request header, responding to each request individually as though the requests were HTTP 1.x compliant. Each individual response has a code of 210, a successful serialised response to an HTTP-MPLEX request. Responses are identical to a code 200 response. • A HTTP-MPLEX compliant multiplexed response, with a response code of 211.
HTTP Direction • Traditional Design Principles* • speed (stateless, cacheable, few round-trips) • simplicity • extensibility • data (payload) independence • + Our Direction • Reduce liberal transmission overhead • Reduce connection overhead * - Representational State Transfer:An Architectural Style for Distributed Hypermedia Interaction Roy T. Fieldinghttp://www.ics.uci.edu/~fielding/
HTTP Request Contents • Method (GET, POST, PUT …) • Uniform Resource Identifier (URI) • Protocol version • Host identifier • Session persistent data (Cookies) • Content modifiers • Connection modifiers
Multiplexing Algorithm • De-compress incoming request into individual requests. • Pass requests to waiting httpd threads. - Threads give a traditional 1.1 style response (header & data). • Prefix multiplexed stream with an HTTP response, prefix data segment with stream header, ‘declare’ thread responses with channel header. • Multiplex thread responses by round robin into chunks of size of chunksize. Prefixing chunks with chunk header. • If a specific queue has less than chunksize, no queue will be multiplexed more than that remaining size. • If a queue has more than chunksize but less than chunksize + 2 * sizeof(chunkHdr) – all data from that queue is sent. • If a single stream has data to be transmitted and other queues have no remaining data, transmit remaining que as a large chunk.