Sogou TCP optimization of multi core Linux kernel path optimization of multi core platform - the only proper course to take

This paper can be used as the Linux forwarding performance evaluation and optimization (forwarding bottleneck analysis and solution) "companion, this article combined together, is just the Linux kernel protocol stack a optimization scheme. In fact, the Linux protocol stack is originally two directions, one is forward, more is the local reception. At present a large number of servers using Linux as its carrier, and reflects the local protocol stack processing relative to the importance of forwarding. Therefore in this paper, we pull two, welcome to clap brick! 0 statement: 0). The owner of the leather shoes factory was promised yesterday, but...
Read(1781) comment(0)

Sogou Multi core Linux -slab kernel path optimization and the only proper course to take the buddy system

As the first article in this series, I'll first describe the slab system. Because the past few days and colleagues, friends discussed this theme, but also feel that this theme is fairly typical, so as the first article. In fact, according to the operating system theory, process management should be more important, in terms of my own interest, IO management and TCP/IP protocol stack will be more component, about the content, I will give. Frequent distribution from a very simple idea Linux slab, Jishi first ready for some, the release of data structure. However standard s...
Read(1768) comment(2)

Sogou Analysis of the principle of hardware routing and forwarding

Some people ask me, for routing forwarding, the performance of the hardware forwarding table is really beyond the software to check the table, such as Linux system a lot of it? How can I answer? Given data? I have no data, because my own is not to do this piece of. Given the theory? I'm afraid I don't have that eloquence. Drawing a picture? I found that I did not have the tools to install the logic circuit. What can we do? The answer to the question I really in the heart, is difficult to form words, thereupon, I use hand drawing cell phone pictures show a hardware forwarding table of power, due to the lack of actual data, I use relatively, let everybody see software forwarding...
Read(6746) comment(14)

Sogou Linux forwarding performance evaluation and optimization (forward bottleneck analysis and solution)

Line speed problem many people on this line speed concept misunderstanding. Think the so-called line speed capability is the router / switch is like a cable. And that's not possible. A concept that should be considered is the delay. Packets into the router or switch, is a core delay operation, this is to choose the road, for the router, routing lookup, the exchanger is query MAC/ port mapping table, the delay is unavoidable, the operation needs a large amount of computer resources, so whether it is a router or switch, packets are not like online cable so near the speed of light transmission in the internal...
Read(2806) comment(4)

Sogou DxR algorithm based on the idea of the design of the positioning of the structure of the route

First, title said is routing positioning structure and non structure search, that is, using this structure, with an IPv4 address as input, in obtaining next hop, there will be no any lookup operation, just continue to use the location index. In order to have an intuitive understanding of the first to find the structure of the structure: 1 from the multi index in my first experience of failure, I tried to completely imitate MMU to design a routing lookup structure, the results failed. In fact, now think about it, do not fail, because the number of routing entries is limited, for the entire IPv4 4G address is concerned,...
Read(1608) comment(2)

Sogou Propositional composition: in a IPv4 address tree thoroughly understand the IP routing table to find a variety of process

This is a proposition composition. Recent always wanted to write something, but has been unable to find a topic, just received an e-mail, people ask me Linux routing table layout problem and cache routing problem, coupled with a few days ago also help people doing a piece on the routing table, so that this is a good topic, simply spent most of the weekend, scribbling. In front of the words do not write the proposition has been for 11 years, the last time in college entrance exam. When receiving the message, was asked to write this thesis, in fact, I was rejected, because you can not call me to write me immediately to write, first of all I have to understand this, I can not say...
Read(2106) comment(8)

Sogou About OpenVPN article directory

This article on the front of the article on OpenVPN to do a summary, points out a few categories, but also to facilitate their subsequent access and correction. . basic theory. The VPN principle and Realization -- theory. VPN principle and Realization of tunnel - a kind of realization of VPN principle and Realization of virtual network construction --tcp or udp5. Linux platform of VPN technology introduction and implementation of the principle of vpn4. VPN. Linux platform VPN Technology Overview (Continued) 7. VPN technology to ramble the IPSec (report of MPLS). TCP encapsulation of...
Read(18966) comment(17)

About jiffies and time_after around time_before.

System with many variables are used to record a monotonically increasing reality, typically has two, one is the sequence number of the TCP, and the other is a jiffies, but because the computer representation of numbers are finite limitlessness, so any digital cannot do completely monotone increasing, they just around and around in circles, like a clock like, domain is the limited numbers, go round and round. In fact, no matter is the sequence number of TCP or jiffies, are a class of problems is around the problem. As we watch the clock, 1 points at 11 points before it, or after 11 points? In fact, this problem does not...
Read(384) comment(0)

New features of the network brought by the 4.4 version of the Linux kernel

This title is a bit big, but I just want to describe some of my personal has been more concerned about the characteristics, and will not be too detailed, as usual, mainly to help sort out the ideas, not the source code analysis. This is mainly to which one day suddenly forget time, Yimushixing to sweep one eye can memorize it was understood at the time, or writing too details, themselves do not understand. TCP listener TCP first from the syncookie Lockless speaking, if you can use the syncookie mechanism of how good, but not, because it will lose a lot of options negotiation information, the information on the...
Read(641) comment(0)

