350 likes | 498 Views
Proxy Benchmarking. Instructors: Rueven Cohen Itai Dabran Submitting: Oren Mishali 033771379 Mattan Winaver 033603192 Carmit Tamir 032925935 Yael Goren 034925123. Agenda Problem definition Problem conditions The project model Algorithms Results
E N D
Proxy Benchmarking Instructors: Rueven Cohen Itai Dabran Submitting: Oren Mishali 033771379 Mattan Winaver 033603192 Carmit Tamir 032925935 Yael Goren 034925123
Agenda • Problem definition • Problem conditions • The project model • Algorithms • Results • General observations & conclusions
Problem Definition requests requests Proxy1 cache Proxy2 cache hosts data data • Hosts request data (html, etc.) from proxy1 over TCP (http). • Proxy1 requests data from proxy2 over UDP (ICP). • Proxy2 sends data to proxy1 over TCP (http). • Proxy1 sends data to hosts over TCP (http).
Problem Definition (cont.) • Our focus: • The data sent from proxy2 (“server”) to proxy1(“client”). • The client initiates plenty of requests (interested in quick response). • The server transmits lots of data (wishes to satisfy the client). • Server’s goal: • Transmitting the data in the quickest manner. • (will be our project goal too…)
Problem Conditions transmitted data clients requests Server Client • Client requests: • various sizes • different arrival times. • Transmitted data: • over N TCP connections.
What have we seen so far ? • We are interested in transmitting the files in the “quickest manner”. • This raises some questions: • What are the criterias for the “quickest manner” ? • (total time, others…) • Which factors affect these criterias ? • (transmission rate, number of TCP connections, algorithm used).
The project model • Server input • Technical details • Calculations • Time criterias
The project model (cont.) Server input • 100,000 requests. • Requests consist of 4 file types: • 1KB, 4KB, 16KB, 64KB • Each type with different frequency: • 1KB: 80% • 4KB: 15% • 16KB: 4% • 64KB: 1% • The calculated the average file size: • AvgSize = 0.8*1 + 0.15*4 + 0.04*16 + 0.01*64 = 2.68KB = 21.44 Kb
The project model (cont.) Technical details • Transmission rate (Trate): 100 Mb/sec. • Server and clients run on NT machines. • Server machine has 254 MB RAM. • Client machine has 126 MB RAM.
The project model (cont.) Calculations • The calculated µ (service rate): • µ = Trate / Avgsize = 4591 files/sec • We determine ρ to be 0.9 • The calculated λ: • ρ = λ / µ =>λ = ρ * µ = 4132
The project model (cont.) Time criterias • 2 criterias are defined. • Will reflect performance. • Terms: • T(Ri): The time a request Ri is received. • F(Ri): The time a request Ri has been delivered. • S(Ri): The size of the requested object. • R(Ri): ( F(Ri) - T(Ri) ) / S(Ri). • Criterias: • Total Time: F(last request) – T(first request) • Total Ratio (TR): Σ R(Ri) 100,000 i=1
Algorithms • Round Robin • Shared Queue • Sized Queue
Algorithms (cont.) Round Robin • Next file goes to connection (i+1) mod N. • i : the connection of the previous file. • N : number of connections. • Each connection has it’s own queue. • Advantage: simplicity of implementation. • Disadvantage: May suppress parallelism of threads, due to dependency between threads.
Algorithms (cont.) Round Robin • Round Robin ++ • Similar to Round Robin .The difference is that in Round Robin, each thread had one sending buffer, and its size was 1. Now, each thread has a single buffer, but its size is 100. • Advantages: the probability that threads will be blocked while waiting for their turn reduces significantly compared to Round Robin. • Transmission of data is now more effective, and more parallel.
Algorithms (cont.) Shared Queue • All the files are queued together. • A file is served by the first available connection. • Advantages: • - simple implementation. • - supports parallelism of threads (no dependencies). • Disadvantages: • - Files are served according to their appearance.
Algorithms (cont.) Sized Queue • 4 queues – one for each category. • Files are served according to several algorithms. • Advantage: “quickest cashier” • Implemented in several ways …
Algorithms (cont.) Sized Queue Static Allocation preliminary division of the threads to the queues. Advantage: - Simple implementation Disadvantage: - Difficulty in allocating the threads.
Algorithms (cont.) Sized Queue Maximal algorithm The file is taken from the busiest queue (according to size or number of requests). Advantages: - supports parallelism of threads (no dependencies). - preference to small files. Disadvantages: - complex implementation
Results • Various experiments have been made testing performance against several parameters: • - Number of TCP connections. • - Scheduling algorithm. • - Packet network loss (simulated by NIST).
Results (cont.) Total Time vs. N – 0% losses
Results (cont.) Total Ratio vs. N – 0% losses
Results (cont.) 0% losses • Observations: • - No significant change while increasing N. • - No preferred Algorithms. • Discussion points: • - Multiplicity of threads may help while facing packet losses(backup). • - In our case, no need for backup ! • - Moreover, further increasing may damage performance. • - The Round Robin disadvantage isn’t expressed.
Results (cont.) Total Time vs. N – 0.1% losses
Results (cont.) Total Ratio vs. N – 0.1% losses
Results (cont.) 0.1% losses • Observations: • - Improvement in performance till N=2 • - For larger values of N, same performance. • - No preferred algorithms. • Discussion points: • - Working with several connections starts to pay off. • - No need in many connections (N=2 is enough). • - The Round Robin disadvantage is still not noticed.
Results (cont.) Total Time vs. N – 1% losses
Results (cont.) Total Ratio vs. N – 1% losses
Results (cont.) 1% losses • Observations: • - Round Robin’s performance improves as N increases. • - Round Robin’s performance is worse than others. • - The other 3 behave similarly: • Improvement in performance till N=5. • For larger values of N, same performance. • Discussion points: • - The Round Robin disadvantage is noticed. • - Working with several connections improves performance.
Results (cont.) Total Time vs. N – 3% losses
Results (cont.) Total Ratio vs. N – 3% loss
Results (cont.) 3% losses • Observations: • - Round Robin’s performance improves as N increases. • - The other 3 behave similarly: • Improvement in performance till N=15. • For larger values of N, same performance. • Discussion points: • - As packet loss increases, more connection are needed to compensate the loss.
Results (cont.) Static Allocation • Observations: • - Shows the worst performance. • - Worst performance for N=6. • - Repeating pattern for all loss rates. • - No improvement while increasing N. • Discussion points: • - Is the Static allocation efficient ?
General observations & conclusions • In case of packet loss working efficiently with several connections improves performance. • As packet loss rate raises, no. of TCP connections needed for optimal performance increases. • 3 different algorithms showed almost the same performance. • In all of them, TCP connections are: • - working independently in their own rate . • - Receiving files by their demand. • - Unoccupied only when no requests are available.