1 / 50

Performance of Distributed Systems

Performance of Distributed Systems. Performance Metrics Measurements Performance Modeling Dimensioning Optimization. Performance Metrics. 1. Performance Metrics. Process n 1. Process 2. Process n 2. Process 1. Process 2. Process 1. Request. Response. Process n 4. Process 2.

heidi
Download Presentation

Performance of Distributed Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Performance of Distributed Systems • Performance Metrics • Measurements • Performance Modeling • Dimensioning • Optimization Design of Distributed Software

  2. Performance Metrics 1. Performance Metrics Process n1 Process 2 Process n2 Process 1 Process 2 Process 1 Request Response Process n4 Process 2 Process n3 Process 1 Process 2 Process 1 • Response Times • Throughput Design of Distributed Software

  3. Performance Metrics 1. Performance Metrics • Response Time • as a function of the number of simultaneous requests • Throughput • =max number of simultaneous requests per second Average Variance Worst case Best case Design of Distributed Software

  4. Response Time 1. Performance Metrics Average Response Time Maximumresponse time throughput Offset response time Number of simultaneous requests Design of Distributed Software

  5. Response Time 1. Performance Metrics Composed of : • Tsubm:submission time (+ marshalling) • Tforw : forward transmission time • Twait : time spent in queue before a serving thread can be created • Tproc, invoc:dispatch request + create thread from thread pool + demarshalling • Tproc : server processing time • Tproc, ret : return processing times (marshalling) • Tbackw: backward transmission time • Trec : reception time (+ demarshalling) client server 1 client / 1 server Design of Distributed Software

  6. Response Time 1. Performance Metrics r = Object.invoke (…); Tsubm Tforw Twait Tproc, invoc response time Tproc Tproc, ret Tbackw Trec client server Design of Distributed Software

  7. Tforw, Tbackw 1. Performance Metrics • Is the required time for sending all packets or frames to the destination host • Packet/frame delay is the sum of delays on each subnetwork link traversed by the packet/frame link delay packet delay Design of Distributed Software

  8. Z Y Link Delay 1. Performance Metrics To: Via: Output 2 Y Z Output 3 Propagation delay Transmission delay Queuing delay Processing delay Design of Distributed Software

  9. Link Delay Components 1. Performance Metrics • Processing delay • Delay between the time the packet/frame is correctly received at the head node of the link and the time the packet is assigned to an outgoing link queue for transmission • Queuing delay • Delay between the time the packet/frame is assigned to a queue for transmission and the time it starts being transmitted • Transmission delay • Delay between the times that the first and last bits of the packet/frame are transmitted • Propagation delay • Delay between the time the last bit is transmitted at the head node of the link and the time the last bit is received at the tail node Design of Distributed Software

  10. Twait 1. Performance Metrics Server Process Tproc, invoc+Tproc + Tproc, ret Twait =time spent in queue before a serving thread can be created Cfr modelling packet queuing and transmission time Important term in the response time Design of Distributed Software

  11. Performance of Distributed Systems • Performance Metrics • Measurements • Performance Modeling • Dimensioning • Optimization Design of Distributed Software

  12. Measurements 2. Measurements • Time measurements • C, Java function invocations (cfr gettimeofday) • better option: read register from processor #define RTSC(x) __asm__ __volatile__ ( "rdtsc" \ :"=a" (((unsigned long*)&x)[0]), \ "=d" (((unsigned long*)&x)[1])) main(){ long long t1,t2; RTSC(t1); RTSC(t2); printf("RTSC took: %Ld cycles.\n", t2-t1); RTSC(t1); sleep(1); RTSC(t2); printf("The CPU clock is %Ld MHz.\n", t2-t1); } • store time values in RAM: no disc access during measurements RTSC = Read Time StampCounter Design of Distributed Software

  13. Measurements 2. Measurements • Network measurements • TCPdump • Ethereal • Load measurements • Top, gTop library • Load average = n(t) = number of processes ready for scheduling at time t • %CPU : The task's share of the CPU time since the last screen update, expressed as a percentage of total CPUtime per processor. Design of Distributed Software

  14. Top 2. Measurements Design of Distributed Software

  15. Performance of Distributed Systems • Performance Metrics • Measurements • Performance Modeling • 3.1 Queuing Systems • 3.2 Little’s Theorem • 3.3 Poisson Processes • 3.4 M/M/1 queues • 3.5 M/M/m queues • Dimensioning • Optimization Design of Distributed Software

  16. Performance Modeling 3. Performance Modelling • Predict behaviour of system • Response times • Throughput • Goal: • Determine number of required threads • Number of required servers • Where to instantiate server processes ? • Most important metrics: Twait and Tproc • Need for Queuing system theory ! Design of Distributed Software

  17. Queuing System (1) 3.1 Queueing Systems • Customers (= requests) arrive at random times to obtain service • Service time (= processing delay) is the time to fulfill a request customer (= request) queue service (= request handling) Design of Distributed Software

  18. Queuing System (2) 3.1 Queueing Systems • Assume that we already know: • Customer arrival rate • Customer service rate • We want to know: • Average number of customers in the system • Average delay per customer average delay customer arrival rate customer service rate average # of customers Design of Distributed Software

  19. Definition of Symbols (1) 3.1 Queueing Systems • pn = Steady-state probability of having n customers in the system • l = Arrival rate (inverse of average interarrival time) • m = Service rate (inverse of average service time) • N = Average number of customers in the system Design of Distributed Software

  20. Definition of Symbols (2) 3.1 Queueing Systems • NQ = Average number of customers waiting in queue • T = Average customer time in the system • W = Average customer waiting time in queue (does not include service time) • X = Average service time Design of Distributed Software

  21. Standard Notation of Queuing Systems (1) 3.1 Queueing Systems X/Y/Z/K • X indicates the nature of the arrival process • M: Memoryless (= Poisson process, exponentially distributed interarrival times) • G: General distribution of interarrival times • D: Deterministic interarrival times Design of Distributed Software

  22. Standard Notation of Queuing Systems (2) 3.1 Queueing Systems X/Y/Z/K • Y indicates the probability distribution of the service times • M: Exponential distribution of service times • G: General distribution of service times • D: Deterministic distribution of service times Design of Distributed Software

  23. Standard Notation of Queuing Systems (3) 3.1 Queueing Systems X/Y/Z/K • Z indicates the number of servers • K (optional) indicates the limit on the number of customers in the system • Examples: • M/M/1, M/M/m, M/M/∞, M/M/m/m • M/G/1, G/G/1 • M/D/1, M/D/1/m Design of Distributed Software

  24. Little’s Theorem 3.2 Little’s Theorem • N = Average number of customers • l = Arrival rate • T = Average customer time N = lT • Holds for almost every queuing system that reaches a steady-state • Express the natural idea that crowded systems (large N) are associated with long customer delays (large T) and reversely Design of Distributed Software

  25. Proof of Little’s Theorem (1) 3.2 Little’s Theorem • Assumption: • The system is initially empty • Customers depart from the system in the order they arrive a(t) N(t) delay T2 # of customer arrivals/departures delay T1 b(t) 0 t Design of Distributed Software

  26. Proof of Little’s Theorem (2) 3.2 Little’s Theorem Dividing both expressions by t gives Taking the limit as gives Design of Distributed Software

  27. Application of Little’s Theorem (1) 3.2 Little’s Theorem • NQ = Average # of customers waiting in queue • W = Average customer waiting time in queue NQ = lW • X = Average service time • r = Average # of packets under transmission r= lX • ris called the utilization factor (= the proportion of time that the line is busy transmitting a packet) Design of Distributed Software

  28. Performance of Distributed Systems • Performance Metrics • Measurements • Performance Modeling • 3.1 Queuing Systems • 3.2 Little’s Theorem • 3.3 Poisson Processes • 3.4 M/M/1 queues • 3.5 M/M/m queues • Dimensioning • Optimization Design of Distributed Software

  29. Poisson Process 3.3 Poisson Processes • A stochastic process A(t) (t > 0, A(t) >=0) is said to be a Poisson process with rate l if • A(t) is a counting process that represents the total number of arrivals in [0, t] • The numbers of arrivals that occur in disjoint intervals are independent • The number of arrivals in any [t, t + t] is Poisson distributed with parameter lt Design of Distributed Software

  30. Properties of Poisson Process (1) 3.3 Poisson Processes • Interarrival times tn are independent and exponentially distributed with parameter l • The mean and variance of interarrival times tn are 1/l and 1/l^2, respectively Design of Distributed Software

  31. Properties of Poisson Process (2) 3.3 Poisson Processes • If two or more independent Poisson processes A1, ..., Ak are merged into a single processA = A1 + A2 + ... + Ak, the process A is Poisson with a rate equal to the sum of the rates of its components l1 merge A1 li Ai A Poisson process lk Ak independent Poisson processes Design of Distributed Software

  32. Properties of Poisson Process (3) 3.3 Poisson Processes • If a Poisson process Ais split into two other processesA1and A2 by randomly assigning each arrival to A1or A2, processes A1and A2 are Poisson with probability p split randomly l1 A1 A with probability (1-p) Poisson process l2 A2 Poisson processes Design of Distributed Software

  33. M/M/1 Queuing System 3.4 M/M/1 queues • A single queue with a single server • Customers arrive according to a Poisson process with rate l • The probability distribution of the service time is exponential with mean 1/m single server Poisson arrival with arrival rate l Exponentially distributed service time with service rate m infinite buffer Design of Distributed Software

  34. M/M/1 Queuing System: Results (1) 3.4 M/M/1 queues • Utilization factor (proportion of time the server is busy) • Probability of n customers in the system • Average number of customers in the system Design of Distributed Software

  35. M/M/1 Queuing System: Results (2) 3.4 M/M/1 queues • Average customer time in the system • Average number of customers in queue • Average waiting time in queue Design of Distributed Software

  36. M/M/m Queuing System 3.5 M/M/m queues • A single queue with m servers • Customers arrive according to a Poisson process with rate l • The probability distribution of the service time is exponential with mean 1/m m servers 1 Poisson arrival with arrival rate l Exponentially distributed service time with rate m m infinite buffer Design of Distributed Software

  37. M/M/m Queuing System: Results (1) 3.5 M/M/m queues • Ratio of arrival rate to maximal system service rate • Probability of n customers in the system Design of Distributed Software

  38. M/M/m Queuing System: Results (2) 3.5 M/M/m queues • Probability that an arriving customer has to wait in queue (m customers or more in the system) • Average waiting time in queue of a customer • Average number of customers in queue Design of Distributed Software

  39. M/M/m Queuing System: Results (3) 3.5 M/M/m queues • Average customer time in the system • Average number of customers in the system Design of Distributed Software

  40. Twait calculation 3.5 M/M/m queues Average Twait m=2 m=1 m=8 m=4 load r = l/m.m 0 1 Design of Distributed Software

  41. Performance of Distributed Systems • Performance Metrics • Measurements • Performance Modeling • Dimensioning • Optimization Design of Distributed Software

  42. Calculation of required threads 4. Dimensioning m=2 Average Twait ... ... m=1 DesiredAverage Twait m=4 m=8 8 0 1 2 4 l/m Measuredl/m Design of Distributed Software

  43. Dimensioning 4. Dimensioning • Determine number of required threads • Number of required servers • Evaluation of clustering modes • i.e. how to best group process on the workstations Design of Distributed Software

  44. CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP hierarchical control architecture Multiple Servers 4. Dimensioning CP = control performer Example : flat control architecture Design of Distributed Software

  45. CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP CP 256 1024 4 16 64 Number of Switches Multiple Servers 4. Dimensioning CP CP CP CP CP CP Use of previous formulas : flat architecture hierarchical architecture 100 s flat architecture hierarchical architecture IBM Nways 8265 ATM switches SNMP/CORBA gateways CORBA Implementatie: Orbix 2.3 Solaris Ultra Sparc 5 werkstations (100 MBit/s Ethernet) Theoretisch model (netwerk van wachtlijnen) 10 s Setup-Time 1 s 6 hierarchical layers 100 ms Design of Distributed Software

  46. Performance of Distributed Systems • Performance Metrics • Measurements • Performance Modeling • Dimensioning • Optimization Design of Distributed Software

  47. Resource Optimization 5. Resource Optimization • Resource optimization • Determine where to start a new process • Based on current load of the workstations • Transparent for the users • Independent of Operation System of workstations Need for Cluster management system - MOSIX - CORBA/J2EE Cluster Management System Design of Distributed Software

  48. Mosix Cluster Mosix cluster management platform 5. Resource Optimization Mosix01:~$ start_task Linux Workstations Properties Mosix: - Only for Linux - No efficient communication between components - Cluster can get overloaded when too many tasks (no task management) Design of Distributed Software

  49. start_task(task_info) Cluster management platform CORBA/J2EE cluster management platform 5. Resource Optimization Software Task mgmt Linux Workstation Windows NT/98/2000/XP Properties - Independent of operating system - Task Management - Efficient communication between components - Sub-clusters possible Solaris Workstation Design of Distributed Software

  50. Taak Management Execution- Server Execution- Server Uitvoerings- Server Uitvoerings- Server Uitvoerings- Server Uitvoerings- Server Uitvoerings- Server Uitvoerings- Server Uitvoerings- Server Execution- Server Uitvoerings- Server Execution- Server Software Balancing Server Balancing Server Monitor Cluster Balancing Coordinator Monitor Monitor Monitor Monitor Monitor Monitor Monitor Monitor Monitor Monitor Monitor Subcluster Coordinator Subcluster Coordinator Taakbeheer Cluster Coordinator CORBA Clusterbeheerplatform Architecture Cluster Management Platform 5. Resource Optimization Design of Distributed Software

More Related