CN1953401A - Multi-threading network pressure testing method - Google Patents

Multi-threading network pressure testing method Download PDF

Info

Publication number
CN1953401A
CN1953401A CN 200510109287 CN200510109287A CN1953401A CN 1953401 A CN1953401 A CN 1953401A CN 200510109287 CN200510109287 CN 200510109287 CN 200510109287 A CN200510109287 A CN 200510109287A CN 1953401 A CN1953401 A CN 1953401A
Authority
CN
China
Prior art keywords
client
server
packet
time
pressure testing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 200510109287
Other languages
Chinese (zh)
Other versions
CN100568827C (en
Inventor
马随义
周宏亮
陈玄同
刘文涵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inventec Corp
Original Assignee
Inventec Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inventec Corp filed Critical Inventec Corp
Priority to CNB2005101092872A priority Critical patent/CN100568827C/en
Publication of CN1953401A publication Critical patent/CN1953401A/en
Application granted granted Critical
Publication of CN100568827C publication Critical patent/CN100568827C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention relates to a multi-process network pressure testing method. Wherein, it uses several clients to read and write data on server, to test the response of server on single client; the server receives the couple request of client at main process, to build connection with client and generate sub process to process the data pack with client and relative operation, to avoid occupying central processor fully caused by receiving and sending data pack. And it will provide real property report to user.

Description

A kind of network pressure testing method of multithreading
Technical field
The present invention relates to a kind of network pressure testing method, particularly relate to a kind of network pressure testing method of multithreading.
Background technology
Server is a kind of of computer, and it is a kind of high-performance computer that various share service are provided for client computer on the network.It is under the control of network operating system, with coupled hard disk, disk, printer, Modem (modulator-demodulator) and special-purpose communication apparatus, the customer rs site that offers on the network is shared, and also can deliver and service such as data management for the network user provides centralized calculation, information.Can the say so foundation stone of the whole network operation of server is being brought into play very important effect, as the node of network, storage, handles lot of data, information on the network, therefore is also referred to as the soul of network.
Yet server for the performance of checking the server different aspect and the reasonability of hardware configuration design, need comprehensively be tested it before producing in batches.Current, many benchmark testing software to server performance are provided on the market, different benchmark test can be measured the performance of server different aspect.Testing software, their operation principle is: server is carried out a large amount of, frequent data access, by moving test program with the long time, check corresponding test report, draw the enhanced performance of server according to this, such as the client terminal quantity of supporting, the arithmetic speed of CPU, senior performances such as the time of file access, what these indexs reflected is the performance of server, and can not reflect the particular hardware that influences the entire system performance.
Therefore, current in order to make the hardware of server reasonable in design, in design different hardware is divided into some test items with hardware test program, test program with certain rule-based scheduling and execution, can be tested these test items to all hardware.In order to make test program can reasonably test out the actual conditions of hardware designs, guarantee that server is in use reliable and stable, each test item all is provided with adjustable parameter.Regulate the parameter of test item, relevant hardware is among a large amount of, the frequent data access, whole like this server system just is in the extreme hardware environment for use, thereby reaches the purpose that pressure test is carried out in design to system hardware structure.
Generally speaking, good and efficient pressure testing software need have following requirement: the first, and simulant-client is to all actions that server produced truly.The second, the pressure that can simulate a large amount of client simultaneously and produced.The 3rd, must produce test script (Script) at an easy rate, can edit script again simultaneously.The 4th, support seizing and correctly simulating of Cookies and Session ID (Session ID).The 5th, can be at the load of different execution flow process configuration different specific weights.The 6th, can show the quantity and the ratio of test execution success, failure, mistake.The 7th, can check literal specific in the page or picture.The 8th, can different thinking, the dead times of simulates real real user.The 9th, must be able to import a large amount of different data in the test.The tenth, must can End-to-End write down the usefulness and the response data of all software and hardware resources in the whole tested system architecture (end-to-end).The 11, possess the function of analytical test gained data, and produce all kinds of analytical statements.The 12, can utilize the data analysis of test gained to go out the above suspicious problem points of system's generation.
But, no matter server is done the rational test of performance or hardware configuration design, the occupancy of the central processing unit of client end/server end (CPU) is very high in test process, that is to say that central processing unit is constantly handled and client connects, receives and send packet to client, particularly the occupancy of the central processing unit of server is all 100%, and causes server can't move other program or slack-off to the response speed of other programs.Therefore, because receive and when sending packet, and cause the occupancy of central processing unit to reach 100%, but can't handle the lot of data visit to client when the central processing unit of server.So, how to alleviate central processing unit because receive and send the occupancy of packet, thereby reach the purpose of really server being carried out pressure test to client, become one of research staff's problem to be solved.
Summary of the invention
In view of above problem, main purpose of the present invention is to provide a kind of network pressure testing method of multithreading, is used to solve the existing problem of prior art.
For reaching above-mentioned purpose, the invention provides a kind of network pressure testing method of multithreading, one server is carried out the read-write motion of mass data by most clients, be used to test of the response of this server to single client, and this server comprises a buffer unit at least, and this method includes the following step:
This server is set up a chained list;
This server is with the online request of main thread reception from this client;
This server is set up a connectivity port that should online request, and sends an on line data to this client;
This server is set up one online by this connectivity port and this client, and with this on-line record in this chained list;
This server is set up primary line journey at least;
This time thread receives the packet from this client; And
This time thread returns this packet to this client.
The network pressure testing method of described multithreading wherein, also includes the following step:
This main thread receives the ending message from this time thread; And
This main thread is online to this in this chained list and deletes.
The network pressure testing method of described multithreading wherein, in the step of this time thread reception from a packet of this client, includes the step that this time thread is judged a type of data packet.
The network pressure testing method of described multithreading, wherein, this type of data packet comprises and reads request type, and write a request type and an ending request type arbitrary one.
The network pressure testing method of described multithreading, wherein, this time thread is judged in the step of a type of data packet, when this type of data packet reads request for this, carries out the following step:
This data information in this packet that this time thread will receive is stored in this buffer unit; And
This time thread to this buffer unit reads this data information.
The network pressure testing method of described multithreading, wherein, this time thread judges in the step of a type of data packet, when this type of data packet writes request for this, carries out the step that this data information that this time thread will be stored in this buffer unit is sent to this client.
The network pressure testing method of described multithreading, wherein, respectively this time thread is judged and when this type of data packet is this ending request, is included the following step in the step of a type of data packet:
This time thread sends this ending message to this main thread; And
This time thread is deleted all these data informations of this buffer unit.
For reaching above-mentioned purpose, the present invention also provides the network pressure testing method of another kind of multithreading, one server is carried out the read-write motion of mass data by most clients, be used to test of the response of this server to single client, and this server comprises a buffer unit at least, and this method includes the following step:
This client is set up a very first time value, one second time value and an end value;
This client sends an online request to this server;
This client receives the on line data from this server in this very first time value, set up online;
This client sends a packet to this server;
This client receives this packet from this server in this second time value;
This client contrasts this packet of this packet and reception for conforming to;
This client count receives a numerical value of this packet;
This client confirms that this end value and this time numerical value are for conforming to; And
This client disconnects the online of this server end.
The network pressure testing method of described multithreading, wherein, this client is in this very first time value, reception is from an on line data of server, set up online step, when in this very first time value, not receiving this on line data, include this client and set up one first error reporting, and send the step of this online request once more to this server.
The network pressure testing method of described multithreading, wherein, this client is in this second time value, reception is from the step of this packet of this server, when in this second time value, not receiving this packet, include this client and set up one second error reporting, and disconnect and the online step of this server.
The network pressure testing method of described multithreading, wherein, it is the step that conforms to this packet of reception that this client contrasts this packet, when this packet of this packet and reception when not conforming to, include this client and set up one the 3rd error reporting, and disconnect and the online step of this server.
The network pressure testing method of described multithreading, wherein, this client confirms that this predetermined end value and this time numerical value are the step that conforms to, when this predetermined end value and this time numerical value for for not simultaneously, carry out the step of a numerical value of this this response data packet of client count.
Characteristics of the present invention are the central processing unit of server not because receive and send the action of packet, and cause the occupancy of central processing unit to reach 100%; Therefore can reach the purpose of real network stress test, and the performance report of user's real service device is provided.
Describe the present invention below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
Description of drawings
Fig. 1 is for being applied to network pressure testing system Organization Chart of the present invention;
Fig. 2 is the flow chart of the main thread running of server;
Fig. 3 is the flow chart of the inferior thread running of server; And
Fig. 4 is the flow chart according to the network pressure testing method of another kind of multithreading provided by the present invention.
Wherein, Reference numeral:
1 client
2 clients
4 buffer units
5 servers
Embodiment
The high-performance of server 5 mainly is presented in high-speed operational capability, for a long time reliability service, powerful aspects such as external data handling capacity.Therefore, when carrying out server 5 performance tests, how giving server 5 pressurizations, is a very important thing and the performance report of user's real service device 5 is provided.
See also Fig. 1, Organization Chart for the network pressure testing system that is applied to multithreading of the present invention, carry out the read-write motion of mass data for 1,2 pairs of servers 5 of a plurality of clients, that is to say that client 1,2 constantly sends online requirement and packet to server 5, server 5 is sent to client 1,2 as it is with the packet of receiving again.Data by client 1,2 and server 5 are come and gone, thereby reflect the performance of server 5, so that the performance report of user's real service device 5 to be provided.
Server 5 includes buffer unit 4 at least, and buffer unit 4 is used for the interior data information of packet that storage server 5 is received.Wherein any in the combination of buffer unit 4 internal memory (Memory), hard disk (Hard Disk) that can be server 5 and high-speed cache (Cache) internal memory.The performance of server 5 is effectively to handle the requirement of any client 1,2, therefore, in the network pressure testing method according to multithreading provided by the present invention, server 5 receives the online requirement of client 1,2 and sets up onlinely with client 1,2 with main thread, and thread comes data packet delivery and the relevant treatment thereof between processing server 5 and the client 1,2 in proper order.The process step that it is detailed will illustrate in the paragraph down.
Seeing also Fig. 2, be the flow chart of steps of the main thread of server 5, is first embodiment with main thread to the response of single client 1 with server 5, and main thread includes the following step:
Step 100: at first, server 5 is set up chained list;
Step 120: then, server 5 is with the online request of main thread reception from client 1;
Step 140: moreover, set up the connectivity port (Socket) of corresponding online request, and send on line data to client 1.Wherein include the state of connectivity port, buffer unit 4 titles that receive packet and the length value of buffer unit 4 in the on line data at least;
Step 160: then, server 5 is set up online by connectivity port and client 1, and with on-line record in chained list;
Step 180: set up thread again at least one time.The wherein requirement action in data packet delivery and the execution packet between time thread process server 5 and the client 1;
Step 200: then, when the main thread of server 5 receives ending message from inferior thread, then execution in step 220, when the main thread of server 5 does not receive ending message from inferior thread, then execution in step 120, after server 5 receives time ending message of thread transmission, just disconnect the online of client 1; And
Step 220: the client 1 of the main thread deletion record of server 5 in chained list online, to disconnect the online of server 5 and client 1.
See also Fig. 3, be the flow chart of steps of the inferior thread of server 5, this server 5 is an example with data packet delivery between one thread process server 5 and the client 1 and execution relevant action.After server 5 was set up the step 180 of time thread, the flow process of inferior thread included the following step:
Step 181: at first, server 5 is by the packet of time thread reception from client 1;
Step 182: follow judgment data bag type, wherein type of data packet includes and reads request type, ending request type, writes arbitrary in the request type, when type of data packet changes step 183 when reading request type, when being the ending request type, type of data packet changes step 190, when type of data packet commentaries on classics step 195 when writing request type;
Step 183: server 5 is stored in buffer unit 4 by inferior thread with the data information in the packet;
Step 184: read this data information to buffer unit 4;
Step 185: and this packet is sent to client 1 by inferior thread.
Step 190: inferior thread sends ending message to main thread;
Step 191: all data informations in the deletion buffer unit 4 stop the running of time thread;
Step 195: server 5 is sent to client 1 by the data information that inferior thread will be stored in the buffer unit 4 in advance.
Please refer to Fig. 4, be flow chart according to the network pressure testing method of another kind of multithreading provided by the present invention, carry out the read-write motion of mass data by most 1,2 pairs of servers 5 of client, be used for the response of 5 pairs of single clients 1,2 of testing server, and server 5 comprises buffer unit 4 at least.This carries out data packet delivery with 1 pair of server of single client 5 is example.The method includes the following step:
Step 300: at first, client 1 is set up very first time value, second time value and end value;
Step 310: then send online the request to server 5, online to set up;
Step 320: judge whether client 1 receives the on line data from server 5 in very first time value,, change step 321 if not if change step 330;
Step 321: client 1 is set up first error reporting, and sends online the request to server 5 once more;
Step 330: after client 1 receives on line data, begin to send packet to server 5;
Step 340: judge whether client 2 receives the packet from server 5 in second time value,, change step 341 if not if change step 350.Wherein include the state of connectivity port, buffer unit 4 titles that receive packet and the length value of buffer unit 4 in the on line data at least.
Step 341: client 1 is set up second error reporting, and disconnects the online of server 5;
Step 350: whether client 1 correction data bag conforms to the packet of reception or is consistent then, if conform to or change step 360 when consistent, if do not conform to or change step 361 when inconsistent;
Step 360: then counting receives the inferior numerical value of packet, and continues execution in step 370;
Step 361: client 1 is set up the 3rd error reporting, and disconnects the online of server 5;
Step 370: judge whether client 1 end value is consistent or identical with time numerical value, if client 1 confirms to change step 380 when end value and time numerical value are consistent or identical, if commentaries on classics step 360 when inconsistent or inequality;
Step 380: client 1 disconnects with server 5 online.
When using the network stress test of the method for the invention testing server 5, the central processing unit of server 5 is because receive and send the action of packet, and causes the occupancy of central processing unit to reach 100%; Therefore, can reach the purpose of real network stress test, and the performance report of user's real service device 5 is provided.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.

Claims (12)

1, a kind of network pressure testing method of multithreading, by a plurality of clients one server is carried out the read-write motion of mass data, be used to test of the response of this server, and this server comprises a buffer unit at least single client, it is characterized in that, include the following step:
This server is set up a chained list;
This server is with the online request of main thread reception from this client;
This server is set up a connectivity port that should online request, and sends an on line data to this client;
This server is set up one online by this connectivity port and this client, and with this on-line record in this chained list;
This server is set up primary line journey at least;
This time thread receives the packet from this client; And
This time thread returns this packet to this client.
2, the network pressure testing method of multithreading according to claim 1 is characterized in that, also includes the following step:
This main thread receives the ending message from this time thread; And
This main thread is online to this in this chained list and deletes.
3, the network pressure testing method of multithreading according to claim 1 is characterized in that, in the step of this time thread reception from a packet of this client, includes the step that this time thread is judged a type of data packet.
4, the network pressure testing method of multithreading according to claim 3 is characterized in that, this type of data packet comprises and reads request type, and write a request type and an ending request type arbitrary one.
5, the network pressure testing method of multithreading according to claim 4 is characterized in that, this time thread is judged in the step of a type of data packet, when this type of data packet reads request for this, carries out the following step:
This data information in this packet that this time thread will receive is stored in this buffer unit; And
This time thread to this buffer unit reads this data information.
6, the network pressure testing method of multithreading according to claim 4, it is characterized in that, this time thread is judged in the step of a type of data packet, when this type of data packet writes when request for this, carry out the step that this data information that this time thread will be stored in this buffer unit is sent to this client.
7, the network pressure testing method of multithreading according to claim 4 is characterized in that, respectively this time thread is judged and when this type of data packet is this ending request, included the following step in the step of a type of data packet:
This time thread sends this ending message to this main thread; And
This time thread is deleted all these data informations of this buffer unit.
8, a kind of network pressure testing method of multithreading, by a plurality of clients one server is carried out the read-write motion of mass data, be used to test of the response of this server, and this server comprises a buffer unit at least single client, it is characterized in that, include the following step:
This client is set up a very first time value, one second time value and an end value;
This client sends an online request to this server;
This client receives the on line data from this server in this very first time value, set up online;
This client sends a packet to this server;
This client receives this packet from this server in this second time value;
This client contrasts this packet of this packet and reception for conforming to;
This client count receives a numerical value of this packet;
This client confirms that this end value and this time numerical value are for conforming to; And
This client disconnects the online of this server end.
9, the network pressure testing method of multithreading according to claim 8, it is characterized in that, this client is in this very first time value, reception is from an on line data of server, set up online step, when in this very first time value, not receiving this on line data, include this client and set up one first error reporting, and send the step of this online request once more to this server.
10, the network pressure testing method of multithreading according to claim 8, it is characterized in that, this client is in this second time value, reception is from the step of this packet of this server, when in this second time value, not receiving this packet, include this client and set up one second error reporting, and disconnect and the online step of this server.
11, the network pressure testing method of multithreading according to claim 8, it is characterized in that, it is the step that conforms to this packet of reception that this client contrasts this packet, when this packet of this packet and reception when not conforming to, include this client and set up one the 3rd error reporting, and disconnect and the online step of this server.
12, the network pressure testing method of multithreading according to claim 8, it is characterized in that, this client confirms that this predetermined end value and this time numerical value are the step that conforms to, when this predetermined end value and this time numerical value for not simultaneously, carry out the step of a numerical value of this this response data packet of client count.
CNB2005101092872A 2005-10-20 2005-10-20 A kind of network pressure testing method of multithreading Expired - Fee Related CN100568827C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005101092872A CN100568827C (en) 2005-10-20 2005-10-20 A kind of network pressure testing method of multithreading

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005101092872A CN100568827C (en) 2005-10-20 2005-10-20 A kind of network pressure testing method of multithreading

Publications (2)

Publication Number Publication Date
CN1953401A true CN1953401A (en) 2007-04-25
CN100568827C CN100568827C (en) 2009-12-09

Family

ID=38059538

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005101092872A Expired - Fee Related CN100568827C (en) 2005-10-20 2005-10-20 A kind of network pressure testing method of multithreading

Country Status (1)

Country Link
CN (1) CN100568827C (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103064778A (en) * 2011-10-20 2013-04-24 阿里巴巴集团控股有限公司 Method, device and system of server performances testing
CN105207832A (en) * 2014-06-13 2015-12-30 腾讯科技(深圳)有限公司 Server stress testing method and device
CN106201853A (en) * 2015-04-30 2016-12-07 阿里巴巴集团控股有限公司 Method of testing and device
CN107835101A (en) * 2017-10-19 2018-03-23 厦门美柚信息科技有限公司 Method and device, the terminal of pressure test are carried out to server
CN108984212A (en) * 2017-05-31 2018-12-11 腾讯科技(深圳)有限公司 A kind of method and electronic equipment of closing process
CN109491895A (en) * 2018-10-26 2019-03-19 北京车和家信息技术有限公司 Server stress test method and device
CN111290942A (en) * 2018-12-10 2020-06-16 北京京东尚科信息技术有限公司 Pressure testing method, device and computer readable medium
CN113994274A (en) * 2019-04-10 2022-01-28 豪倍公司 Network pressure testing

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103064778B (en) * 2011-10-20 2015-09-09 阿里巴巴集团控股有限公司 A kind of server performance method of testing, Apparatus and system
CN103064778A (en) * 2011-10-20 2013-04-24 阿里巴巴集团控股有限公司 Method, device and system of server performances testing
CN105207832A (en) * 2014-06-13 2015-12-30 腾讯科技(深圳)有限公司 Server stress testing method and device
CN105207832B (en) * 2014-06-13 2019-05-03 腾讯科技(深圳)有限公司 A kind of server stress test method and device
CN106201853A (en) * 2015-04-30 2016-12-07 阿里巴巴集团控股有限公司 Method of testing and device
CN108984212A (en) * 2017-05-31 2018-12-11 腾讯科技(深圳)有限公司 A kind of method and electronic equipment of closing process
CN107835101B (en) * 2017-10-19 2020-05-08 厦门美柚股份有限公司 Method and device for pressure test on server and terminal
CN107835101A (en) * 2017-10-19 2018-03-23 厦门美柚信息科技有限公司 Method and device, the terminal of pressure test are carried out to server
CN109491895A (en) * 2018-10-26 2019-03-19 北京车和家信息技术有限公司 Server stress test method and device
CN111290942A (en) * 2018-12-10 2020-06-16 北京京东尚科信息技术有限公司 Pressure testing method, device and computer readable medium
CN113994274A (en) * 2019-04-10 2022-01-28 豪倍公司 Network pressure testing
CN113994274B (en) * 2019-04-10 2024-03-29 豪倍公司 Network pressure testing
US11997002B2 (en) 2019-04-10 2024-05-28 Hubbell Incorporated Network stress test

Also Published As

Publication number Publication date
CN100568827C (en) 2009-12-09

Similar Documents

Publication Publication Date Title
CN100568827C (en) A kind of network pressure testing method of multithreading
Smith et al. What TCP/IP protocol headers can tell us about the web
Cinque et al. Microservices monitoring with event logs and black box execution tracing
US6775644B2 (en) System load testing coordination over a network
CN102916854B (en) Flow statistical method, device and proxy server
CN101277272B (en) Method for implementing magnanimity broadcast data warehouse-in
US7315807B1 (en) System and methods for storage area network simulation
CN103428042B (en) Server is carried out the method and system of stress test
Turnbull The art of monitoring
CN102244594A (en) Network emulation in manual and automated testing tools
CN105068876A (en) Method for acquiring mobile phone APP performance data based on distributed true phones
Puranik et al. Real-time monitoring using AJAX and WebSockets
CN118113781A (en) Redis synchronization method, redis synchronization device, storage medium and processor
CN104967667B (en) A kind of software stability test remote monitoring system based on cloud service
CN111913861A (en) Performance test method, device, equipment and medium of Internet of things system
Li et al. NetStorage: A synchronized trace-driven replayer for network-storage system evaluation
CN107145414B (en) Method and system for testing distributed object storage
US9614891B1 (en) Assembling communications based on captured packets
CN110232026A (en) AssetBundle resource detection method and system
Burchard et al. A scalable system for bundling online social network mining research
Banikazemi et al. VIBe: A micro-benchmark suite for evaluating virtual interface architecture (VIA) implementations
CN106557530A (en) Operation system, data recovery method and device
CN106933718B (en) Method for monitoring performance and device
Kavalanekar et al. Measuring database performance in online services: a trace-based approach
Mansour et al. Streamgen: A workload generation tool for distributed information flow applications

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20091209

Termination date: 20191020

CF01 Termination of patent right due to non-payment of annual fee