Improving Program Cache Performance by Program Analysis and Optimization
- Author
- FuXiong
- Advisor
- ChenYiYun
- School
- University of Science and Technology of China
- Major
- Computer Software and Theory
- Classification
- TP332.3 Controller,the console
- Degree
- Doctoral dissertation
- Year
- 2007
- Downloads
- 390
- Citations
- 4
- Cache Behavior
- Reuse distance
- Source Level Instrumentation
- data layout
- Spatial locality
- Program Transform
- Dynamic Array Regrouping
- Structure Splitting
Abstract
In the past 40 years, the ever-increasing speed gap between processor and memory forms the "Memory Wall" and has resulted in one of the primary bottlenecks in computer system. Now modern computer architecture widely employs cache to decrease the impact of the gap and cache performance has an increasing influence on system speed, cost and energy usage. The utility of cache mostly depends on program locality, especially program data locality, including the temporal locality and the spatial locality. Thus, optimizing program data locality has become an important method to improve cache performance.Due to its independence of hardware and platform support, optimizing program locality by program analysis and optimization has become an active area to improve cache performance. There used to be two primary methods to optimize program data locality: the first is to analyze cache behavior of program data, then basing on cache behavior model, build a program analysis tool which shows the bottlenecks of data cache performance and hence directs programmer to tune performance of data cache; the second is program transformation by an optimizing compiler or an optimizing tool, and data cache performance is optimized in the transformation.This thesis introduces the following works basing on the above two methods:(1) Research on Program Cache Behavior ModelThough reuse distance has become an important metric of program cache behavior, problems such as high complexity and possible memory overflow have largely restricted its application. By limiting the max cache size and the area of reuse distance analysis, this paper introduces a limited reuse distance analysis method. This method efficiently avoids possible memory overflow problem in normal reuse distance analysis, and at the same time reduces complexity of reuse distance analysis to linear. Experiments on some integer and floating-point programs have demonstrated the feasibility and correctness of cache miss rate analyzed based on this reuse distance analysis.(2) Design and Implementation of Cache Behavior Analysis ToolProgram cache behavior analysis and comprehension help programmer to find the bottlenecks of program cache performance, optimize locality by program trans- formation and improve program cache performance. This thesis introduces a reuse distance based program cache behavior analysis tool, employing a source level instrumentation method based on intermediate information stack to collect program data access information, and using a limited reuse distance model to analyze program cache behavior. An example shows that this cache behavior analysis tool is capable of not only locating the cache performance bottlenecks in source codes to guide the code transformation, but also analyzing the cache behavior relationship among variables, thus to direct the data reorganization.(3) Data Layout Optimization Using Reuse Distance DistributionDuring cache behavior analysis, much similarity among reuse distance signatures of variables which are often accessed together can be easily observed. If layout of this kind of variables is optimized by reorganization, the cache performance can be improved. Motivated by this consideration, this thesis outlines a data layout optimization framework. A variable relation model based on reuse distance signature is used to find variables that are often accessed together in the framework. The framework implements a dynamic array regrouping method to reorganize the dynamic arrays. Experiments on some benchmarks from SPEC CPU2000 show this framework is feasible and effective to optimize data locality and improve cache performance.(4) Improving Cache Performance by Structure SplittingStructure splitting is a common method to improve cache performance by data reorganization, and it is of certain specialities since structure splitting only needs to analyze the relative relation of fields. To overcome the complexity of reuse distance analysis, this thesis proposes a field relation model based on a simple distance to quantitate the relation of structure fields, then searches an optimized layout for structure, optimizes program data layout and improves program data cache performance by structure splitting. Experiments show that this method is effective in optimizing program data layout, improving program data cache performance and thus improving the performance of the whole program.
Table of contents
Chinese Abstract 5-7
English summary 7-9
directory 9-12
illustrated catalog 12-14 <br / > Tables 14-15
first chapter 15-33
§ 1.1 Background 15-21
§ 1.1.1 \Wall 15-19
§ 1.1.2 Cache basics of 19-21
§ 1.2 enhance the Cache Performance of 21-25
§ 1.2.1 lower Cache failure rate 21-23
§ 1.2.2 to reduce failure overhead 23-24
§ 1.2.3 to reduce the cache hit time 24 -25
§ 1.3 software-based methods to improve Cache Performance 25-30
§ 1.3.1 software prefetch (Software Prefetching) 25-26
§ 1.3. 2 code transformation (the Code Transformation) 26-28
§ 1.3.3 Data transformation (Data Reorganization) 28-30
§ 1.4 in this article an overview of 30-33
§ 1.4.1 research ideas 30-31
§ 1.4.2 Research content 31-32
§ 1.4.3 Organization 32-- 33
Chapter II Cache failure rate based on the reuse distance analysis 33-49
§ 2.1 the basic knowledge 33-37
§ 2.1.1 the definition of 33-35
§ 2.1.2 Analysis Method 35-37
§ 2.2 is limited reuse distance 37-40
§ 2.2.1 Basic thinking 37-38
§ 2.2.2 analysis algorithms 38-40
§ 2.2.3 Performance analysis 40
§ 2.3 the Cache failure rate analysis 40-41
§ 2.4 Experiments and results analysis 41-46
§ 2.4.1 test environment 41-42
§ 2.4.2 test results 42-43
§ 2.4.3 Cache failure rate 43-46
§ 2.5 work 46-47
§ 2.6 Summary 47-49
Chapter III of a Cache behavior analysis tool for the design and realization of 49-69
§ 3.1 Overview 49-53
§ 3.1.1 Background introduction 49-50
§ 3.1.2 tool framework 50-51
§ 3.1.3 the JavaCC About 51-53
§ 3.2 source code level Instrumentation 53-60
§ 3.2.1 inserted pile thinking 53-54
§ 3.2.2 variable information saved 54 - 56
§ 3.2.3 visit the deposit variables collected 56-58
§ 3.2.4 Instrumentation Code generation 58-60
§ 3.3 Cache behavior analysis 60-63
§ 3.3.1 limited reuse distance analysis 60-61
§ 3.3.2 code line Cache behavior analysis 61-62 < br /> § 3.3.3 variable Cache behavior analysis 62-63
§ 3.4 Experimental results and analysis 63-66
§ 3.4.1 tool to achieve 63
§ 3.4.2 An example 63-66
§ 3.5 work 66-67
§ 3.6 of this chapter Summary 67-69
Chapter IV data layout optimization based on the reuse distance distribution 69-87
§ 4.1 Overview 69-73
§ 4.1.1 Background Description 69 -71
§ 4.1.2 optimization framework 71-73
§ 4.2 variable relationship analysis 73-79
§ 4.2.1 Analysis of ideological and 73 -75
§ 4.2.2 of the variable relationship model 75-78
§ 4.2.3 variable grouping 78-79
§ 4.3 Dynamic array restructuring 79-82
§ 4.3.1 method of restructuring 79-82
§ 4.3.2 key issues 82
§ 4.3.3 Reorganization 82
§ 4.4 Experimental results and analysis 82-85
§ 4.4.1 Experimental results 82-84
§ 4.4.2 Data Cache Optimization analysis 84-85
§ 4.5 The relevant comparison 85-86
§ 4.6 Summary 86-87
Chapter structure splitting to optimize the Data Cache Performance 87-103
§ 5.1 Overview 87-89
§ 5.1.1 Background Description 87-88
§ 5.1.2 optimization framework 88-89
§ 5.2 attribute domain relationship analysis 89-93
§ 5.2.1 The basic idea 89-90
§ 5.2.2 attribute domain relational model 90-92
§ 5.2.3 Attribute domain grouping 92-93
§ 5.3 structure split 93-98
§ 5.3.1 demolition points method 93-97
§ 5.3.2 key issues 97-98
§ 5.4 Experimental results and analysis 98-101
§ 5.4. Experimental results 98-99
§ 5.4.2 Data Cache Optimization Analysis 99-101
§ 5.5 relevant comparison 101
§ 5.6 of this chapter Summary 101-103
Chapter VI Conclusion 103-109
§ 6.1 In this paper, 103-105
§ 6.2 for further work 105-109
References 109-121
thank 121-123
during the study for a degree and cast papers 123
Related dissertations
- A Research of RAID1Technology Based on SSD Cache
- Research on Optimization Methods to Data De-duplication for Archive Storage
- Analysis and Optimization of Data I/O Pass in the Distributed File System
- Research on Optimizing Energy Efficiency for Hadoop Storage System
- Predicate compiler technology and deep code optimization
- Architecture and Data Layout of Network Based Disk Arrays
- A Study on Two-level Networked Stripe Data Layout and Its Implementation
- Research on End to End Video Transmission Control over the Internet
- The Research and Implementation of Very Large Scale VOD Architecture and Service Strategy
- Research on Data Layout Technologies for Disk Arrays
- Research on APoRC Software Architecture of RAID Controller
- High Performance Caching Based on Reuse Distance Prediction and Streaming Characterization
- Research on the Key Technologies of Storage Systems Based on Redundant Intelligent Storage Channel
- Data Placement and Query Optimization in Large-scale Network Storage Environment
- Web traffic characteristics of the study and application of the model
- Centralized Securities System
- Focusing on Data to Realize Information Resource Construct of Yanzhou Mining Group
- Research and Implement on three-level Cache in RAID
- Research on high-performance disk arrays (RAID) key technologies
- Research and Realization of PN Offset Optimization Algorithm in CDMA System