洪士灝臺灣大學:資訊工程學研究所陳人豪Chen, Jen-HaoJen-HaoChen2007-11-262018-07-052007-11-262018-07-052007http://ntur.lib.ntu.edu.tw//handle/246246/53832伺服器應用程式是重要的應用領域。效能的評估更是整個系統成功與否的關鍵。在本論文中, 我們提出並實作了一個伺服器應用程式效能評估的工具框架。 我們所實作的工具框架可分為兩個部分,程式分析工具 (profiling tool) 以及模擬器(simulator)。程式分析工具利用Dtrace 為基礎分析程式的行為,同時新增一個利用CPU performance counter的工具也被實作並加入工具框架中。模擬器使用SystemC製作, 可以模擬程式以及硬體平台在不同層級中的行為。模擬器的設計上採用參數化的設計, 不需要重新編譯即可測試新的平台。同時,應用程式以及系統模型是利用可攜的XML描述,使得不同工具 之間的整合變的更加容易。 我們所實作的工具可以提供程式執行期間行為的分析,不僅是應用程式層級的行為, 同時也提供作業系統層級行為的分析。我們的工具可以用來評估程式的延展性(scalability), 發現可能的效能瓶頸(bottleneck), 以及系統資源的使用情形,即使在沒有程式原始碼的情形之下也能進行分析。I/O intensive server applications are among the most mportant applications. Evaluation of performance is key to success. In this thesis, a framework for I/O intensive applications is proposed and implemented. We implemented this framework with a set of tools based on DTrace, including a new performance tool that we integrated to take advantage of the CPU performance counters. Our simulator is based on SystemC, which simulates application execution and reveals its locking behaviors on a given platform. The simulator is parameterized and requires no recompilation to simulate different applications and platforms with human readable XML-based models, which enables the integration of the simulation by linking models generated from different tools. Our experimental results shows the proposed framework provides useful insights for I/O intensive server applications with information regarding to the runtime behavior of both application and kernel levels. The framework can be used to evaluate scalability, possible bottleneck/contentions and resource utilization for any given application even without its source code.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 Performance Evaluation and Design of a Computer System . . . . . . . . . . . 1 1.2 Performance Evaluation Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2.1 Benchmarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2.2 Simulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2.3 Profilers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.3 I/O Intensive Server Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3.1 CMP and CMT Architectures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3.2 Application Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3.3 Challenges for Developing Server Applications . . . . . . . . . . . . . . . . 8 1.4 Research Motivation and Contribution . . . . . . . . . . . . . . . . . . . . . . . . . 9 2 Related Performance Profiling and Simulation Tools . . . . . . . . . . . . . . . . 11 2.1 DTrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.2 CPU Performance Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.3 SystemC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3 Proposed Profiling and Simulation Framework . . . . . . . . . . . . . . . . . . . . 17 3.1 Design Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.1.1 Modeling server application behavior . . . . . . . . . . . . . . . . . . . . . . 18 3.1.2 Separation of application and platform models . . . . . . . . . . . . . . . . 19 3.1.3 Portable model description format . . . . . . . . . . . . . . . . . . . . . . . 19 3.1.4 Simulation speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.1.5 Configurable granularity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.1.6 Provide information for both application and kernel level . . . . . . . . . . 20 3.2 Modeling Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.2.1 Task blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.2.2 Application Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.2.3 Platform Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.3 Profiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.3.1 Application and System Call Tracing . . . . . . . . . . . . . . . . . . . . . . 23 3.3.2 System Call Profiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.4 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.4.2 Application Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.4.3 Kernel Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.4.4 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.4.5 Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 4 Demonstration and Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.1 Case study: SIP Server Registration . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.1.1 Performance Scalability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.1.2 Execution Time Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.1.3 Lock Contention Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.1.4 Data Cache Access Histogram . . . . . . . . . . . . . . . . . . . . . . . . . . 35 5 Conclusion and Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3910118316 bytesapplication/pdfen-US效能分析程式分析模擬performance evaluationprogram profilingsimulation系統層級的效能量測與評估框架System-Level Performance Profiling and Simulation Framework for I/O-Intensive Applicationsthesishttp://ntur.lib.ntu.edu.tw/bitstream/246246/53832/1/ntu-96-R94922125-1.pdf