Linux kernel in the network packet reception - the second part of the select/poll/epoll

And front of the first part, the text is to help others or yourself clear ideas, and not the so-called source code analysis, to analysis the source code or debug source best, any document, book is worst. So this kind of help people sort out ideas of the article as much as possible in mind as possible, as simple as possible. 2.6+ wakeup kernel callback Linux mechanism Linux kernel through the sleep queue to organize all waiting for an event of the task, while the wakeup mechanism can be asynchronous wake up the entire sleep queue task...
Read(575) comment(0)

The reception of network packets in the Linux kernel - the first part of the concept and framework

Responsible for the received packet and packet received packet received packet and network data packets to send, the network is asynchronous, because you're not sure who will be in when suddenly a network packet to you, so the network logic is actually consists of two things: 1. After the arrival of the notice of the receipt of the notice from the data packet to obtain data both thing has happened in the protocol stack at both ends, the card / protocol stack boundary and protocol stack / application boundary: NIC / protocol stack boundary: NIC notification data packet arrival interrupt protocol stack; protocol stack / application boundary: protocol stack data package filling SOCKET queue, notify the application data readable, applications received.
Read(596) comment(0)

On Redirect ICMP routing is not a bug bug

In the new company met the first network problems turned out to be a routing redirection of, this is often concerned with unexpectedly spent I spent the whole afternoon time to sort out, this paper introduces Linux protocol stack is how to deal with routing redirection. Routing entry means any device with a network function in the internal have a routing table, the table indicates how the data packets from the device to send and the next station to send to where. The routing table is composed of an item, each called a route entry, these routes are generated as follows: 1 automatic discovery of the routing entry card to start and configure the IP address, it will automatically...
Read(1222) comment(4)

Watch out TCP native client to connect to the local server

Last week, when we had a performance test, we found a problem. Our server Rev a redis server, interception of port 1234, with another process in the machine will frequently initiated to the server of the short connection. As a result, the two problems: 1. A lot of the time wait state connection; 2. Launched process of connection of the CPU occupancy rate close to 100%. These two results seriously affect the performance of our gateway, in the analysis of specific reasons, the first to do a promotion, that is: the machine is connected to the machine, the preferred UNIX domain socket...
Read(1888) comment(7)

Linux kernel in a few more interesting interpretation (process scheduling algorithm, page scheduling algorithm, nonlinear work set)

It is a time slice scheduling algorithm based on priority, the so-called o (1) only some of its compact data structure dictates, without considering the dynamic compensation and punishment of the case, as long as the determination of priority, then time slice is fixed to 1. O (1) scheduler time calculation formula and the CFS scheduler in Linux 2.6.23 before the widespread adoption of the O (1) scheduler. CFS 2.6.23 later? It is a based on the weights of the non time slice scheduling algorithm, each process execution time is not fixed, but according to the number of processes in a quasi periodic fixed according to the weight proportion of time...
Read(1855) comment(2)

TCP Linux to achieve the idea behind the optimization

Imagine whyinitially didn't let a process / thread in a same IP address and port listening, very simple. This is because the TCP / IP model will be a port as a four layer multiplexing and demultiplexing the unique identifier, is a four layer address, as IP address belongs to a host (belongs to a card? A IP/ port on a host of a specific process, it is only a guarantee of the static identity. The different hosts in the world can't have the same IP address, and the different processes that bind a specific IP address on a host computer can't have the same port, or they don't know that...
Read(1693) comment(4)

The same way to solve different problems, synthesizer

1.BFS scheduler with O (1) O scheduler (1) scheduler uses a secondary classification, the first level is the CPU, namely each CPU a queue, second level is the priority, per CPU queue and subdivided for 140 priority queue. In the first stage, load balancing scheduling is adopted, and priority scheduling is adopted in the second stage. Although it is very clear, but to join the "small means" to compensate / punishment. Nature of the CFS scheduler is the same, using only the red black tree and added a virtual clock layer shield compensation / penalty operations. The BFS scheduler uses the same two grade cohort, the first level is the priority classification, grade second is a simple...
Read(1291) comment(1)

Shanghai Hongqiao Airport cigarette lighter with UNIX Philosophy

To go out today, senior smokers in the airport security check can not find a smoking room... Shanghai Hongqiao Airport, I saw the following facilities: very simple, not advanced, maybe you will say my ignorance, but I do not refute. This device really let me heartache, really! This design will not come from the traditional Chinese designer's hand, because the traditional designers want to make their own design is very complex to raise the threshold, I feel very cattle X. This design combines the simplest of several small items, a lock, a few lighters, a fixed iron frame, enough, is not it? Very beautiful! My wife asked me: who is going to take a few...
Read(1975) comment(1)

Multi core Linux kernel path optimization is the only proper course to take order

