The Technical Research of Optimization of File Storage in HDFS
- Author
- ZhangDan
- Advisor
- BaoPeiMing
- School
- Nanjing Normal University
- Major
- Applied Computer Technology
- Classification
- TP316.4 Distributed operating systems, parallel -type operating system
- Degree
- Master's thesis
- Year
- 2013
- Downloads
- 6
- Citations
- 0
Abstract
At present, in the face of growing huge amounts of data, the computer field proposes a new calculation model--cloud computing. Hadoop is an open source framework which can realize large scale distributed computing, and have high throughput, high reliability, high scalability, therefore, is widely used in the field of cloud computing. Hadoop distributed file system(HDFS) is designed to be suitable for operation on the general hardware, it is also a highly fault-tolerant system, can be deployment on the cheap machine. HDFS provides high throughput of data access, very suitable for application on large data sets, and can be read from the file system in the form of streaming data.But as a growing in the development of the distributed file system, HDFS may inevitably exists some defects with the data storage. For example, when HDFS copy data for storage, selected on the rack randomly may lead to the Datanode load imbalance, thus affecting the performance of the whole system. And HDFS was originally designed to streaming store large files, not optimization for small files storage, so performance is very low when handling with small files. This article first do some brief introduction for the development of the distributed file system, Then further analyzes the Hadoop distributed file system, including its architecture, metadata management, and file reading and writing process, and analyzes the performance and deficiency of the solution of the existing scheme about HDFS data storage and small files storage. In this paper, the main innovation points are as follows:1. Random select Datanode for data storage on the rack, may lead to the Datanode load imbalance and other issues, then proposed a method about use the multi-objective optimization technology, based on the current running condition of the Datanode, search for the optimal synthesis conditions of the Datanode for data storage. This method makes the data store balanced in the Datanode, also can improve the performance of data reading and writing.2. In practical application will produce lots of small files, aiming at the shortcomings of the HDFS to store small files, put forward the strategy of small files merging and Client cache small files. Small files on the Client will be merged into some big files, then stored the big files and some metadata in the HDFS together; when reading a small file, the Client caches the big file contains the small file, when read it again, or read other small files in big files, can be read directly from the Client., reduced the number of frequent requests that Client link to the Namenode to get the metadata, also reduced the number of frequent requests that Client link to the Datanode to get the data, greatly improve the storage efficiency of small files.
Table of contents
Summary 4-5
Abstract 5-7
directory 7-9
first chapter 9-15 <br / > 1.1 Background and significance 9-11
1.2 Research Status research 1.2.1 Status placed copies of data 11-13
11-12
1.2.2 Status of small files stored research 12-13
1.3 The main work 13-15
chapter distributed File System HDFS 15-27
development 2.1 distributed file system 15-18
2.1.1 early stage ( 1980 - 1990 ) 15-16
2.1.2 the second stage ( 1995 - 2000 ) 16
2.1.3 The third phase ( 2000 onwards ) 16
2.1.4 phase IV ( open source distributed file system ) 16-18
2.2 HDFS design goals 18
2.3 HDFS architecture 18-20
2.4 HDFS data management 20-21
2.4.1 metadata 20
2.4.2 data Integrity 20
2.4.3 data replication 20-21
2.4. 4 copies stored 21
2.5 HDFS file read and write process analysis 21-27
communication Theory 2.5.1 HDFS is 21-22
2.5. 2 Read document Analysis 22-24
2.5.3 written document analysis 24-27
Chapter HDFS data blocks to place a copy of a balanced strategy 27-37
3.1 on the rack of a random selection strategy nbsp Datanode ; 27-30
3.2 stores a copy of the existing problems 30-31
3.3 multi-objective optimization methods 31
3.4 file written Datanode selection methods to achieve 31-33
3.5 copies balanced placement experiments and data analysis 33-36
3.5.1 test environmental 33
3.5.2 Comparative experimental test 33
3.5.3 analysis 33-36
3.6 Summary 36 - Chapter 37
HDFS small files stored improvement program 37-52
4.1 optimization strategy of small files stored access to local files 37-40
4.1.1 sex merge 38
4.1.2 small files 38-39
4.1.3 Client -side caching 39-40
4.2 data structures and algorithm 40-44
4.2.1 metadata type and structure related information described 40-42
4.2.2 Client -side caching of small files 42 <br / > 4.2.3 grouping algorithm 42-43
4.2.4 file archiving solution algorithm and 43-44
4.3 small file read and write processes and interfaces 44-46
4.3.1 small file read 44-45
4.3.2 small file write 45-46
4.4 to achieve 46-47
4.5 experiment 47-51
4.5.1 test environment 47
4.5.2 time performance tests and data analysis 47-50 <br / > 4.5.3 Namenode backup metadata changes in test methods and results of the analysis 50-51
4.6 summary 51-52
Chapter summary and Outlook 52 -54
5.1 summarizes 52
5.2 Prospects 52-54
References 54-58
Thanks 58