Network transmission for comprehensive data analysis

Source: Internet
Author: User
1.1 Bandwidth

The unit of bandwidth is "bit/s", which is the number of bits per unit time.

We often say such as 100M bandwidth, the full name should be 100mbit/s, or 100Mbps. 1.2 How data is sent

The transmission of data is generally through the following links:

1 The application will first write data to the memory address space of the process. Usually in program development This only requires a general Run-time variable assignment.

2 The application uses the System function library interface (such as the Send function) to issue system calls to the kernel, which then copies the data from the user state memory to a memory address space, called the kernel buffer, maintained by the kernel. The size of this address space is usually limited, and all the data to be sent is entered here in the form of queues, which may come from multiple processes and each piece of data has an extra mark to mark his whereabouts.

3 When the data is written to the kernel buffer, the kernel notifies the network card controller to come and fetch the data while the CPU turns to the other processes. The network card controller is notified, according to the network card driver information to the corresponding kernel buffer address, the data will be sent to the network card buffer.

4 The data of the network card buffer needs to be sent to the line, while releasing the buffer to get more data to send. But only binary digital signals can be transmitted across the line, so you need to convert the data into byte position, and then send each bit of the data sequentially in order.

5 The network card will use the internal specific physical device to generate a variety of signals that can be transmitted. For example, in the use of copper wire lines, the network card will be based on "0" and "1" changes in the production of different electrical signals, and the use of fiber-optic circuits, the network card will produce different light signals. 1.3 Response Time 1.3.1 Download Speed

Download speed refers to the unit time from the server to the number of user PC data, the general use of the number of bytes of data to describe, so download the speed of the unit for "b/S."

Calculation formula for download speed: Download speed = data Bytes/Response time 1.3.2 Response time

Response time = time of delivery (data bits/bandwidth) + propagation time (propagation distance/propagation speed) + processing time

The sending time needs to compute the sending time of each data forwarding cost between the two hosts, and the total sending time is the sum of the time spent on the forwarding.

The propagation time is mainly dependent on the propagation distance, because the propagation speed can approximate to 2.0*m/s.

Processing time is the time that data takes to perform some necessary processing for store forwarding in a switching node, and an important part of this is the time it takes to queue data in the buffer queue.

Calculation Example:

Let's say our Web server is hosting an Internet Data Center (IDC) in Beijing to access the Internet in 10MB exclusive bandwidth. In Xian, a user through the community to provide 1MB exclusive bandwidth access to the Internet, he through the PC's browser to download a 100MB size of files, converted to bits that is 800Mb, response time and download speed is how much.

First of all, our Web server uses Gigabit NIC (Gigabit NIC is the main server configuration, most server motherboards are integrated dual gigabit NIC, respectively for the external network card and intranet card), that is, the speed of 1000mbit/s, Then the 100MB file out of the network card when the delivery time: 800mb/1000mbps = 0.8s.

Next, assuming that the Web server is directly connected to the Exchange node A in its cabinet, switch Node A has a 10MB exclusive bandwidth limit on the access port, that is, the transmit speed of the switch node A is 10Mbps, so that the 100MB file passes through the Exchange Node A: 800Mb/ 10Mbps = 80s.

Then look at the client, the user's access mode for 1M exclusive bandwidth, assuming that the user PC directly connected to the operator's Exchange Node B, then the Exchange Node B to the user's PC send speed of 1mbit/s, so 100MB files through the Exchange Node B sent time: 800Mbit/(1MBIT/S) = 800s.

Download data through the network card of the user's PC (the NIC needs to convert the electrical or optical signals in the line to the byte stream that the computer can recognize). Assuming that the PC uses a hundred gigabit NIC, the delivery speed is 100Mbps, so the calculated delivery time is: 800Mbit/(100MBIT/S) = 8s.

The other two exchange nodes A and B, we assume that they are the city's metropolitan area network top-level node, and they directly through the cable access to the national backbone node, the backbone node bandwidth assumption of 40G, then 100MB files through the backbone of the transmission time is: 800Mbit/(40GBIT/S) = 0.02s.

The above calculated the 100MB file transmission time through each Exchange node, but in fact, the total send time is not equal to their sum. Because the MB file in the actual transmission, not completely through a switching node before entering the next Exchange node, but as a continuous stream of bits through each Exchange node, so these calculated the time of the calculation of the overlap, can not be simply cumulative.

Generally, the total delivery time depends on the node with the least bandwidth, and through the TCP traffic control mechanism, other switching nodes with large bandwidth will also be sent in the same speed. For example, 40G bandwidth of the national backbone node, when the 100MB file is actually passed, the sending speed will not be more than 1Mbps, while the other bandwidth is of course in sending other data, do not forget 40G bandwidth is a national share.

So, the total send time we approximate to think is 800s.

Next, calculate the propagation time. Assuming the Web server to the user PC line distance of 1000km, propagation speed of 2.0*m/s, then the transmission time is: 1000km/(2.0*m/s) = 0.005s.

So

Response time: 800s + 0.005s = 800.005s.

Download speed: 100mb/800.005s = 124.999kb/s

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.