[Original] performance test-Network Environment Analysis

Source: Internet
Author: User
Performance testing-Network Environment Analysis
  • First, we need to understand the concept of the network bandwidth environment for broadband access:

This refers to the unit calculation method and relationship of bandwidth network speed.

In computer networks and IDCs, the unit of bandwidth rate is expressed in BPS (or B/S). The conversion relationship is 1 byte = 8bit.

1B = 8B ---------- 1B/S = 8B/s (or 1bps = 8bps)

1kb = 1024b ---------- 1kb/S = 1024b/s

1 MB = 1024kb ---------- 1 Mb/s = 1024kb/s

In actual online applications, when downloading software, you often see the words "Bandwidth speed", such as KB (kb/s) and 103kb/s, because the ISP's line bandwidth is measured in bits, and the download software usually displays byte (1 byte = 8 bits), the actual value can be obtained through conversion. However, we can convert it according to the conversion formula:

128kb/S = 128 × 8 (kb/s) = 1024kb/S = 1 MB/S: 128kb/S = 1 MB/S

Theoretically: the theoretical bandwidth speed of 2 m (2 Mb/s) is 256kb/s (that is, 2048kb/s), and the actual rate is about 80 -- 200kb/s; (This is caused by many factors, such as the user's computer performance, network equipment quality, resource usage, network peak periods, website service capabilities, line attenuation, and signal attenuation ). The theoretical bandwidth of 4 m (4 Mb/s) is kb/s, and the actual bandwidth is about 200---440kb/s.

  • Secondly, we need to know the characteristics of our real network environment:

1. the telecom bandwidth is calculated by bit, and the computer files are calculated by byte. 1 byte = 8 bit. The bandwidth connected to the optical fiber/8 = the actual bandwidth used

2. browsing the Web page at a time of 2 K. online games and videos are interactive. Generally, 80 K is done. QQ, MSN, and other instant tools also occupy about 10 K.

3. Take 20 computers as an example:

Webpage Browsing: 20 computers * 2 K = 40 K

Online Game + video: 20 computers x 80 k x 2 = 3200 K

MSN and QQ: 20 computers * 10 k = 200 K

40 + 3200 + 200 = 3440 K byte

3440*8 = 2 m optical fiber

4. The ADSL bandwidth is not symmetric, and the telephone line is 0 ~ 4 kHz is used to transmit telephone audio, 26 kHz ~ Data is transmitted in the 249 MHz band and is divided into 25 uplink channels and downlink channels in a 4 kHz width. The input data is transmitted to the subchannel after being encoded by TCM and modulated by QAM, therefore, theoretically, the uplink speed can reach 1.5 Mbps and the downlink speed can reach 14.9 Mbps. Considering interference, the actual transmission rate is generally 640 Kbps and 8 Mbps. We usually download about 250 Kbyte at the actual rate of 2 m ADSL and upload about 64 Kbyte

5. The optical fiber bandwidth is symmetric, And the uploading and downloading are equal.

  • Finally, we need to determine the maximum number of virtual users that a single client can allocate based on the actual tested system server and the network environment of the test client itself:

Here is an example:

1. Customer requirements:

① The homepage size of a website is 2 MB. Here, after the webpage is fully opened, it is saved as the sum of HTML and its image \ CSS elements;

② The Client Computer connects to the Web server with a bandwidth of 100 m, which belongs to the same LAN;

③ The customer requests to test the stress on the Web server when the website has 1000 concurrent accesses;

④ The client response time that the customer expects to visit the homepage of the website is less than 3 seconds;

2. Considerations for the test design are as follows:

① How many virtual users can a client host?

A: A 3-second download of 2 m web pages requires a rough estimate of K downloads per second. The principle is 8 times the bandwidth, in this case, a single user needs a bandwidth of Mbps to complete the work without concurrency; therefore, a client computer can only carry 20 concurrent users according to this standard; (the actual number of concurrent client users also need to consider the client's CPU memory and other information, Because Virtual users also need to consume physical computing resources)

② In reality, webpage download uses the maximum bandwidth. That is, when only one virtual user opens the webpage, the download speed is 100/8 = Mbps, it may download 2 MB of web resources in less than 0.2 seconds. The rest is actually just the time for JS, CSS rendering, and browser rendering. This time is generally 0.8 to 1 second; (because it is necessary to consider the time when the server prepares these webpage resources, the time when the network connection is established, the data transmission time, and so on)

③ When we access the Internet at home, our bandwidth is at least 1 Mbps of ADSL. Therefore, according to the estimation of 100/1 = 100 in actual tests, each client can use a maximum of 100 virtual users, this is to give each virtual user normal bandwidth resources and prevent bandwidth competition from becoming the cause of inaccurate performance test data or performance test failure. (In reality, we generally load 150 m of bandwidth and will load 200 to virtual users. This is the maximum number of users we want the server to support without limiting the response time to less than 3 seconds)

④ We recommend that you use a wired network for performance testing. Of course, performance testing can also be performed for wireless networks. However, changes in signal strength and stability of routers will greatly affect our performance testing results.

⑤ When your boss asks you how many clients are needed to test the virtual user generator, You can roughly estimate your testing resource requirements based on bandwidth principles, this avoids resource application.

  

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.