Analysis of Linux Low Level Communication and Improvement
- Author
- FeiPeng
- Advisor
- WangZuoXuan
- School
- Jilin University
- Major
- Applied Computer Technology
- Classification
- TP316.81
- Degree
- Master's thesis
- Year
- 2007
- Downloads
- 183
- Citations
- 1
Abstract
Now, there is a rapid development of telecommunications. In the framework of a new generation of communications, telecommunications equipment evolution of the telecommunications board has become a powerful blade-server. Linux is the operating system on its operation. Communication between two boards will be equivalent to between two servers for the message passing through the NIC. X company as suppliers of telecommunications equipment, is also active in the research and development of telecommunications trying Linux. X corporate which is a company involved in the research-grade Linux, internships for the author, with a major commitment to the existing Linux kernel 2.6 means of communication analysis and improvement work. Main task is to analysis bottom of the existing means of communication of Linux and try to improve it to better meet the needs of the next generation of communication efficiency. The existing technologies of communications using network card physical address and memory sharing are used through the analysis. X-board communication between telecommunications companies in the actual environment for the communications link layer is tested by the time delay ,communication throughput and packet loss rate efficiency testing standards and ultimately achieve RTT jitter smoothing, increase throughput, reduce the dropout rate of the expected results. On this basis, private protocol is designed to fulfill the needs of Company X point-to-point communication link.The design of the protocol is a reference to some of the ways to link management communication protocol of X company and TIPC.Designed by private protocol consisting of data and header, the available functions are:1. The success or failure of the establishment of the link, the sender can not reach the destination of the report. When they connect successful, the link will be established to carry out regular checks to ensure that the link can be used. If the chain of circumstances occurred, it will send messages to users. Link will automatically try to re-establish links at this time, but users can no longer continue to send information. If rebuild chain successful, the user can continue to send the information.2.Congestion control aircraft bearing layer and link layer flow control mechanisms.When the load-bearing layer appeared not to receive or send information, were all based on the load-bearing layer of the link will be closed and surrounded by logos for congestion, will be temporarily unable to send all the news, Congestion lifted until the load-bearing layer. Congestion on the stage, all waiting for news are sent to temporary storage. When congestion lifted, pending the news will be re-sent. If the load-bearing layer congestion will not be relieved at the time, this news discarded (this is rarely). To avoid congestion at the link layer also to the protocol, the use of flow control mechanism to control the information sent, thereby enhancing the reliability of information transmission.3. The messages sent continuity checks. The main purpose of which is to ensure continuity checks sent messages on the sequence message.4. Retransmission sequence message and the control mechanism. The main function is to avoid duplication of message transmission and re-transmission of message missing.5. The messages tied mechanism. Sometimes a packet can not be sent immediately over a bearer, due to network or recipient congestion (link level send window overflow), or due to bearer congestion. Messages which can not be transmitted immediately are bundled into already waiting, packets whenever possible, i.e. when there are unsent packets in the send queue of a link. When the packet finally arrives at the receiving node it is split up to its individual messages again.6. Message Fragmentation When messages are over the length of the size, message will be separated into each fragment size of 1,024 bytes, the receiver will receive when their re-grouping.The tests are designed to test the link layer transmission efficiency without protocol. So chose test socket for socket (PF_PACKET, SOCK_RAW. htons (ETH_P_ALL)). The testing environment is very ideal circumstances, there is no application disruption no pressure from the large volume of data test Acquisition of test data also does not adopt very stringent data collection methods.Test data indicators :When message is 64 bytes, 128 bytes, 256 bytes, 512 bytes and 1024 bytes.,It is tested at the following three indicators:Time delay: Send and receive time through the end of the contract period margin calculated RTT (round trip time) and statistics on the maximum andminimum, and jitter of the RTT.Throughput: Determine the number of packets sent out by calculating the time required. According to the byte count for each packet contains calculated bandwidth.The loss of packets: In determining the rate of dropout rate, the number of lost data packets.Based on the above test data collated achieved the desired results, the corresponding analysis of the reasons. The reasons are as followed:RTT jitter smoothing and the shortening of the time is due to the type of information packet on a drive along the layer, this will reduce the processing flow of information packets, while avoiding the messages in the contents of packages between the user space and kernel space copy. Shared Memory of the visit is in accordance with the system clock cycle, this is equivalent to the news of the increased priority, from the perspective of improving the efficiency of communication. Information entered kernel, the message is sent on to the kernel processing stage, the test environment was quite satisfactory, no other user program occupation kernel space, which would increase the kernel of information processing capability. And the information is sent and received along with Driver, which is relatively lower level, This will reduce the information in the kernel process also will shorten send and receive time. Furthermore, when testing platform is a powerful blade servers, its powerful processing capability will also help to reduce the sending and receiving information of the time. When the messages reached the Raw socket packet data required to notify users have reached the upper and upper-wait process at the moment. The upper users using private protocol need only visit shared memory.Throughput improvement is due to the upgrade from the user space and kernel space between the use of shared memory and use the minimum time interval Timer its scanning. This pair of shared memory on the high frequency scanning, and shared memory size are built larger, improve on these two aspects of the news from user space to kernel space for the transmission efficiency. With this information packet directly used a driver for the news buffer and avoiding the use of its socket buffer ,and net controller is gigabit LAN card, the driver is efficient, buffer is reasonable, which is tantamount to a higher throughput of great help.Dropout rates are due to did not add the link management, and the driver does not guarantee any of the information packet non-loss. Raw socket caused by the high dropout rate is due to the lack of distinction betweentypes of packages. Caused a lot of useless information packet to use the socket buffer region, resulting in a significant loss of information packets.As a part of platform for a new generation of telecommunications research work, the work in the paper is important to the prototype for the entire telecommunications platform structures and all other work are based on it. For the realization of the upper system, the communication of the telecommunications board is basis. In this paper the work done better to reach the desired objectives and design has been applied to the communication part of prototype system. After testing the efficiency of communication, the efficiency of communication was doubled, available bandwidth was also higher and packet loss rate was also lower. However, as other parts of the prototype system is still in progress, Therefore, at present, the prototype system is still under development and testing phase. As for low level communication, Company X is satisfied with its improvement.
Table of contents
Summary 4-8
first chapter the 8-12
1.1 topic Background 8-9
1.2 of this paper mainly work 9-10
the organizational structure of the thesis 1.3 10-12
Chapter II existing LINUX communication analysis the 12-29
2.1 main data structures 12-16
2.2 the API 16-18
2.3 process Analysis 18-29
third chapter LINUX in user space and kernel space data exchange 29-37
3.1 commonly used kernel and user space common way for data exchange 29-30
3.2 to improve the efficiency of data exchange between kernel space and user space analysis 30-37
Chapter proprietary protocols design 37-48
the 4.1 protocol outlined 37-39
4.2 protocol message handling process 39-42
4.3 protocol link layer message handling process in detail 42-48
Chapter efficient communication design 48-56
5.1 efficient communication overall design 48-49
5.2 Summary of design the 49-54
5.3 LINUX SOCKET communications 54-56
Chapter test method description and test environment 56-58
Chapter VII of the test data collation and analysis of 58-68
7.1 RTT fluctuation curve 58-63
7.2 throughput test 63-65
7.3 packet loss rate testing the 65-66
7.4 test data analyzed and summarized 66-68
Chapter VIII summarizes Looking to work 68-71
8.1 summarizes the 68-70
8.2 Next Job Outlook 70-71
Appendix 71-72
reference 72-74
Summary 74-78
Abstract 78-82
Acknowledgements 82
Related dissertations
- Design and Implementation of Radar System Modeling and Simulation Software Based on Components
- Research on Theory and Technology in Physical Isolation System and Its Application in Netwroked Manufacturing Environment
- Configuring the research and development of computer numerical control system
- The Hardware Design and Implementation of Simulation Platform to Dedicated Module
- Based-on-linux Management System for Network Address
- On the antitrust problems caused by a combination of patented technologies and standards
- IPv6 P2P Technology-oriented Network Resource Sharing Research
- The Research of Video Communication Protocol Fusion Based on D-S Evidence Theory