簡易檢索 / 詳目顯示

研究生: 賴俊宇
Chun-Yu Lai
論文名稱: Linux 核心負載均衡機制的效能評比
Performance Evaluation of Linux Kernel Load Balancing Mechanisms
指導教授: 張韻詩
Jane W.S. Liu
金仲達
Chung-Ta King
口試委員:
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 資訊工程學系
Computer Science
論文出版年: 2006
畢業學年度: 94
語文別: 英文
論文頁數: 121
中文關鍵詞: Linux多處理器排程負載均衡Scheduling domain
外文關鍵詞: Linux, multiprocessor scheduling, load balancing, scheduling domain
相關次數: 點閱:2下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 隨著多處理器系統的發展,負載均衡問題顯得愈形困難。作業系統無法在不了解底層多處理器架構的狀況下,作出適當的負載均衡決策。Scheduling domain是Linux核心2.6.8版所提出的概念。它的目的是更精確地呈現多處理器系統的架構,以便支援負載均衡的判斷。除此之外,Linux核心採用了許多負載均衡參數,來幫助決定工作行程要如何搬移。參數值的選擇和他們之間的交互作用,可以決定系統整體的效能表現,在不同的系統工作負荷下,以及不同的系統組態設定下,相同的負載均衡方法都可能產生不同程度的效能提昇。

    這樣的情形促使我們著手這篇論文的效能評比研究。本篇論文的效能評比,是利用模擬兩種不同版本的Linux核心負載均衡機制,包括Linux核心2.6.5版和2.6.10版。在2.6.5版中沒有Scheduling domain的概念,而2.6.10版有。藉由比較這兩個版本,我們觀察到負載均衡決策產生的影響、每種負載均衡方案的適用時機,以及不同負載均衡參數的效果。論文裡所收集到的資料可顯示出,不同的負載均衡方案會對不同種類的工作行程產生不同的效能影響。這樣的資訊能幫助我們在面臨不同的效能取捨時,選擇適當的負載均衡策略。

    關鍵字: Linux,多處理器排程,負載均衡,Scheduling domain


    Recent advances in multiprocessor system architecture and technology have made load balancing a significantly more challenging problem. The operating system cannot make sound load balancing decisions without knowledge on the architecture of the underlying multiprocessor system. Scheduling domains is a way to capture and represent this knowledge and has been used by Linux kernel since version 2.6.8 to support its load balancing decisions. In addition, Linux uses many load balancing parameters to guide its decision on when to migrate tasks to where. The choices of load balancing parameters and their relations with other parameters determine the overall performance of the system. Under different workloads and for different system configurations, the same load balancing schemes may achieve different degrees of performance improvement.

    This fact motivated the performance evaluation study presented in this thesis. The thesis compares two versions of load balancing mechanisms, Linux kernel 2.6.5 and Linux kernel 2.6.10: Linux kernel 2.6.5 does not have the scheduling domains, and Linux kernel 2.6.10 has the scheduling domains. By comparing these versions of load balancing mechanisms, the thesis finds the effects of load balancing decisions, the suitable conditions for use of different load balancing schemes, and the effect of performance tuning parameters. The data on how performance for different kinds of tasks depends on load balancing decisions presented here can help us make the right choices of load balancing strategies to achieve the desired tradeoffs.

    Key words: Linux, multiprocessor scheduling, load balancing, scheduling domain

    Abstract III List of Figures VII List of Tables X Chapter 1 Introduction 1 1.1 Motivations 1 1.2 Contributions 3 1.3 Organization 5 Chapter 2 Related Work 7 2.1 Load Balancing in Distributed Systems and Networks 7 2.2 Load Balancing in Multiprocessors 8 Chapter 3 Multiprocessor Architecture 11 3.1 Hyperthreaded System 11 3.2 Symmetrical Multi-Processor (SMP) System 12 3.3 Non-Uniform Memory Access (NUMA) System 13 Chapter 4 Linux Uniprocessor Scheduling Mechanism 15 4.1 Init and Idle Process 15 4.2 Scheduling Data Structures 16 4.2.1 Priority Arrays and Priority Levels 16 4.2.2 Static Priority, Dynamic Priority and Task Preemption 19 4.2.3 Time Slice 24 4.3 Scheduling Mechanisms 26 4.3.1 Real Time Tasks and Normal User Tasks 26 4.3.2 Interactive Tasks 27 4.4 Creation and Termination of Tasks 31 Chapter 5 Linux Load Balancing Mechanisms 34 5.1 Load Balancing in Linux Kernel 2.6.5 34 5.1.1 Criteria for Task Migration 34 5.1.2 Load Balancing Involving New and Awaken Tasks 35 5.1.3 Load Balancing Upon Ready Queue Becoming Empty 36 5.1.4 Load Balancing Upon Arrival of Rebalancing Tick 38 5.1.4.1 Intra-Node Load Balancing 39 5.1.4.2 Inter-Node Load Balancing 40 5.2 Scheduling Domains and CPU Groups 41 5.3 Load Balancing in Linux Kernel 2.6.10 47 5.3.1 Criteria for Task Migration 47 5.3.2 Migration of New Task 49 5.3.3 Load Balancing Involving Awaken Tasks 50 5.3.4 Load Balancing on Idle Processor 52 5.3.5 Load Balancing on Hyperthreaded Machines 54 5.3.6 Periodic Load Balancing and Active Load Balancing 55 Chapter 6 Simulation Model 60 6.1 Simulation Model of Multiprocessor Systems 60 6.2 Model Tasks and Context Switches 62 6.3 Model Cache and Memory Overhead 63 6.4 Model Spin Lock in Event-Driven Simulator 65 Chapter 7 Simulation Results 66 7.1 Performance Measures 66 7.2 Comparison of Load Balancing Mechanisms 68 7.2.1 Performance Under Light Load 69 7.2.2 Performance Under Heavy Load 71 7.2.3 Detailed Comparison 74 7.3 Effects of Platform Parameters 77 7.3.1 Platform Parameters Related to SMP System 79 7.3.2 Platform Parameters Related to NUMA System 82 7.4 Effects of Workload Parameters 85 7.4.1 Number of Priorities and Average Processor Utilization 86 7.4.1.1 One Static Priority 86 7.4.1.2 Three and Five Static Priorities 89 7.4.2 High Static Priority with Short CPU Service Time 92 7.5 Parameter Sensitivity and Adaptive Load Balancing 95 7.5.1 Parameters of 2.6.5 version load balancing 97 7.5.1.1 Rebalancing Threshold 98 7.5.1.2 Rebalancing Interval 102 7.5.2 Parameters of 2.6.10 version load balancing 106 7.5.2.1 Waking up Flags without Other Flags 107 7.5.2.2 Waking up Flags with Default Settings of Other Flags 109 7.5.2.3 The SD_SHARE_CPUPOWER Flag in Hyperthreaded Machine 111 7.6 Effect of Immobile Tasks 113 Chapter 8 Conclusion and Future Work 115 Reference 119

    [1] OMNeT++, “Discrete Event Simulation System,”http://www.omnetpp.org/
    [2] H.C. Lin and C.S. Raghavendra, “A Dynamic Load balancing Policy with a Central Job Dispatcher (LBC),” IEEE Transactions on Software Engineering., vol. 18, no. 2, p. 148-158, February 1992.
    [3] Gamal Attiya and Yskandar Hamam, “Two Phase Algorithm for Load Balancing in Heterogeneous Distributed Systems,” 12th Euromicro Conference on Parallel, Distributed and Network-Based Processing (PDP'04), p. 434, 2004.
    [4] Songnian Zhou, “A Trace-Driven Simulation Study of Dynamic Load Balancing,” IEEE Transactions on Software Engineering, vol. 14, no. 9, September 1988.
    [5] Zeng Zeng and Bharadwaj Veeravalli, “Rate-Based and Queue-Based Dynamic Load Balancing Algorithms in Distributed Systems,“ To appear in the Proceedings of the 10th International Conference on Parallel and Distributed Systems (ICPADS 04), Newport Beach, California, USA, 2004.
    [6] J. C. Chou, T. Y. Huang, and K. L. Huang, “SCALLOP: A Scalable and Load balanced Peer-to-Peer Lookup Protocol for High-performance Distributed Systems,” in Proceedings of the 4th IEEE/ACM International Symposium on Cluster Computing and the Grid, April 2004
    [7] B. Godfrey, K. Lakshminarayanan, S. Surana, R. Karp, and I. Stoica, “Load Balancing in Dynamic Structured P2P Systems,” in Proceedings of IEEE INFOCOM, March 2004.
    [8] M. Corrêa, R. Chanin, “Operating System Multilevel Load Balancing,” Faculty of Informatics – PUCRS Porto Alegre, Brazil, R. Scheer HP Brazil R&D Porto Algere, Brazil
    [9] S. Lee, C. Yang, S. Tseng, and C. Tsai, “A Cost-Effective Scheduling with Load Balancing for Multiprocessor Systems,” in Proceedings of the 4th International Conference/Exhibition on High Performance Computing in the Asia-Pacific Region, Beijing, China, May 2000.
    [10] D. Durand, T. Montaut, L. Kervella, and W. Jalby, “Load Balancing Performance of Dynamic Scheduling on NUMA Multiprocessors,” IEEE Transactions on Parallel and Distributed Systems, p. 1201-1214, November 1996.
    [11] W. Zhu, “Cluster Queue Structure for Shared-Memory Multiprocessor Systems,” The Journal of Supercomputing, vol. 25 no. 3, p. 215-236, July 2003
    [12] Kai Shen, Tao Yang, and Lingkun Chu, “Cluster Load Balancing for Fine-grain
    Network Services,” in Proceedings of International Parallel and Distributed Processing Symposium (IPDPS'02), Fort Lauderdale FL, April 2002.
    [13] Albert Y. Zomaya, Yee-Hwei Teh, "Observations on Using Genetic Algorithms for Dynamic Load-Balancing," IEEE Transactions on Parallel and Distributed Systems, vol. 12, no. 9, p. 899-911, September 2001.
    [14] Jaiganesh Balasubramanian, Douglas C. Schmidt, Lawrence Dowdy, and Ossama Othman, “Evaluating the Performance of Middleware Load Balancing Strategies,” in Proceedings of the 8th International IEEE Enterprise Distributed Object Computing Conference (EDOC 2004), Monterey, CA, September 2004
    [15] Bhaskaran Raman and Randy H. Katz, "Load Balancing and Stability Issues in
    Algorithms for Service Composition," 22nd Annual Joint Conference of the IEEE
    Computer and Communications Societies (INFOCOM 2003), 2003.
    [16] Intel, “Intel® Pentium® 4 Processor Family,” Available at URL
    http://www.intel.com/design/Pentium4/documentation.htm#techwp
    [17] AMD, “Multi-Core Processors- The Next Evolution in Computing,” Available at URL
    http://multicore.amd.com/WhitePapers/Multi-Core_Processors_WhitePaper.pdf
    [18] IBM, “IBM System p5 595 server,” Available at URL
    ftp://ftp.software.ibm.com/common/ssi/rep_sp/n/PSD00756USEN/PSD00756USEN.PDF
    [19] Hewlett-Packard, “Meet the HP Integrity Superdome,” Available at URL http://h21007.www.hp.com/dspp/files/unprotected/superdomejan05.pdf
    [20] Josh Aas, “Understanding the Linux 2.6.8.1 CPU Scheduler”, 2005 Silicon Graphics, Inc. (SGI), 17th, February 2005
    [21] M. J. Bligh, M. Dobson, D. Hart, and G. Huizenga, “Linux on NUMA Systems,” in Proceedings of the Linux Symposium, vol. 1, p. 89-102, Ottawa, Canada, July 2004.
    [22] LWN Editor, “Scheduling domains,” Available at URL
    https://lwn.net/Articles/80911/

    無法下載圖示 全文公開日期 本全文未授權公開 (校內網路)
    全文公開日期 本全文未授權公開 (校外網路)

    QR CODE