Performance Modelling with Adaptive Hidden Markov Models and Discriminatory Processor Sharing Queues
Total Page:16
File Type:pdf, Size:1020Kb
Department of Computing Imperial College London Performance Modelling with Adaptive Hidden Markov Models and Discriminatory Processor Sharing Queues Tiberiu Chis Submitted in part fulfilment of the requirements for the degree of Doctor of Philosophy in the Department of Computing at Imperial College London July 25, 2016 Declaration of originality I declare that this thesis was written by myself and the work presented here is my own, unless otherwise stated. Copyright declaration The copyright of this thesis rests with the author and is made available under a Creative Commons Attribution Non-Commercial No Derivatives licence. Researchers are free to copy, distribute or transmit the thesis on the condition that they attribute it, that they do not use it for commercial purposes and that they do not alter, transform or build upon it. For any reuse or redistribution, researchers must make clear to others the licence terms of this work. ii Abstract In modern computer systems, workload varies at different times and locations. It is im- portant to model the performance of such systems via workload models that are both representative and efficient. For example, model-generated workloads represent realistic system behaviour, especially during peak times, when it is crucial to predict and address performance bottlenecks. In this thesis, we model performance, namely throughput and delay, using adaptive models and discrete queues. Hidden Markov models (HMMs) parsimoniously capture the correlation and burstiness of workloads with spatiotemporal characteristics. By adapting the batch training of standard HMMs to incremental learning, online HMMs act as benchmarks on workloads obtained from live systems (i.e. storage systems and financial markets) and reduce time complex- ity of the Baum-Welch algorithm. Similarly, by extending HMM capabilities to train on multiple traces simultaneously it follows that workloads of different types are modelled in parallel by a multi-input HMM. Typically, the HMM-generated traces verify the through- put and burstiness of the real data. Applications of adaptive HMMs include predicting user behaviour in social networks and performance-energy measurements in smartphone applications. Equally important is measuring system delay through response times. For example, work- loads such as Internet traffic arriving at routers are affected by queueing delays. To meet quality of service needs, queueing delays must be minimised and, hence, it is important to model and predict such queueing delays in an efficient and cost-effective manner. There- fore, we propose a class of discrete, processor-sharing queues for approximating queueing delay as response time distributions, which represent service level agreements at specific spatiotemporal levels. We adapt discrete queues to model job arrivals with distributions given by a Markov-modulated Poisson process (MMPP) and served under discriminatory processor-sharing scheduling. Further, we propose a dynamic strategy of service alloca- tion to minimise delays in UDP traffic flows whilst maximising a utility function. iii Acknowledgements I would sincerely like to thank Professor Peter Harrison for allowing me to be his PhD student. The research achieved in this thesis would not exist without his support, wisdom and contributions. Professor Harrison has guided me through difficult concepts in queue- ing theory and has offered valuable experience in the world of research and beyond! I will always cherish my time at Imperial College, from the early days as an indecisive un- dergraduate joining in 2007 to more than eight years later as a PhD candidate submitting his thesis. Throughout my struggles and (many) lessons learnt, these years in academia were truly golden and I thank Professor Harrison for giving me the chance to be a part of it. I am also grateful to Professor William Knottenbelt for being my second supervisor dur- ing the PhD. He provided expert advice, has led by example and often encouraged me during the conferences and workshops we attended together. I would like to thank the many members of my research group, past and present, that have bettered my experi- ence and taught me many important skills. I am proud to call the following colleagues my friends, in order of acquaintance: Anton, Chris, Tony, Jeremy, Giuliano, Gareth, Uli, Richard, Nigel, Iryna, Zhan, Weikun, Rasha, Juan, April, Silvia, Nicolai, David, Ilya, Victoria, Daniel, Pooyan, Andrea, Salvatore, Tanya and Ruth. An honourable mention goes to the reliable and helpful Amani, the friendly support staff including Ann, Barbara, Bridget, Teresa, Sarah, Mark, and the Computer Support Group including Geoff, Lloyd, and Duncan. Further, I would like to thank my DramSoc friends including Tosin, Kristen, Owain, Megan, Simon and, more recently, Fahdi from ICTV. These talented individuals allowed me to act alongside a great bunch of people in theatrical plays and short films, which I will always treasure with fond memories. Last but not least, thank you to my amazing family, Liliana, Diana, Mircea and my grand- parents, for their love, inspiration and putting up with me for the last 27 years! Without you, I would not be here. Thank you to my wonderful girlfriend, Florence, for her love and support and to her awesome family, Luke, Leonie and Ella. Another thank you goes to my legendary friends from Imperial and beyond, which include Levitt, Mikey, James, Chris Marsh, Alexandra, Dino, Jay, Anna, Hemal, Eemaan, John Paul, Gajan, Richard, Karin, Mitesh, Tom, Nic, Vera, Ravi, Frank, Christina, Jamie, Lindsay, Paul, Sinead, Ziggy, Mark, Shamini, Rebecca, Jack, Mira, Patrick and all the usual suspects. You have made these last few years a blast! iv Contents 1 Introduction 1 1.1 Motivation . .1 1.2 Objectives . .3 1.2.1 Adaptive workload models . .3 1.2.2 Analytical queueing models . .5 1.3 Thesis outline and contributions . .7 1.4 Related publications . .9 2 Background 13 2.1 Introduction . 13 2.2 Unsupervised learning models . 13 2.2.1 Model selection . 14 2.2.2 Clustering . 15 2.2.3 Method of moments . 18 2.2.4 Hidden Markov Models . 18 2.2.5 Normalisation for underflow . 24 2.2.6 HMM applications . 26 2.2.7 MAPs and MMPPs . 29 2.3 Queueing models . 31 2.3.1 Scheduling . 31 2.3.2 Type of queueing systems . 32 2.3.3 PS applications . 33 2.3.4 Response times . 34 2.3.5 Response time in PS queues . 34 2.3.6 Queueing with MMPPs . 37 2.3.7 Response time in MMPP/M/1 queues . 38 2.4 Performance-energy applications . 40 2.4.1 Measuring smartphones . 40 2.4.2 Data transmission and cellular radio modes . 41 2.4.3 Battery guidelines . 43 2.4.4 Existing battery models . 44 2.4.5 Modelling data centres . 45 v CONTENTS 3 Adaptive Workload Models 47 3.1 Introduction . 47 3.2 Incremental HMM . 49 3.2.1 Motivation . 50 3.2.2 Adaptive Baum-Welch algorithm . 50 3.2.3 IncHMM simulation . 54 3.2.4 Results . 55 3.2.5 Related work . 57 3.2.6 Conclusion and future work . 57 3.3 Sliding HMM . 58 3.3.1 Motivation . 58 3.3.2 Simple moving average . 59 3.3.3 Sliding Baum-Welch algorithm . 59 3.3.4 SlidHMM convergence rates . 60 3.3.5 SlidHMM simulation . 60 3.3.6 Results . 61 3.3.7 Conclusion and future work . 62 3.4 Multi-dimensional HMM . 63 3.4.1 Motivation . 63 3.4.2 MultiHMM algorithm . 64 3.4.3 MultiHMM simulation . 66 3.4.4 Results . 66 3.4.5 MultiHMM advantages . 70 3.4.6 Related work . 71 3.4.7 Conclusion and future work . 71 3.5 Online HMM . 72 3.5.1 Motivation . 73 3.5.2 OnlineHMM simulation . 73 3.5.3 Results . 75 3.5.4 Conclusion and future work . 78 4 Queueing Models 80 4.1 Introduction . 80 4.2 M/M/1-EPS queues . 81 4.2.1 Motivation . 81 4.2.2 EPS queue assumptions . 82 4.2.3 Obtaining response time moments for EPS queues . 82 4.2.4 Kim and Kim’s response time moments for EPS queues . 84 4.2.5 Simulating M/M/1-EPS response time moments . 86 4.2.6 Conclusion and future work . 88 4.3 M/M/1-DPS queues . 88 4.3.1 Motivation . 88 4.3.2 Moment-generating algorithm for DPS queues . 89 4.3.3 Case study- M/M/1-DPS analytical response times . 90 vi CONTENTS 4.3.4 Numerical algorithm for higher response time moments . 91 4.3.5 Case study- M/M/1-DPS analytical and simulated moments . 93 4.3.6 Conclusion and future work . 95 4.4 MMPP/M/1-DPS queues . 96 4.4.1 Motivation . 96 4.4.2 Weighted superposition for DPS queues . 96 4.4.3 Response time density . 97 4.4.4 Data sets . 99 4.4.5 Results . 100 4.4.6 Moments for MMPP(2)/M/1-EPS queue . 100 4.4.7 Moments for MMPP(2)/M/1-DPS queue . 102 4.4.8 Moments for MMPP(4)/M/1-DPS queue . 104 4.4.9 Conclusion and future work . 106 5 Applications 108 5.1 Introduction . 108 5.2 Financial forecasting strategy . 108 5.2.1 Motivation . 108 5.2.2 Collecting time-series . 109 5.2.3 FTSE and NASDAQ traces . 110 5.2.4 Conclusion . 111 5.3 Performance-energy modelling in smartphones . 111 5.3.1 Motivation . 111 5.3.2 Data set . 112 5.3.3 Strategy 1: Power consumption model . 114 5.3.4 Strategy 2: Performance-energy trade-off ............. 116 5.3.5 Conclusion and future work . 117 5.4 Traffic flow model . 118 5.4.1 Motivation . ..