Norwegian University of Science and Technology Department of Telematics Page 1 of?? Contact during exam [Faglig kontakt under eksamen]: Poul E. Heegaard (94321 / 99286858) EXAM IN COURSE [EKSAMEN I EMNE] TTM4110 Dependability and Performance with Discrete event Simulation [Pålitelighet og ytelse med simulering] Wednesday [Onsdag] 2010-12-08 09:00 13:00 The English version starts on page 2. Bokmålsutgaven starter på side 5. Hjelpemidler: C - Graham Birtwistle: DEMOS - A system for Discrete Event Modelling on Simula. Formula sheet for TTM4110 Dependability and Performance with Discrete Event Simulation is attached. Predefined simple calculator. Graham Birtwistle: DEMOS - A system for Discrete Event Modelling on Simula. Formelsamling i fag TTM4110 Pålitelighet og ytelse med simulering er vedlagt. Forhåndsbestemt enkel kalulator.] Sensur 2011-week 2
Page 2 of?? English version 1 GreenCloud is a small medium enterprise (SME) that provides a service A on a server park with three servers, C1,C2 and C3. They have some problems with stability and performance and would like to consider to consolidate their servers into a private cloud and maybe add computing resources from a public cloud provider. The solution they are considering is to let their three servers form a private cloud and to buy additional computing resources from public cloud provider 1 and 2, routed via network 1 or 2. This hybrid cloud solution is illustrated in Figure 1. Service A Private cloud Network 1 Public cloud 1 X C1 C2 C3 Network 2 Public cloud 2 Figure 1: Hybrid Cloud Computing System. Let p i be the probability that a successful service A request is handled by cloud i (i = A, A1,A2). The service times, S i, are deterministic. See Table 1 for numerical values. Table 1: Service times in the hybrid cloud i Cloud E(S i ) p i A Private 1/10 0.80 A1 Public 1 1/5 0.15 A2 Public 2 1/2 0.05 a) Plot the probability mass function for the service times in the hybrid cloud. Determine the expected service time, E(S), and the variance, V ar(s)? What is the expected service time given that the service is served by one of the public clouds? In the following, assume that the service time in the private cloud is negative exponentially distributed with expectation E(S A )=1/µ A, while in the public clouds 1 and 2 it is negative exponentially distributed with expectations E(S A1 )=1/µ A1 and E(S A2 )=1/µ A2, respectively. b) Describe a generator of random variates of service times in the hybrid cloud. List the requirements for a random number generator. Figure 2 shows the empirical cumulative distribution function (CDF) after 1000 samples of the random variate generator above. 1 In case of divergence between the English and the Norwegian version, the English version prevails.
Page 3 of?? empirical CDF 1.0 0.8 0.6 0.4 0.2 0.1 0.2 0.3 0.4 0.5 service time Figure 2: Empirical cumulative distribution function (CDF) for service times in the hybrid cloud. c) Study the CDF and explain whether this distribution is symmetric or non-symmetric around the mean value. Define a quantile in a distribution? What is the 90% quantile in the CDF above (read approximately from the Figure 2)? Now, assume that in the private cloud each server can handle only one request of service A at the time. If all three servers are busy the service request is rejected. The requests for service A are generated from an infinte population according to a Poisson process with intensity A =9. The GreenCloud company have trouble with the rejected request and would like to consider the following two options: 1. Buy an additional server for their own privat cloud. The operational cost is c A =1per server (ignore the capital costs in this case). 2. Buy extra capacity from public cloud providers. Cost is c A1 =5and c A2 =2for public cloud 1 and 2, respectively. You pay only when the computer is in use. First consider the initial setup with only three servers in a private cloud. d) Make a Markov model of this private cloud and determine the average number of servers in use and the probability of rejected service requests. Now, extend the private cloud with one server. e) Extend the Markov model from the previous task with one server extra. Determine the probability of rejected service requests now with four servers instead of three. Show how you can apply the Recursive Erlang s B-formula to obtain this. The alternative is to extend the capacity in the private cloud configuration with three server by buying capacity from public cloud providers. Through a service level agreement (SLA) GreenCloud is allowed to run one single process at the time on each of the two public clouds. If all three servers in the privat cloud are busy the service request is routed to the public cloud, and if any of the private cloud servers become idle then the process running on the public cloud will immediately be moved to the idle server in the private cloud.
Page 4 of?? f) Extend the Markov model from d) with two public cloud servers. Define explicitly the state variable/vector in your model. Assume that public cloud 1 is selected if both public cloud are available and that processes are NOT moved from one public cloud to another. Given that the steady state probabilities are known (you should not obtain these) how can you determine the server utilization in the three different clouds expressed by the steady state probabilities? The GreenCloud company pays only for the time the server in the public cloud is busy. In Table 2 you find the the steady state probabilities p i1 i 2 of that public cloud k is in state i k =0, 1 (represent the number of busy servers in public cloud k =1, 2). The probabilities p 0 i 1 i 2 are for the case where cloud 2 is selected over cloud 1 when both public clouds are available. Table 2: Steady state probabilities of public clouds i 1 i 2 p i1 i 2 p 0 i 1 i 2 0 0 0.98422 0.98284 0 1 0.00015 0.01342 1 0 0.01254 0.00038 1 1 0.00309 0.00336 g) What are the operational costs for the configurations in e) and f)? Compare the two alternative configurations for the use of public clouds, i.e., selecting public cloud 1 over cloud 2 and vice versa. Discuss whether, and why you prefer one of the configurations over the other. In order to improve the robustness the GreenCloud company would like to have an agreement with at least two providers. At least one server must be working to provide service A. Servers in the private and public clouds may fail according to a Poisson process with intensity S. Similarly, the networks fail according to a Poisson process with intensity N. h) Establish a reliability block diagram to determine the reliability function of service A. What is the MTFF in the private cloud? The servers in the private cloud will be repaired by a single, shared repairman. The repair time is negative exponentially distributed with intensity µ S. i) Determine symbolically the steady state availability of the private cloud. How will it affect your approach and solution if you assume multiple, independent repairmen instead of a single, shared repairman? Finally, GreenCloud would like to add another service B. Due to privacy this service can only be executed on the private cloud. Service B will have non-preemptive priority over service A. Service A can still be executed both on the private and public clouds. The objective is to calculate the cost of providing service A and B and the corresponding rejection probabilities. j) Make a simulation model of this system. 1. What is the system state and corresponding events in your model? 2. Which system components are entities and resources in your model? 3. Describe the dynamics and interaction in the simulation model by activity diagrams. 4. How do you collect statistics to estimate the performance attributes in your objectives?
Page 5 of?? Norsk bokmål utgave 2 GreenCloud er en liten mellomstor bedrift (SMB) som tilbyr en tjeneste A over en serverpark med tre servere, C1,C2 og C3. De har erfart noen problemer med stabilitet og ytelse, og ønsker derfor å vurdere å konsolidere sine servere i en privat sky (cloud), eventuelt utvidet med ressurser fra en eller flere offentlig skyleverandører. Løsningen de vurderer er å la sine tre servere danne en privat sky og leie ekstra dataressurser fra de offentlige skytilbyderne 1 og 2 som rutes via kommunikasjonsnettet 1 eller 2. Denne hybridsky løsningen er illustrert i figur 1 (side 2). La p i være sannsynligheten for at en vellykket tjeneste-forespørsel håndteres av sky i (i = A, A1,A2). Betjeningstidene, S i, er deterministisk. Se tabell 1 for numeriske verdier. a) Plot sannsynlighetstetthets-funksjon (probability mass function) for betjeningstiden i hybridskyen. Bestem forventet betjeningstid, E(S), og variansen, V ar(s)? Hva er forventet betjeningstid gitt at tjenesten blir betjent av en av de offentlige skyene? I det følgende anta at betjeningstiden i den private skyen er negativt eksponentialfordelt med forventning E(A A ) = 1/µ A, mens i de offentlig skyene 1 og 2 er betjeningstiden negativt ekponentialfordelt med forventning henholdsvis E(S A1 )=1/µ SA1 og E(S A2 )=1/µ SA2. b) Beskriv en generator av tilfeldige variater av betjeningstidene i hybridskyen. Hvilke krav stilles til en et tilfeldig tall generator? Figur 2 viser den empiriske kumulative fordelingsfunksjon (CDF) etter 1000 punktprøver fra generatoren over. c) Studer denne CDFen og forklare om fordelingen er symmetrisk eller ikke-symmetrisk rundt middelverdien. Definer en kvantil i en fordeling? Hva er 90% kvantilen i CDF ovenfor (les av ca verdi fra figur 2)? Bedriften GreenCloud har problemer med tap av tjenesteforespørsler og ønsker å vurdere følgende to alternativer: 1. Kjøp en tilleggsserver til sin egen private sky. Den operative kostnaden er c A =1per server (kapitalkostnader ignoreres i dette tilfellet) 2. Kjøp ekstra kapasitet fra offentlige skytilbydere. Kostnad er c A1 =5og c A2 =2for henholdsvis sky 1 og 2. Bedriften betaler kun når maskinen er i bruk. Først skal du vurdere dagens oppsett med bare tre servere i et privat sky. d) Lag en Markov modell av denne private skyen og bestem gjennomsnittlig antall servere i bruk og sannsynligheten for avviste tjenesteforespørsler. Deretter utvider du den private skyen med én server. e) Utvid Markov-modellen fra forrige punkt med en ekstra server. Bestem sannsynligheten for avviste tjenesteforespørsler med fire servere i stedet for tre. Vis hvordan du kan bruke den rekursive Erlang s B-formel for å beregne dette. 2 I tilfelle uoverensstemmelse mellom den engelske og norske utgaven, er det den engelske som er gjeldende. Engelske betegnelser anvendes hvor ingen norsk oversettelse ble funnet.
Side 6 av?? Et annet alternativ er å utvide den private skyen ved å kjøpe kapasitet fra en offenlig skytilbyder. Gjennom en service level agreement (SLA) har GreenCloud lov til å kjøre en prosess ad gangen på av hver av de to offentlige skyene. Hvis alle tre servere er opptatt så vil tjenestforespørselen rutes til en offentlige sky. Videre, hvis en av serverene i den private skyen blir ledig så vil prosessen som kjører på den offentlig skyen umiddelbart bli flyttet til den inaktive serveren i den private skyen. f) Utvid Markov modellen fra d) med to offentlige skytilbydere. Definer eksplisitt tilstandsvariablen/vektoren for modellen. Anta at den offentlige skyen 1 velges når begge de offentlige skyen er ledige, og at en prosessene IKKE flyttes fra en offentlig sky til en annen. Gitt at stasjonærsannsynlighetene er kjent (du skal ikke finne disse), hvordan kan du bestemme server-utnyttelsen i de tre forskjellige skyene uttrykt ved stasjonærsannsynlighetene? GreenCloud betaler kun for den tiden serveren i det offentlige skyen er opptatt. I tabell 2 finner du stasjonærsannsynlighetene p i1,i 2 for at sky k er i tilstand i k =0, 1 (representerer antall servere i bruk i k =1, 2). Stasjonærsannsynlighetene p 0 i 1,i 2 gjelder tilfellet der sky 2 velges først framfor sky 1. g) Hva er driftskostnadene for konfigurasjonene i e) og f)? Sammenlign de to alternative konfigurasjonene for bruk av de offentlige skyene, dvs. velge offentlige sky 1 framfor sky 2 og vica versa). Diskuter om, og hvorfor, du foretrekker en av de konfigurasjonene over den andre. For å bedre robustheten i GreenCloud ønsker de å ha en avtale med minst to tilbydere. Minst én server må være tilgjengelig for at tjeneste A skal kunne tilbys. Servere i den private og de offentlige skyene kan feile i henhold til en Poisson prosess med intensitet S. Tilsvarende kan nettet feile i henhold til en Poisson prosess med intensitet N. h) Etabler er pålitelighetsblokkskjema for å bestemme funksjonssikkerheten (reliability function) av tjeneste A. Hva er MTFF i den private skyen? Serverene i den private skyen vil bli reparert av en enkelt, felles reparatør. Reparasjonentiden er negativt eksponensialfordelt med intensitet µ S. i) Bestem symbolsk stasjonærtilgjengeligheten i den private skyen. Hvordan vil det påvirke din tilnærming og løsning hvis du antar flere, uavhengig reparatører stedet for en enkelt, felles reparatør? GreenCloud ønsker å legge til en ny tjeneste B. På grunn av personvernet skal denne tjenesten kun utføres på den private skyen. Service B vil ha ikke-preemptive prioritet over tjeneste A. Denne kan fortsatt bli utført både på den private og de offentlige skyene. Målet er å beregne kostnadene ved å tilby tjeneste A og B og sannsynlighetene for avviste tjenesteforespørsler. j) Lag en simuleringsmodell av dette systemet. 1. Spesifiser systemtilstanden (system state) og korresponderende hendelser (events)? 2. Hvilke systemkomponenter modelleres som entiteter (entities) og hvilke som ressurser (resources)? 3. Deskriv dynamikken og interaksjonene i simuleringsmodellen ved hjelp av aktivitetsdiagrammer (activity diagrams). 4. Hvordan vil du samle inn nødvendig statistikk for å kunne estimere de ytelsesparametrene (performance attributes) som er formålet med undersøkelsen (objectives)?