To mention this topic, I feel angry, I feel that I have been playing ten thousand times to maintain a gentleman's useless. In fact, the heart is full of evil fire! Maybe I should give up, maybe I should take a look at this world, I can't. When? Where? Who? What? Why bother! How about! Why not! Why! Come, meet, acquaintance, love! Blind, dim, care, sigh! Decade And who knows my sins?! Burning passion I choose to give up; however, meaning let me start again! What makes it so completely, and yet, what evidence is that it is no doubt that it is so! The heart's people happy, and it tears...
Read(1410) comment(0)

Protocol stack embedded chip is imperative, IPSec is a mistake

This article is a bit extreme, but it may also cater to the meaning of some individuals or organizations. This article is short, I will continue to write this topic later. The heart is too painful, the person is too bad. 1 protocol stack chips if you think protocol stack chip is implanted in the consumption of materials, erase the cost, then you are wrong. TCP/IP/Ethernet protocol stack has become a matter of fact, the number of years have not changed. Curing of the given circuit design, mold, silicon wafer process overhead are generally is constant, the more things to consider curing, otherwise you will pay a heavy price and is not conducive to protect the customer's investment. Actually...
Read(1867) comment(3)

A nf_conntrack Netfilter flow table lookup optimization - an increase of per for conntrack a CPU cache

Alone sad to bear, the need to share happiness of Linux protocol stack multiple perf results. I can't stand conntrack performance, however it is so powerful, that I can not give up, I want to own implementation of a fast flow table, but I had to get rid of dependence on many functions of conntrack, such as state match, Linux NAT. Indeed, I though of NAT is complain too much, but anyway, there are not many people use it?. Once, I did a search for conntrack...
Read(1363) comment(0)

Local spin lock and signal volume / multi service desk spin queue wait -spin style signal

On Sunday evening, I went to the home near the supermarket (...) to buy a soda for homemade lemon soda, I feel I do than to buy the Paris water is more refreshing. Due to the hot weather, many people went to the supermarket summer go, supermarkets do not expel people, there seemed to be their strategy, over the summer, when it is inevitable to buy some things, with a lot of beauty in the metro bus see Taobao spend their time, then the next single... This is how easy a thing, otherwise drive beauty shopping a lot less. For the summer of the supermarket, it is more trouble than a single place on the bus, because there is a cost problem, this is the queue costs. ...
Read(1370) comment(0)

Analysis of the realization principle of Segment Offload TCP (TSO)

Morning too hot, suddenly reminded of the three weeks ago have people to communicate with me Tso problem, I also described the principle, the principle is very simple, nothing but is to rely on network card hardware section, checksum calculation, thereby freeing CPU cycles. In fact, as long as that one is enough, since by hardware wise, then only by the hardware to calculate the checksum, because you don't know the hardware segment details, so you can't in the pre segmented calculated every segment of the checksum.... Tso's principle of almost every person all know, in fact it is what...
Read(1634) comment(3)

IP network, high-speed optical network and unloading of rail transportation:

At 3 o'clock in the morning, hazy sleepy eyes in the middle of the night, suddenly heard about two ear Weng the Weng, under the body of the tatami mats rustling that in dreams, but eyes awake, and saw nothing, still in the dark, and confirm it is not in the dream. Then turn on the lights and found a cockroach lying on the mat, two mosquitoes have already disappeared. Next to a small sleep, I took a cockroach ran to the bathroom to a good meal, and then want to continue the dream of those who did not complete a variety of about, but they can not sleep. Too soon to think of a way to sit 528 bus through the hateful Shanghai, the heart is very uncomfortable...
Read(1637) comment(0)

The beauty of the skiplist based on natural probability without human balance

Nothing can stop me from the heart of a simple beauty. In the middle of the night thinking, can not sleep, simply to get up to see the book, about civilization in the Middle East, but can not go in, perhaps cause hot flashes... Rather than the static under heart to write a stream of consciousness the, I mean is don't think that I have been in the Near East, Middle East intricate complex history of a bored. It is too difficult. But can you imagine what I mean by not thinking about it? Algorithm is not very difficult to do? Really is an algorithm, can also be said to be a data structure, which is skiplist. ...
Read(1405) comment(0)

Router, firewall role

Do not show algorithm in the network equipment, and quickly let the data packet through, otherwise the detention. Network equipment is always a packet to quickly leave the place, quickly go, the sooner the better. I say this may be a little contradictory, quickly leave the show algorithm can not do it?! The problem is that you do not do the things you do not do, you are not a professional firewall, why engage in what rubbish iptables! To do your own work, do a good job, show perfect, the other hand to the expert, to the appropriate equipment. Network access algorithm is not limited to the machine, the entire path of each node running between...
Read(1664) comment(0)
1252 data a total of 63 pagesOne Two Three Four Five ... Next page Shadowe
    personal data
    • Visit3747282 times
    • Integral:Fifty thousand eight hundred and seventy
    • Grade
    • Rank:Thirty-seventh name
    • Original1250 articles
    • Reproduced:2
    • Translation:0
    • Comments:2134 article
    Latest comments