CN115766549A - Couplet test method and device, electronic equipment and storage medium - Google Patents

Couplet test method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115766549A
CN115766549A CN202211336860.3A CN202211336860A CN115766549A CN 115766549 A CN115766549 A CN 115766549A CN 202211336860 A CN202211336860 A CN 202211336860A CN 115766549 A CN115766549 A CN 115766549A
Authority
CN
China
Prior art keywords
data
pci
bandwidth value
server
bandwidth
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
CN202211336860.3A
Other languages
Chinese (zh)
Other versions
CN115766549B (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202211336860.3A priority Critical patent/CN115766549B/en
Publication of CN115766549A publication Critical patent/CN115766549A/en
Application granted granted Critical
Publication of CN115766549B publication Critical patent/CN115766549B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a couplet test method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: when the PCI-E devices to be tested are accessed to the switch group, a second bandwidth value of the PCI-E devices to be tested is obtained, target PCI-E devices to be in butt joint of the same type are determined, the second bandwidth value is compared with a first bandwidth value of each target PCI-E device to be in butt joint, and if the first bandwidth value is not smaller than the second bandwidth value, the corresponding target PCI-E devices to be in butt joint and the PCI-E devices to be tested are subjected to butt joint testing. Through integrating a plurality of first servers to the server side, the switch group is used as an intermediate medium, so that redundant servers do not need to be built in the performance pressure test, only PCI-E equipment to be tested needs to be accessed to the switch group, the server side automatically acquires a second bandwidth value of the PCI-E equipment to be tested, the PCI-E equipment to be connected is automatically matched with targets of the same type and capable of meeting the second bandwidth value, the two matched PCI-E equipment are subjected to connection test, the workload is greatly reduced, and the test efficiency is greatly improved.

Description

Couplet test method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to an association testing method, an association testing apparatus, an electronic device, and a computer-readable storage medium.
Background
PCI-E (Peripheral Component Interconnect-Express) devices such as a network card and an HCA (host channel adapter) card are often installed on a server riser card (adapter card/function expansion card) to realize the functions of communication and information interaction. Based on the requirements of the server design, a performance stress test on the PCI-E device is required to be added to the component list of the server. Among the criteria considered in the performance stress testing of PCI-E devices is primarily the bandwidth rate of the PCI-E devices being tested.
When testing at every time, a test engineer needs to install PCI-E equipment to be tested into one server, but needs to be matched with the test of the PCI-E equipment, the test engineer also needs to build another server and install the same PCI-E equipment, and the PCI-E equipment is in butt joint with the PCI-E equipment for testing, so that the workload is increased undoubtedly by the testing principle, the singleness of the testing situation is not consistent with the use principle in practical application, and the problem is not easy to find.
Disclosure of Invention
In view of the above, embodiments of the present invention are proposed in order to provide a couplet testing method that overcomes or at least partially solves the above-mentioned problems.
The embodiment of the invention also provides a couplet testing device, electronic equipment and a storage medium, so as to ensure the implementation of the method.
In order to solve the above problem, an embodiment of the present invention discloses a couplet testing method, which is applied to a server, where the server is connected to a switch group, the server is integrated with a plurality of first servers, the plurality of first servers are respectively installed with a plurality of types of PCI-E devices to be couplet, and the plurality of PCI-E devices to be couplet are respectively provided with one or more first data ports, and the method includes:
when a second server is used as a client to access the switch group, acquiring a second bandwidth value of a second data port of a PCI-E device to be tested on the second server;
determining a plurality of target PCI-E devices to be connected in parallel, wherein the target PCI-E devices are matched with the types of the PCI-E devices to be tested;
determining first data ports of the plurality of target PCI-E devices to be connected in parallel as candidate first data ports, and determining a first bandwidth value of each candidate first data port;
comparing the second bandwidth value of the second data port with the first bandwidth value of each candidate first data port in sequence;
if the first bandwidth value is not smaller than the second bandwidth value, taking a candidate first data port corresponding to the first bandwidth value as a data interaction port of the second data port;
allocating an IP address to the second data port;
and connecting the second data port and the data interaction port by adopting the IP address so as to carry out the couplet test on the PCI-E device to be coupled corresponding to the data interaction port and the PCI-E device to be tested.
Optionally, the plurality of first servers respectively deploy different first system environments; if the first bandwidth value is not smaller than the second bandwidth value, taking the candidate first data port corresponding to the first bandwidth value as the data interaction port of the second data port, including:
if the first bandwidth value is not smaller than the second bandwidth value, determining a second system environment deployed by the second server, and determining a target first system environment in which the candidate first data port corresponding to the first bandwidth value is located;
judging whether the target first system environment is consistent with the second system environment;
and if the target first system environment is consistent with the second system environment, taking the candidate first data port corresponding to the first bandwidth value as a data interaction port of the second data port.
Optionally, the determining a plurality of target PCI-E devices to be paired that match the types of the PCI-E devices to be tested includes:
receiving a data packet sent by the second server through the switch group;
respectively issuing the data packets to the plurality of first servers;
in each first server, determining to-be-connected PCI-E equipment capable of receiving the data packet;
and determining the PCI-E device to be connected capable of receiving the data packet as a target PCI-E device to be connected matched with the type of the PCI-E device to be connected.
Optionally, the data packet includes bandwidth data; the determining a first bandwidth value of each candidate first data port comprises:
determining the bandwidth upper limit value of the bandwidth data which can be received by each candidate first data port;
determining the state of each candidate first data port; the states include an idle state and a use state;
if the candidate first data port is in an idle state, taking the bandwidth upper limit value as a first bandwidth value of the candidate first data port;
and if the candidate first data port is in a use state, calculating a difference value between the bandwidth upper limit value and the used bandwidth value, and taking the difference value as the first bandwidth value of the candidate first data port.
Optionally, the method further comprises:
transmitting a test tool to the second server based on the second data port and the data interaction port which are connected pairwise so that the second server adopts the test tool to deploy a test environment;
and after the second server deploys the test environment, starting a performance pressure test for the PCI-E equipment to be tested.
Optionally, the method further comprises:
and if the first bandwidth value is smaller than the second bandwidth value, not taking the candidate first data port corresponding to the first bandwidth value as the data interaction port of the second data port.
Optionally, the method further comprises:
and if all the first bandwidth values are smaller than the second bandwidth value, determining the remaining used time of the first data port which meets the second bandwidth value through feedback.
The embodiment of the invention also discloses a couplet testing device, which is applied to a server, wherein the server is connected with a switch group, the server is integrated with a plurality of first servers, the first servers are respectively provided with a plurality of types of PCI-E equipment to be couplet, the PCI-E equipment to be couplet is respectively provided with one or more first data ports, and the device comprises:
a second bandwidth value obtaining module, configured to obtain a second bandwidth value of a second data port of a PCI-E device to be tested on a second server when the second server is accessed to the switch group as a client;
the target to-be-connected PCI-E device determining module is used for determining a plurality of target to-be-connected PCI-E devices matched with the types of the to-be-connected PCI-E devices;
the first bandwidth value determining module is used for determining first data ports of the target to-be-connected PCI-E devices as candidate first data ports and determining first bandwidth values of the candidate first data ports;
the bandwidth value comparison module is used for sequentially comparing the second bandwidth value of the second data port with the first bandwidth value of each candidate first data port;
a first data interaction port determining module, configured to, if the first bandwidth value is not smaller than the second bandwidth value, use a candidate first data port corresponding to the first bandwidth value as a data interaction port of the second data port;
the IP address distribution module is used for distributing an IP address for the second data port;
and the connecting module is used for connecting the second data port and the data interaction port by adopting the IP address so as to carry out the couplet test on the PCI-E device to be coupled corresponding to the data interaction port and the PCI-E device to be tested.
Optionally, the plurality of first servers respectively deploy different first system environments; the first data interaction port determining module comprises:
a system environment determining sub-module, configured to determine, if the first bandwidth value is not smaller than the second bandwidth value, a second system environment deployed by the second server, and determine a target first system environment in which a candidate first data port corresponding to the first bandwidth value is located;
the judgment submodule is used for judging whether the target first system environment is consistent with the second system environment;
and the first data interaction port determining submodule is used for taking the candidate first data port corresponding to the first bandwidth value as the data interaction port of the second data port if the target first system environment is consistent with the second system environment.
Optionally, the target to-be-associated PCI-E device determining module includes:
the data packet receiving submodule is used for receiving the data packet sent by the second server through the switch group;
the data packet issuing sub-module is used for respectively issuing the data packets to the plurality of first servers;
the PCI-E device to be connected capable of receiving the data packet determining submodule is used for determining the PCI-E device to be connected capable of receiving the data packet in each first server;
and the target to-be-connected PCI-E device determining submodule is used for determining the to-be-connected PCI-E device capable of receiving the data packet as the target to-be-connected PCI-E device matched with the type of the to-be-connected PCI-E device.
Optionally, the data packet includes bandwidth data; the first bandwidth value determination module comprises:
the bandwidth upper limit value determining submodule is used for determining the bandwidth upper limit value of the bandwidth data which can be received by each candidate first data port;
the state determining submodule is used for determining the state of each candidate first data port; the states include an idle state and a use state;
a first bandwidth value determining submodule in an idle state, configured to use the upper limit of the bandwidth as a first bandwidth value of the candidate first data port if the candidate first data port is in the idle state;
and the first bandwidth value determination submodule in a use state is used for calculating a difference value between the bandwidth upper limit value and the used bandwidth value if the candidate first data port is in the use state, and taking the difference value as the first bandwidth value of the candidate first data port.
Optionally, the apparatus further comprises:
the test script transmission module is used for transmitting a test tool to the second server based on the second data port and the data interaction port which are connected in pairs so that the second server adopts the test tool to deploy a test environment;
and the performance pressure test starting module is used for starting the performance pressure test aiming at the PCI-E equipment to be tested after the second server deploys the test environment.
Optionally, the apparatus further comprises:
and a second data interaction port determining module, configured to not take the candidate first data port corresponding to the first bandwidth value as the data interaction port of the second data port if the first bandwidth value is smaller than the second bandwidth value.
Optionally, the apparatus further comprises:
and the remaining used time determining module is used for determining the remaining used time of the first data port which meets the second bandwidth value through feedback if all the first bandwidth values are smaller than the second bandwidth value.
The embodiment of the invention also discloses electronic equipment which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory finish mutual communication through the communication bus;
the memory is used for storing a computer program;
the processor is used for realizing the couplet test method according to the embodiment of the invention when executing the program stored in the memory.
Embodiments of the present invention also disclose one or more computer-readable media having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform a couplet testing method according to embodiments of the present invention.
Compared with the prior art, the embodiment of the invention has the following advantages:
in the embodiment of the invention, when a second server is used as a client to access a switch group, a server acquires a second bandwidth value of a second data port of a PCI-E device to be tested on the second server, then determines a plurality of target PCI-E devices to be connected matched with the types of the PCI-E devices to be tested, determines first data ports of the target PCI-E devices to be connected as candidate first data ports, determines first bandwidth values of the candidate first data ports, compares the second bandwidth values of the second data ports with the first bandwidth values of the candidate first data ports in sequence, and if the first bandwidth values are not smaller than the second bandwidth values, uses the candidate first data ports corresponding to the first bandwidth values as data interaction ports of the second data ports, and allocates IP addresses to the second data ports to connect the second data ports and the data interaction ports by using IP addresses, so that the PCI-E devices to be connected corresponding to the data interaction ports and the PCI-E devices to be tested are subjected to be connected in a peer-to-peer test. According to the embodiment of the invention, the plurality of first servers are integrated to the server side, the switch group is used as an intermediate medium, so that redundant servers are not required to be built in the performance pressure test, only the PCI-E equipment to be tested is accessed to the switch group, the server side automatically obtains the second bandwidth value of the PCI-E equipment to be tested, the target PCI-E equipment to be connected of the same type and capable of meeting the second bandwidth value is automatically matched, and the two matched PCI-E equipment are subjected to the connection test, so that the workload is greatly reduced, and the test efficiency is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart illustrating steps of a method for peer-to-peer testing according to an embodiment of the present invention;
FIG. 2 is a flow chart of steps of another method for testing couplets provided by an embodiment of the invention;
fig. 3 is an interaction diagram of a first server, a switch group, and a second server according to an embodiment of the present invention;
fig. 4 is a block diagram of a peer testing apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
PCI-E belongs to high-speed serial point-to-point double-channel high-bandwidth transmission, connected equipment distributes independent channel bandwidth and does not share bus bandwidth, and the PCI-E mainly supports functions of active power management, error reporting, end-to-end reliable transmission, hot plug, service quality and the like.
The server realizes the interaction of communication and information by installing PCI-E equipment. Based on the requirements of the server design, a performance stress test on the PCI-E device is required to be added to the component list of the server. Among the criteria considered in the performance stress testing of PCI-E devices is primarily the bandwidth rate of the PCI-E devices being tested.
The existing test method needs a test engineer to match two servers for testing, wherein one server is used as a server side, the other server is used as a client side, and the two servers are connected in a couplet mode. However, in each test, a test engineer needs to prepare two types of the same PCI-E devices to be installed on the server and the client, and building the server each time wastes much debugging time and needs to prepare a plurality of types of the same PCI-E devices.
In order to solve the above problems, an embodiment of the present invention provides a method for testing a peer-to-peer connection, in which a plurality of first servers are integrated into a server, and a switch group is used as an intermediate medium, so that redundant servers do not need to be built in a performance pressure test, only PCI-E devices to be tested need to be accessed into the switch group, the server automatically obtains a second bandwidth value of the PCI-E devices to be tested, and target PCI-E devices to be tested that are of the same type and can meet the second bandwidth value are automatically matched, so as to perform the peer-to-peer test on two matched PCI-E devices, thereby greatly reducing workload and greatly improving test efficiency.
Referring to fig. 1, a flowchart of steps of a couplet testing method provided in an embodiment of the present invention is shown, and is applied to a server, where the server is connected to a switch group, the server is integrated with a plurality of first servers, the plurality of first servers are respectively installed with a plurality of types of to-be-couplet PCI-E devices, and the plurality of to-be-couplet PCI-E devices respectively have one or more first data ports, where the method specifically includes the following steps:
step 101, when a second server is used as a client to access the switch group, obtaining a second bandwidth value of a second data port of a PCI-E device to be tested on the second server.
In the embodiment of the invention, the server is applied to the server, a plurality of first servers are integrated in the server, and the high-performance and high-specification server can be used as the first server. Each first server is provided with a plurality of types of to-be-coupled PCI-E devices, and a PCI-E device with a high bandwidth can be used as the to-be-coupled PCI-E device, for example, a PCI-E device with a bandwidth of 200G or more than 200G can be used as the to-be-coupled PCI-E device, so that each high-bandwidth to-be-coupled PCI-E device can simultaneously receive bandwidth data of a plurality of low-bandwidth to-be-tested PCI-E devices according to a test strategy that the high bandwidth is compatible with the low bandwidth. The PCI-E device to be connected in parallel may include a network card and an HCA card, that is, each first server may have multiple network cards and multiple HCA cards.
A Network Card is also called a Network adapter (NIC) or a Network Interface Card, and the core of the Network adapter is a link layer controller, which is generally a single special-purpose chip that implements many link layer services, including framing, link access, flow control, error detection, etc. A network adapter is a device for networking a Computer, and a network card is a network adapter for connecting a PC (Personal Computer) and a LAN. The network card is inserted into a slot of a computer mainboard and is responsible for converting data to be transmitted by a user into a format which can be identified by other equipment on a network and transmitting the data through a network medium.
The HCA card can be applied to the fields of enterprise data centers, high-performance computing, embedded environments and the like, and provides a solution with high bandwidth and low delay for server/storage cluster application. In the applications such as cluster database, parallel application, processing service, high-performance embedded I/O and the like, the HCA card can improve the performance of the HCA card to the maximum extent, shorten the operation period and reduce the resource loss. In a virtual server environment, the connecticx IB technology meets the requirements of clustering, communication, storage, I/O management, performance enhancement and the like, simplifies the whole network configuration, and can be fully applied to blade servers or mainboard design due to small and exquisite packaging of chips.
It should be noted that the performance index evaluation criteria of the network card may include the bandwidth, throughput, delay, and other criteria. Wherein the bandwidth is used to evaluate a maximum transmission rate in the network link; throughput is the amount of data that is used to evaluate successful transmission per unit time; the delay is used to indicate the delay time from the time a request is sent from the network to the time a remote response is made. In different scenarios, the delay has different meanings, for example, when a connection is requested, such as a TCP (Transmission Control Protocol) handshake, the delay represents the delay of the connection, and in the Transmission of a normal data packet, the delay represents the time delay of the data packet coming back. Among the standards of concern for the performance stress testing of PCI-E devices is testing the bandwidth performance of PCI-E devices.
In the embodiment of the invention, the server is connected with the switch group, and the switch group can be obtained by cascading a plurality of switches in a laboratory. The switch group is used as an intermediate medium, and the function of the switch group can provide more connection ports for the sub-networks so as to connect more servers. A switch may connect to multiple first servers, but in order to avoid that multiple first servers connect to the same switch to contend for bandwidth resources, a switch may connect to one first server correspondingly, and a threshold of the number of connections may also be set, for example, the threshold of the number of connections is set to 3, then a switch may connect to less than 3 first servers, and the embodiment of the present invention does not limit the number of switch cascades.
In the embodiment of the invention, the switch group can be connected with not only the server but also the client, and the client is a second server needing to be tested. In other words, if the network card needs to be tested, the network card can be used as a PCI-E device to be tested, the PCI-E device to be tested is installed on the second server, and then the second server is used as a client to access the switch group; if the HCA card needs to be tested, the HCA card can be used as a PCI-E device to be tested, the PCI-E device to be tested is installed on a second server, and then the second server is used as a client to be accessed to the switch group.
The switch group can inform the server side, and the server side can develop a couplet test process aiming at the PCI-E equipment to be tested. Each PCI-E device to be connected in parallel is provided with one or more first data ports, and each PCI-E device to be tested is provided with one or more second data ports. The server may first obtain information of the to-be-tested PCI-E devices on the second server, where the information of the to-be-tested PCI-E devices may include a second bandwidth value of the second data port, and the second bandwidth value is a required bandwidth value of each second data port that the to-be-tested PCI-E devices have, so that the to-be-connected PCI-E devices that can satisfy the second bandwidth value may be found in the plurality of first data ports subsequently based on the required bandwidth values, and thus, the matched to-be-tested PCI-E devices and the to-be-connected PCI-E devices are subjected to a connection test.
And 102, determining a plurality of target PCI-E devices to be connected which are matched with the types of the PCI-E devices to be tested.
In the embodiment of the invention, the first server is provided with various types of PCI-E devices to be connected in parallel, and a plurality of first servers are integrated into the server, so that a plurality of target PCI-E devices to be connected in parallel matched with the types of the PCI-E devices to be tested need to be found at the server. Exemplarily, if the PCI-E device to be tested is a network card, a plurality of target PCI-E devices to be connected that belong to the type of the network card need to be found at the server; if the PCI-E device to be tested is an HCA card, a plurality of target PCI-E devices to be connected which belong to the HCA card type need to be found at the server side.
Step 103, determining the first data ports of the target PCI-E devices to be connected in parallel as candidate first data ports, and determining a first bandwidth value of each candidate first data port.
In the embodiment of the invention, after a plurality of target to-be-coupled PCI-E devices of the same type are found, each target to-be-coupled PCI-E device has one or more first data ports, so that the first data port of each target to-be-coupled PCI-E device can be determined as a candidate first data port. The second data port and the candidate first data port are data ports of the same type, for example, the PCI-E device to be tested is a network card, and then both the second data port and the candidate first data port are network card data ports; if the PCI-E device to be tested is an HCA card, then both the second data port and the candidate first data port are HCA card data ports.
As the second data port has the corresponding second bandwidth value, each candidate first data port also has the corresponding first bandwidth value, and since the candidate first data port may be in a use state, that is, the candidate first data port may be occupied by the second data ports of other PCI-E devices to be tested at this time, that is, the first bandwidth value is changed in real time, the service end needs to determine the first bandwidth value of each candidate first data port at this time.
And step 104, comparing the second bandwidth value of the second data port with the first bandwidth value of each candidate first data port in sequence.
In this embodiment of the present invention, each candidate first data port may be sequentially traversed to sequentially compare the second bandwidth value of the second data port with the first bandwidth value of each candidate first data port, so as to find a candidate first data port that can satisfy the second bandwidth value.
And 105, if the first bandwidth value is not smaller than the second bandwidth value, using the candidate first data port corresponding to the first bandwidth value as a data interaction port of the second data port.
In this embodiment of the present invention, if the first bandwidth value is not less than the second bandwidth value, that is, the first bandwidth value is greater than or equal to the second bandwidth value, the candidate first data port corresponding to the first bandwidth value may be used as the data exchange port of the second data port; if the first bandwidth value is smaller than the second bandwidth value, the candidate first data port corresponding to the first bandwidth value may not be required to be used as the data interaction port of the second data port.
And 106, allocating an IP address to the second data port.
In the embodiment of the present invention, after finding the data interaction port of the second data port, the server may allocate an IP address to the second data port, and each second data port has an independent IP address. This is like a computer, and the network cable will get an IP address that the DHCP server automatically assigns to the client host. DHCP (Dynamic Host Configuration Protocol) is a network Protocol of a local area network, and works using UDP, and a DHCP server may automatically assign an IP address to an internal network or a network service provider, and may also serve as a means for centrally managing all computers for a user or an internal network administrator.
The server allocates IP addresses to communicate the two data ports, for example, in a network card test, the two data ports of one network card a on the first server have respective IP addresses, and are respectively connected to the two data ports of one network card B on the second server.
And 107, connecting the second data port and the data interaction port by using the IP address so as to perform a couplet test on the PCI-E device to be coupled corresponding to the data interaction port and the PCI-E device to be tested.
In the embodiment of the invention, after the server allocates the IP address to the second data port, the server can use the IP address to connect the second data port and the data interaction port, so that the PCI-E device to be connected corresponding to the data interaction port and the PCI-E device to be tested can perform connection testing.
In summary, in the embodiment of the present invention, when a second server is used as a client to access a switch group, a server obtains a second bandwidth value of a second data port of a PCI-E device to be tested on the second server, then determines a plurality of target PCI-E devices to be paired that match the type of the PCI-E device to be tested, determines first data ports of the target PCI-E devices to be paired as candidate first data ports, determines first bandwidth values of the candidate first data ports, compares the second bandwidth value of the second data port with the first bandwidth value of each candidate first data port in sequence, and if the first bandwidth value is not less than the second bandwidth value, uses the candidate first data port corresponding to the first bandwidth value as a data exchange port of the second data port, then allocates an IP address to the second data port, and connects the second data port and the data port with an IP address to perform a pairing test on the PCI-E device to be paired that corresponds to the data exchange port and the PCI-E device to be tested. According to the embodiment of the invention, the plurality of first servers are integrated to the server side, the switch group is used as an intermediate medium, so that redundant servers are not required to be built in the performance pressure test, only the PCI-E equipment to be tested is accessed to the switch group, the server side automatically obtains the second bandwidth value of the PCI-E equipment to be tested, the PCI-E equipment to be tested is automatically matched with the target PCI-E equipment to be connected which is of the same type and can meet the second bandwidth value, and the two matched PCI-E equipment are subjected to the connection test, so that the workload is greatly reduced, and the test efficiency is greatly improved.
Referring to fig. 2, a flowchart of another method for testing peer-to-peer provided in an embodiment of the present invention is shown, and is applied to a server, where the server is connected to a switch group, the server is integrated with a plurality of first servers, the plurality of first servers are respectively installed with a plurality of types of to-peer PCI-E devices, and the plurality of to-peer PCI-E devices respectively have one or more first data ports, where the method specifically includes the following steps:
step 201, when a second server is used as a client to access the switch group, obtaining a second bandwidth value of a second data port of a PCI-E device to be tested on the second server.
In the embodiment of the invention, the method is applied to the server side, the server side is integrated with a plurality of first servers, and each first server is a high-performance and high-specification server. Each first server is provided with a plurality of types of to-be-coupled PCI-E devices, each to-be-coupled PCI-E device is a high-bandwidth PCI-E device, for example, a bandwidth of 200G or more than 200G, and according to a test strategy that the high bandwidth is compatible with the low bandwidth, each high-bandwidth to-be-coupled PCI-E device can simultaneously receive bandwidth data of a plurality of low-bandwidth to-be-tested PCI-E devices. The PCI-E device to be connected to another may include a network card and an HCA card, that is, each first server may have multiple network cards and multiple HCA cards.
Taking the network card test as an example, when testing the network card of the 10G bandwidth data port, the network card on the server side may receive data sources of at least 18 10G bandwidth data ports at the same time (considering the problem of data loss); when the network card of the 25G bandwidth data port is tested, the network card on the service end can simultaneously receive at least 6 data sources of the 25G port (considering the problem of data loss).
The server is connected with a switch group, the switch group can be obtained by cascading a plurality of switches, and the switch group is used as an intermediate medium and can provide more connection ports for sub-networks so as to connect more servers. One switch may be connected to one or more first servers, so that a switch group may be connected to a plurality of first servers.
The switch group can be connected with a server and a client, and the client is a second server needing to be tested. In other words, if the network card needs to be tested, the network card can be used as a PCI-E device to be tested, the PCI-E device to be tested is installed on the second server, and then the second server is used as a client to access the switch group; if the HCA card needs to be tested, the HCA card can be used as a PCI-E device to be tested, the PCI-E device to be tested is installed on a second server, and then the second server is used as a client to be accessed to the switch group.
Each PCI-E device to be connected in parallel is provided with one or more first data ports, and each PCI-E device to be tested is provided with one or more second data ports. Referring to fig. 3, an interaction schematic diagram of a first server, a switch group, and a second server provided in the embodiment of the present invention is shown, where a server is integrated with 3 first servers, which are a first server 1, a first server 2, and a first server 3, where the first server 1 is installed with an HCA card 1, a network card 2, and a network card 3, the first server 2 is installed with a network card 4 and an HCA card 2, and the first server 3 is installed with an HCA card 3, an HCA card 4, and a network card 5; furthermore, the HCA card 1 is provided with first data ports a-b, the network card 2 is provided with a first data port c, the network card 3 is provided with first data ports d-f, the network card 4 is provided with first data ports g-h, the HCA card 2 is provided with first data ports i-j, the HCA card 3 is provided with first data ports k-l, the HCA card 4 is provided with first data ports m-n, and the network card 5 is provided with first data ports o-q. When the network card 1 needs to be tested, the network card 1 can be used as a PCI-E device to be tested, then the PCI-E device to be tested is installed in a second server, the second server is used as a client to access to the switch group, and the network card 1 is provided with second data ports X to Y.
The server may first obtain information of the to-be-tested PCI-E devices on the second server, where the information of the to-be-tested PCI-E devices may include a second bandwidth value of the second data port, and the second bandwidth value is a required bandwidth value of each second data port that the to-be-tested PCI-E devices have, so that the to-be-connected PCI-E devices that can satisfy the second bandwidth value may be found in the plurality of first data ports subsequently based on the required bandwidth values, and thus, the matched to-be-tested PCI-E devices and the to-be-connected PCI-E devices are subjected to a connection test.
Step 202, determining a plurality of target to-be-connected PCI-E devices matched with the types of the to-be-tested PCI-E devices.
In the embodiment of the invention, the first server is provided with various types of PCI-E devices to be connected in parallel, and a plurality of first servers are integrated into the server, so that a plurality of target PCI-E devices to be connected in parallel matched with the types of the PCI-E devices to be tested need to be found at the server. Exemplarily, if the PCI-E device to be tested is a network card, a plurality of target PCI-E devices to be connected that belong to the type of the network card need to be found at the server; if the PCI-E device to be tested is an HCA card, a plurality of target PCI-E devices to be connected which belong to the HCA card type need to be found at the server side.
In an alternative embodiment of the present invention, step 202 may comprise the following sub-steps:
substep S11, receiving the data packet sent by the second server through the switch group;
substep S12, respectively sending the data packets to the plurality of first servers;
substep S13, in each first server, determining a PCI-E device to be associated that can receive the data packet;
and a substep S14, determining the to-be-connected PCI-E device capable of receiving the data packet as a target to-be-connected PCI-E device matched with the type of the to-be-tested PCI-E device.
In the embodiment of the invention, the client only sends the data packet to the PCI-E equipment of the same type. For example, if the client needs to test the network card, the client only sends a data packet to the network card data port on the server; if the client side needs to test the HCA card, the client side only sends a data packet to the HCA card data port on the server side. Therefore, the target PCI-E devices to be connected in parallel matched with the types of the PCI-E devices to be tested can be searched by the client terminal in the form of sending data packets to different first servers.
In a specific implementation, the second server serves as a client, data packets are sent to the server through the switch group, the server issues the data packets to the plurality of first servers respectively, and then in each first server, PCI-E devices to be aligned that can receive the data packets are determined, so that the PCI-E devices to be aligned that can receive the data packets are determined as target PCI-E devices to be aligned, and the target PCI-E devices to be aligned are PCI-E devices to be aligned that have the same type as the PCI-E devices to be aligned.
In an example, as shown in fig. 3, when the client starts testing, a stress test script may be run, and the second server sends a data packet for 1 hour to the first server 1, then sends a data packet for 1 hour to the first server 2, and then sends a data packet for 1 hour … … to the first server 3, and according to this test principle, when the client runs the stress test script for more than 12 hours, the data packet is sent to different first servers with 1 hour as a time limit for testing.
As can be seen from fig. 3, the PCI-E device to be tested on the second server is of a network card type, so the network card 2 and the network card 3 on the first server 1 can receive the data packet, the network card 4 on the first server 2 can receive the data packet, and the network card 5 on the first server 3 can receive the data packet, and therefore the network cards 2 to 5 are all the target PCI-E devices to be connected matched with the type of the PCI-E device to be tested.
Step 203, determining the first data ports of the target PCI-E devices to be connected in parallel as candidate first data ports, and determining a first bandwidth value of each candidate first data port.
In the embodiment of the invention, after a plurality of target to-be-coupled PCI-E devices of the same type are found, each target to-be-coupled PCI-E device has one or more first data ports, so that the first data port of each target to-be-coupled PCI-E device can be determined as a candidate first data port. The second data port and the candidate first data port are data ports of the same type, for example, the PCI-E device to be tested is a network card, and then both the second data port and the candidate first data port are network card data ports; for example, if the PCI-E device to be tested is an HCA card, then the second data port and the candidate first data port are both HCA card data ports.
In one example, as shown in fig. 3, the network cards 2 to 5 are all target PCI-E devices to be connected matching the types of the PCI-E devices to be tested, where the network card 2 has a first data port c, the network card 3 has first data ports d to f, the network card 4 has first data ports g to h, and the network card 5 has first data ports o to q, so that the first data ports c, d, E, f, g, h, o, p, and q are all candidate first data ports.
As the second data port has the corresponding second bandwidth value, each candidate first data port also has the corresponding first bandwidth value, and since the candidate first data port may be in a use state, that is, the candidate first data port may be occupied by the second data ports of other PCI-E devices to be tested at this time, that is, the first bandwidth value is changed in real time, the service end needs to determine the first bandwidth value of each candidate first data port at this time.
In an optional embodiment of the invention, the data packet comprises bandwidth data; step 203 may include the following sub-steps including:
substep S21, determining the bandwidth upper limit value of the bandwidth data which can be received by each candidate first data port;
a substep S22 of determining the status of each of the candidate first data ports; the states include an idle state and a use state;
substep S23, if the candidate first data port is in an idle state, taking the bandwidth upper limit value as a first bandwidth value of the candidate first data port;
and a substep S24, if the candidate first data port is in a use state, calculating a difference between the bandwidth upper limit value and the used bandwidth value, and using the difference as the first bandwidth value of the candidate first data port.
In this embodiment of the present invention, the data packet may include bandwidth data, and each first server may collect bandwidth data each time, analyze the bandwidth data, and determine an upper limit value of a bandwidth that can be received by each candidate first data port, where the upper limit value of the bandwidth is maximum bandwidth data that can be received by the candidate first data port and is equivalent to a maximum received data value, and therefore, the maximum received data value may be used as the upper limit value of the bandwidth that can be received by the candidate first data port.
Since the candidate first data ports may be occupied by the second data ports of other PCI-E devices to be tested, the server needs to determine the status of each candidate first data port, where the status may include an idle status and a use status.
If the candidate first data port is in an idle state, it can be stated that the candidate first data port is not occupied by the second data ports of other PCI-E devices to be tested, so that the upper limit value of the bandwidth can be directly used as the first bandwidth value of the candidate first data port; if the candidate first data port is in the use state, it may be stated that the candidate first data port is occupied by the second data ports of the other PCI-E devices to be tested, and therefore, the remaining bandwidth space of the candidate first data port needs to be calculated, and the remaining bandwidth space may be obtained by subtracting the used bandwidth value from the bandwidth upper limit value of the candidate first data port, and the obtained difference value is used as the first bandwidth value of the candidate first data port.
And step 204, comparing the second bandwidth value of the second data port with the first bandwidth value of each candidate first data port in sequence.
In this embodiment of the present invention, each candidate first data port may be sequentially traversed to sequentially compare the second bandwidth value of the second data port with the first bandwidth value of each candidate first data port, so as to find a candidate first data port capable of satisfying the second bandwidth value.
In addition, in order to facilitate subsequent automatic allocation of candidate first data ports meeting bandwidth requirements, and also in order to prevent a phenomenon that the total bandwidth of the second server is greater than the total bandwidth of the first server, for example, if the first server is 200G, a second server with a bandwidth of 100G is capable of performing a full-rate peering test, and conversely, if the first server is 100G, the second server with a bandwidth of 200G needs to perform a peering test, which may result in inaccurate test, the service end may first determine the upper bandwidth limit value of the second server and determine the upper bandwidth limit value of each first server before comparing the second bandwidth value of the second data port with the first bandwidth value of the candidate first data port, and then sequentially compare the upper bandwidth limit value of the second server with the upper bandwidth limit value of each first server. If the bandwidth upper limit value of a certain first server is greater than or equal to the bandwidth upper limit value of a second server, the step of comparing the second bandwidth value of the second data port with the first bandwidth value of the candidate first data port can be executed for the first server; if the bandwidth upper limit value of a certain first server is smaller than the bandwidth upper limit value of the second server, the first server can be skipped, that is, the step of comparing the second bandwidth value of the second data port with the first bandwidth value of the candidate first data port is not required to be executed for the first server.
In a specific implementation, each first server may collect bandwidth data every time, analyze the bandwidth data, calculate bandwidth upper limit values of the bandwidth data that can be received by all the PCI-E devices to be connected on the first server, and use the bandwidth upper limit values of the bandwidth data that can be received by all the PCI-E devices to be connected as the bandwidth upper limit values of the bandwidth data that can be received by the first server. Specifically, the bandwidth upper limit value of the first data port of the to-be-coupled PCI-E device may be added to obtain the bandwidth upper limit value of the bandwidth data that can be received by the to-be-coupled PCI-E device, and then the bandwidth upper limit value of the to-be-coupled PCI-E device on the first server is added to obtain the bandwidth upper limit value of the bandwidth data that can be received by the first server. Similarly, the bandwidth upper limit value of the second server may be obtained by adding second bandwidth values of second data ports of the PCI-E devices to be associated on the second server.
Step 205, if the first bandwidth value is not less than the second bandwidth value, taking the candidate first data port corresponding to the first bandwidth value as the data interaction port of the second data port.
In this embodiment of the present invention, if the first bandwidth value is not less than the second bandwidth value, that is, the first bandwidth value is greater than or equal to the second bandwidth value, the candidate first data port corresponding to the first bandwidth value may be used as the data exchange port of the second data port.
In an optional embodiment of the invention, the method may further comprise:
and if the first bandwidth value is smaller than the second bandwidth value, not taking the candidate first data port corresponding to the first bandwidth value as the data interaction port of the second data port.
In the embodiment of the present invention, if the first bandwidth value is smaller than the second bandwidth value, it is not necessary to use the candidate first data port corresponding to the first bandwidth value as the data interaction port of the second data port, and other candidate first data ports may be traversed until the data interaction port meeting the bandwidth requirement is found.
In one example, as shown in fig. 3, the candidate first data ports include first data ports c, d, E, f, g, h, o, p, q, and the PCI-E device to be tested (the network card 1) has second data ports X and Y, where the second bandwidth value X of the second data port X may be compared with the first bandwidth value c of the candidate first data port c. If the first bandwidth value c is greater than or equal to the second bandwidth value X, the candidate first data port c can be used as a data interaction port of the second data port X; if the first bandwidth value c is smaller than the second bandwidth value X, the candidate first data port c cannot be used as a data interaction port of the second data port X, and other candidate first data ports may be traversed at this time. Specifically, if the first bandwidth value c is smaller than the second bandwidth value X, the second bandwidth value X of the second data port X may be compared with the first bandwidth value d of the candidate first data port d, … …, if the first bandwidth values of the candidate first data ports c, d, e, f on the first server 1 are all smaller than the second bandwidth value of the second data port X, the second bandwidth value of the second data port X may be sequentially compared with the first bandwidth values of the candidate first data ports g, h on the first server 2, … …, if the first bandwidth values of the candidate first data ports g, h on the first server 2 are all smaller than the second bandwidth value of the second data port X, the second bandwidth value of the second data port X may be sequentially compared with the first bandwidth values of the candidate first data ports o, p, q on the first server 3, until a data interaction port meeting the bandwidth requirement is found.
It should be noted that the comparing step of the second data port Y is the same as the comparing step of the second data port X, and is not described herein again.
The above examples are only for the purpose of better understanding the embodiments of the present invention to those skilled in the art, and the present invention is not limited thereto.
In an optional embodiment of the present invention, the plurality of first servers respectively deploy different first system environments; step 205 may include the following sub-steps:
substep S31, if the first bandwidth value is not less than the second bandwidth value, determining a second system environment deployed by the second server, and determining a target first system environment in which the candidate first data port corresponding to the first bandwidth value is located;
substep S32, determining whether the target first system environment is consistent with the second system environment;
and a substep S33, if the target first system environment is consistent with the second system environment, using the candidate first data port corresponding to the first bandwidth value as the data interaction port of the second data port.
In the embodiment of the present invention, the server keeps receiving the data state all the time, different first servers on the server may deploy different first system environments, for example, the first server 1 deploys a system of centros 8.2, the first server 2 deploys a system of redhats 8.2, the first server 3 deploys a system of Windows2022, the first server 4 deploys a system … … of ubuntu12.06, and so on.
The second server is deployed with a second system environment, in order to enable the two PCI-E devices under the couplet test to be in the same system environment, when the first bandwidth value is not less than the second bandwidth value, the server may further determine the second system environment deployed by the second server, determine a target first system environment in which the candidate first data port corresponding to the first bandwidth value is located, and then determine whether the target first system environment is consistent with the second system environment. If the second system environment is a redhat8.2 system and the target first system environment is also a redhat8.2 system, the target first system environment can be judged to be consistent with the second system environment, so that the candidate first data port corresponding to the first bandwidth value can be used as a data interaction port of the second data port; if the second system environment is a redhat8.2 system and the target first system environment is a Windows2022 system, it can be determined that the target first system environment is inconsistent with the second system environment, and therefore the candidate first data port corresponding to the first bandwidth value does not need to be used as the data interaction port of the second data port.
And step 206, allocating an IP address to the second data port.
In the embodiment of the present invention, after finding the data interaction port of the second data port, the server may allocate an IP address to the second data port, and each second data port has an independent IP address. The IP address can be used for connecting the second data port and the data interaction port, so that the two matched PCI-E devices can be subjected to a couplet test.
And step 207, connecting the second data port and the data interaction port by using the IP address, so that the PCI-E device to be connected corresponding to the data interaction port and the PCI-E device to be connected are subjected to connection testing.
In the embodiment of the invention, after the server allocates the IP address to the second data port, the server can use the IP address to connect the second data port and the data interaction port, so that the PCI-E device to be connected corresponding to the data interaction port and the PCI-E device to be tested can perform connection testing.
In an optional embodiment of the invention, the method may further comprise:
transmitting a test tool to the second server based on the second data port and the data interaction port which are connected pairwise so that the second server adopts the test tool to deploy a test environment; and after the second server deploys the test environment, starting a performance pressure test for the PCI-E equipment to be tested.
In the embodiment of the invention, after the second data port and the data interaction port are connected by adopting the IP address, the server side can transmit the test tool to the second server based on the second data port and the data interaction port which are connected pairwise, the test tool is used for deploying the test environment, and the second server can automatically install the test tool after receiving the test tool through the switch group, thereby automatically deploying the test environment. After the second server deploys the test environment, the server may initiate a performance stress test for the PCI-E device to be tested.
In an optional embodiment of the invention, the method may further comprise:
and if all the first bandwidth values are smaller than the second bandwidth value, determining the remaining used time of the first data port with the feedback meeting the second bandwidth value.
In the embodiment of the present invention, if no data interaction port meeting the bandwidth space requirement required by the PCI-E device to be tested is found after traversing all the candidate first data ports, that is, all the first bandwidth values are smaller than the second bandwidth value, the remaining used time of the feedback test engineer may be determined, where the remaining used time refers to the remaining time of the first data port meeting the second bandwidth value. In other words, all the first data ports on the server are in use, no other unnecessary available first data ports are used for testing, at this time, the testing sequence is available, for example, the testing time is generally 24 hours, then the remaining time can be calculated according to the testing sequence, and after the testing of a certain first data port is completed, an instruction can be sent to inform a testing engineer to perform the testing of the second server, so that the reasonable distribution is achieved.
Compared with the existing testing method, the testing engineer is required to match two servers, one server serves as a server side, the other server serves as a client side, and the two servers are connected in a antithetical couplet mode. Specifically, in the current actual test work, testing an HCA card or a network card requires an additional server to be associated with the HCA card or the network card for testing. For example, when testing a 100G HCA card, the HCA card to be tested is installed on one server, but in order to match the test of the HCA card, another server needs to be set up to install the HCA card of 100G or the bandwidth of more than 100G to match the test. When two servers are deployed for testing, the same system environment needs to be deployed in the two servers, for example, a redhat7.8 system is installed at a client, a redhat7.8 system is also installed at a server to cooperate with the testing, and even sometimes, because of compatibility problems, the same type of HCA card needs to be installed at the client and the server for testing. Therefore, the testing principle undoubtedly aggravates workload, and the singularity of the testing situation does not accord with the using principle in practical application, thereby being unfavorable for finding problems.
According to the embodiment of the invention, a switch group is obtained by cascading a plurality of switches, a plurality of high-performance and high-specification first servers are integrated into a server, the server is uniformly deployed as a receiving end, the receiving end is configured with the PCI-E equipment to be connected with high bandwidth, and each PCI-E equipment to be connected with high bandwidth can simultaneously receive bandwidth data of a plurality of PCI-E equipment to be tested with low bandwidth according to a testing strategy that the high bandwidth is compatible with the low bandwidth. Different first system environments are deployed in different first servers, a second server is used as a client to access to a switch group, and the second server realizes collocation principles of various conditions by sending data packets to different first servers, so that the effect of truly simulating an application scene is achieved, and more problems can be found conveniently. The method comprises the steps that a server collects and analyzes the maximum bandwidth requirement which can be met when interacting with a client, each first server defines a bandwidth upper limit value, collects and analyzes the maximum received data value of each first data port of each PCI-E device to be connected, and defines the maximum received data value as the bandwidth upper limit value of the first data port. The server side calculates the residual bandwidth space of the first data port according to the upper limit value of the bandwidth and the real-time interactive data, compares the residual bandwidth space of the first data port with the second bandwidth value of the second data port, screens out candidate first data ports meeting the bandwidth requirement, and uses the candidate first data ports as the data interactive ports of the second data port of the PCI-E device to be tested.
In summary, in the embodiment of the present invention, when a second server is used as a client to access a switch group, a server obtains a second bandwidth value of a second data port of a PCI-E device to be tested on the second server, then determines a plurality of target PCI-E devices to be paired that match the type of the PCI-E device to be tested, determines first data ports of the target PCI-E devices to be paired as candidate first data ports, determines first bandwidth values of the candidate first data ports, compares the second bandwidth value of the second data port with the first bandwidth value of each candidate first data port in sequence, and if the first bandwidth value is not less than the second bandwidth value, uses the candidate first data port corresponding to the first bandwidth value as a data exchange port of the second data port, then allocates an IP address to the second data port, and connects the second data port and the data port with an IP address to perform a pairing test on the PCI-E device to be paired that corresponds to the data exchange port and the PCI-E device to be tested. According to the embodiment of the invention, the plurality of first servers are integrated to the server side, the switch group is used as an intermediate medium, so that redundant servers are not required to be built in the performance pressure test, only the PCI-E equipment to be tested is accessed to the switch group, the server side automatically obtains the second bandwidth value of the PCI-E equipment to be tested, the target PCI-E equipment to be connected of the same type and capable of meeting the second bandwidth value is automatically matched, and the two matched PCI-E equipment are subjected to the connection test, so that the workload is greatly reduced, and the test efficiency is greatly improved.
Referring to fig. 4, a block diagram of a configuration of an alignment testing apparatus according to an embodiment of the present invention is shown, and is applied to a server, where the server is connected to a switch group, the server is integrated with a plurality of first servers, the plurality of first servers are respectively installed with a plurality of types of to-be-aligned PCI-E devices, and each of the plurality of to-be-aligned PCI-E devices has one or more first data ports, and specifically includes the following modules:
a second bandwidth value obtaining module 401, configured to obtain, when a second server is used as a client to access the switch group, a second bandwidth value of a second data port of a PCI-E device to be tested on the second server;
a target to-be-connected PCI-E device determining module 402, configured to determine multiple target to-be-connected PCI-E devices that are matched with the types of the to-be-connected PCI-E devices;
a first bandwidth value determining module 403, configured to determine first data ports that the target PCI-E devices to be paired and associated have as candidate first data ports, and determine a first bandwidth value of each candidate first data port;
a bandwidth value comparing module 404, configured to sequentially compare the second bandwidth value of the second data port with the first bandwidth values of the candidate first data ports;
a first data interaction port determining module 405, configured to, if the first bandwidth value is not smaller than the second bandwidth value, use a candidate first data port corresponding to the first bandwidth value as a data interaction port of the second data port;
an IP address allocating module 406, configured to allocate an IP address to the second data port;
and the connection module 407 is configured to connect the second data port and the data interaction port by using the IP address, so that the PCI-E device to be connected corresponding to the data interaction port and the PCI-E device to be tested perform a connection test.
In an optional embodiment of the present invention, the plurality of first servers respectively deploy different first system environments; the first data interaction port determining module 405 may include:
the system environment determination submodule is used for determining a second system environment deployed by the second server and determining a target first system environment in which the candidate first data port corresponding to the first bandwidth value is located if the first bandwidth value is not smaller than the second bandwidth value;
the judgment submodule is used for judging whether the target first system environment is consistent with the second system environment;
and the first data interaction port determining submodule is used for taking the candidate first data port corresponding to the first bandwidth value as the data interaction port of the second data port if the target first system environment is consistent with the second system environment.
In an optional embodiment of the present invention, the target to-be-associated PCI-E device determining module 402 may include:
the data packet receiving submodule is used for receiving the data packet sent by the second server through the switch group;
the data packet issuing sub-module is used for respectively issuing the data packets to the plurality of first servers;
the PCI-E device to be connected capable of receiving the data packet determining submodule is used for determining the PCI-E device to be connected capable of receiving the data packet in each first server;
and the target to-be-connected PCI-E device determining submodule is used for determining the to-be-connected PCI-E device capable of receiving the data packet as the target to-be-connected PCI-E device matched with the type of the to-be-connected PCI-E device.
In an optional embodiment of the invention, the data packet comprises bandwidth data; the first bandwidth value determination module 403 may include:
the bandwidth upper limit value determining submodule is used for determining the bandwidth upper limit value of the bandwidth data which can be received by each candidate first data port;
the state determining submodule is used for determining the state of each candidate first data port; the states include an idle state and a use state;
a first bandwidth value determining submodule in an idle state, configured to use the upper limit of the bandwidth as a first bandwidth value of the candidate first data port if the candidate first data port is in the idle state;
and the first bandwidth value determination submodule in a use state is used for calculating a difference value between the bandwidth upper limit value and the used bandwidth value if the candidate first data port is in the use state, and taking the difference value as the first bandwidth value of the candidate first data port.
In an optional embodiment of the present invention, the apparatus may further comprise:
the test script transmission module is used for transmitting a test tool to the second server based on the second data port and the data interaction port which are connected in pairs so that the second server adopts the test tool to deploy a test environment;
and the performance pressure test starting module is used for starting the performance pressure test aiming at the PCI-E equipment to be tested after the second server deploys the test environment.
In an optional embodiment of the present invention, the apparatus may further comprise:
and a second data interaction port determining module, configured to not take the candidate first data port corresponding to the first bandwidth value as the data interaction port of the second data port if the first bandwidth value is smaller than the second bandwidth value.
In an optional embodiment of the present invention, the apparatus may further comprise:
and the remaining used time determining module is used for determining the remaining used time of the first data port which is fed back to meet the second bandwidth value if all the first bandwidth values are smaller than the second bandwidth value.
In summary, in the embodiment of the present invention, when a second server is used as a client to access a switch group, a server obtains a second bandwidth value of a second data port of a PCI-E device to be tested on the second server, then determines a plurality of target PCI-E devices to be paired that match the type of the PCI-E device to be tested, determines first data ports of the target PCI-E devices to be paired as candidate first data ports, determines first bandwidth values of the candidate first data ports, compares the second bandwidth value of the second data port with the first bandwidth value of each candidate first data port in sequence, and if the first bandwidth value is not less than the second bandwidth value, uses the candidate first data port corresponding to the first bandwidth value as a data exchange port of the second data port, then allocates an IP address to the second data port, and connects the second data port and the data port with an IP address to perform a pairing test on the PCI-E device to be paired that corresponds to the data exchange port and the PCI-E device to be tested. According to the embodiment of the invention, the plurality of first servers are integrated to the server side, the switch group is used as an intermediate medium, so that redundant servers are not required to be built in the performance pressure test, only the PCI-E equipment to be tested is accessed to the switch group, the server side automatically obtains the second bandwidth value of the PCI-E equipment to be tested, the PCI-E equipment to be tested is automatically matched with the target PCI-E equipment to be connected which is of the same type and can meet the second bandwidth value, and the two matched PCI-E equipment are subjected to the connection test, so that the workload is greatly reduced, and the test efficiency is greatly improved.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
An embodiment of the present invention further provides an electronic device, including: the processor, the memory, and the computer program stored in the memory and capable of running on the processor, when executed by the processor, implement the processes of the above embodiment of the couplet testing method, and can achieve the same technical effects, and are not described herein again to avoid repetition.
The embodiment of the invention also provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program realizes each process of the embodiment of the couplet testing method, and can achieve the same technical effect, and in order to avoid repetition, the details are not repeated here.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "include", "including" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or terminal device including a series of elements includes not only those elements but also other elements not explicitly listed or inherent to such process, method, article, or terminal device. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or terminal apparatus that comprises the element.
The couplet testing method, the apparatus, the electronic device and the computer-readable storage medium provided by the present invention are described in detail above, and a specific example is applied in the present document to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A couplet test method is applied to a server, the server is connected with a switch group, the server is integrated with a plurality of first servers, the plurality of first servers are respectively provided with a plurality of types of PCI-E (peripheral component interconnect-express) equipment to be coupled in high-speed serial computer expansion bus standard, and the plurality of PCI-E equipment to be coupled in couplet are respectively provided with one or more first data ports, and the method comprises the following steps:
when a second server is used as a client to access the switch group, acquiring a second bandwidth value of a second data port of a PCI-E device to be tested on the second server;
determining a plurality of target PCI-E devices to be connected in parallel, wherein the target PCI-E devices are matched with the types of the PCI-E devices to be tested;
determining first data ports of the target PCI-E devices to be connected in parallel as candidate first data ports, and determining first bandwidth values of the candidate first data ports;
comparing the second bandwidth value of the second data port with the first bandwidth value of each candidate first data port in sequence;
if the first bandwidth value is not smaller than the second bandwidth value, taking a candidate first data port corresponding to the first bandwidth value as a data interaction port of the second data port;
allocating an internet protocol address (IP) address to the second data port;
and connecting the second data port and the data interaction port by adopting the IP address so as to carry out the couplet test on the PCI-E device to be coupled corresponding to the data interaction port and the PCI-E device to be tested.
2. The method of claim 1, wherein the plurality of first servers respectively deploy different first system environments; if the first bandwidth value is not less than the second bandwidth value, taking the candidate first data port corresponding to the first bandwidth value as the data interaction port of the second data port, including:
if the first bandwidth value is not smaller than the second bandwidth value, determining a second system environment deployed by the second server, and determining a target first system environment in which the candidate first data port corresponding to the first bandwidth value is located;
judging whether the target first system environment is consistent with the second system environment;
and if the target first system environment is consistent with the second system environment, taking the candidate first data port corresponding to the first bandwidth value as a data interaction port of the second data port.
3. The method of claim 2, wherein determining a plurality of target PCI-E devices to be paired that match the type of the PCI-E device to be tested comprises:
receiving a data packet sent by the second server through the switch group;
respectively issuing the data packets to the plurality of first servers;
in each first server, determining to-be-connected PCI-E equipment capable of receiving the data packet;
and determining the PCI-E device to be connected capable of receiving the data packet as a target PCI-E device to be connected matched with the type of the PCI-E device to be connected.
4. The method of claim 3, wherein the data packet comprises bandwidth data; the determining a first bandwidth value of each candidate first data port comprises:
determining the bandwidth upper limit value of the bandwidth data which can be received by each candidate first data port;
determining the state of each candidate first data port; the states include an idle state and a use state;
if the candidate first data port is in an idle state, taking the bandwidth upper limit value as a first bandwidth value of the candidate first data port;
and if the candidate first data port is in a use state, calculating a difference value between the bandwidth upper limit value and the used bandwidth value, and taking the difference value as the first bandwidth value of the candidate first data port.
5. The method of claim 1, further comprising:
transmitting a test tool to the second server based on the second data port and the data interaction port which are connected pairwise so that the second server adopts the test tool to deploy a test environment;
and after the second server deploys the test environment, starting a performance pressure test for the PCI-E equipment to be tested.
6. The method of claim 1, further comprising:
and if the first bandwidth value is smaller than the second bandwidth value, not taking the candidate first data port corresponding to the first bandwidth value as the data interaction port of the second data port.
7. The method of claim 1, further comprising:
and if all the first bandwidth values are smaller than the second bandwidth value, determining the remaining used time of the first data port which meets the second bandwidth value through feedback.
8. The utility model provides a antithetical couplet testing arrangement, is applied to the server side, the server side is connected with the switch group, the server side integration has a plurality of first servers, a plurality of types of a plurality of PCI-E equipment of waiting to antithetical couplet are installed respectively to a plurality of first servers, a plurality of PCI-E equipment of waiting to antithetical couplet have one or more first data ports respectively, the device includes:
a second bandwidth value obtaining module, configured to obtain a second bandwidth value of a second data port of a PCI-E device to be tested on a second server when the second server accesses the switch group as a client;
the target to-be-connected PCI-E device determining module is used for determining a plurality of target to-be-connected PCI-E devices matched with the types of the to-be-connected PCI-E devices;
the first bandwidth value determining module is used for determining first data ports of the target to-be-connected PCI-E devices as candidate first data ports and determining first bandwidth values of the candidate first data ports;
the bandwidth value comparison module is used for sequentially comparing the second bandwidth value of the second data port with the first bandwidth value of each candidate first data port;
a first data interaction port determining module, configured to, if the first bandwidth value is not smaller than the second bandwidth value, use a candidate first data port corresponding to the first bandwidth value as a data interaction port of the second data port;
the IP address distribution module is used for distributing an IP address for the second data port;
and the connecting module is used for connecting the second data port and the data interaction port by adopting the IP address so as to carry out the couplet test on the PCI-E device to be coupled corresponding to the data interaction port and the PCI-E device to be tested.
9. An electronic device, comprising: a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the couplet testing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the couplet testing method according to any one of claims 1 to 7.
CN202211336860.3A 2022-10-28 2022-10-28 Antithetical couplet test method, device, electronic equipment and storage medium Active CN115766549B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211336860.3A CN115766549B (en) 2022-10-28 2022-10-28 Antithetical couplet test method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211336860.3A CN115766549B (en) 2022-10-28 2022-10-28 Antithetical couplet test method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115766549A true CN115766549A (en) 2023-03-07
CN115766549B CN115766549B (en) 2024-05-14

Family

ID=85354077

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211336860.3A Active CN115766549B (en) 2022-10-28 2022-10-28 Antithetical couplet test method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115766549B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140082245A1 (en) * 2012-09-17 2014-03-20 Hon Hai Precision Industry Co., Ltd. Method and server for managing redundant arrays of independent disks cards
US20190044840A1 (en) * 2018-06-27 2019-02-07 Intel Corporation Protocol analyzer for monitoring and debugging high-speed communications links
CN111447121A (en) * 2020-03-31 2020-07-24 龙芯中科(北京)信息技术有限公司 Test method, device, equipment and storage medium of PCIE controller
CN111538539A (en) * 2020-04-23 2020-08-14 苏州浪潮智能科技有限公司 Storage system starting method and device and computer readable storage medium
CN114124968A (en) * 2022-01-27 2022-03-01 深圳华锐金融技术股份有限公司 Load balancing method, device, equipment and medium based on market data
CN114448841A (en) * 2021-12-30 2022-05-06 苏州浪潮智能科技有限公司 Network card testing method, device, equipment and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140082245A1 (en) * 2012-09-17 2014-03-20 Hon Hai Precision Industry Co., Ltd. Method and server for managing redundant arrays of independent disks cards
US20190044840A1 (en) * 2018-06-27 2019-02-07 Intel Corporation Protocol analyzer for monitoring and debugging high-speed communications links
CN111447121A (en) * 2020-03-31 2020-07-24 龙芯中科(北京)信息技术有限公司 Test method, device, equipment and storage medium of PCIE controller
CN111538539A (en) * 2020-04-23 2020-08-14 苏州浪潮智能科技有限公司 Storage system starting method and device and computer readable storage medium
CN114448841A (en) * 2021-12-30 2022-05-06 苏州浪潮智能科技有限公司 Network card testing method, device, equipment and medium
CN114124968A (en) * 2022-01-27 2022-03-01 深圳华锐金融技术股份有限公司 Load balancing method, device, equipment and medium based on market data

Also Published As

Publication number Publication date
CN115766549B (en) 2024-05-14

Similar Documents

Publication Publication Date Title
TWI385967B (en) Smart-switch management module system and method
US9231846B2 (en) Providing network capability over a converged interconnect fabric
CN109067877B (en) Control method for cloud computing platform deployment, server and storage medium
WO2018157299A1 (en) Virtualization method for optical line terminal (olt) device, and related device
CN105005521A (en) Test method and apparatus
CN108737275B (en) Plug-and-play satellite-borne network management method based on SpaceFibre
CN110677383B (en) Firewall wall opening method and device, storage medium and computer equipment
CN105260377B (en) A kind of upgrade method and system based on classification storage
CN105991361A (en) Monitoring method and monitoring system for cloud servers in cloud computing platform
CN107682460B (en) Distributed storage cluster data communication method and system
CN107070752B (en) Testing method and testing system for long connection capacity
WO2020199686A1 (en) Method and system for providing edge service, and computing device
CN111158865A (en) Method for realizing multiplexing virtual serial port
CN108989089A (en) A kind of device data acquisition methods, equipment and system
WO2009059505A1 (en) A remote initialization method and system
CN103179162B (en) A kind of method and system of output journal
CN115766549B (en) Antithetical couplet test method, device, electronic equipment and storage medium
CN110932879B (en) Network performance test method, data processing device and storage medium
CN107070725B (en) A kind of method that server two-level management intermodule communication is shaken hands
CN111278022A (en) Internet of things WiFi module performance test method and system
CN1609819B (en) Test method for computer external equipment interface
US6173319B1 (en) Using a systems network architecture logical unit activation request unit as a dynamic configuration definition in a gateway
CN112436982B (en) Network flow automatic mixed running test method, system, terminal and storage medium
CN109376135B (en) Cluster file system management method and system
US20170235494A1 (en) Methods for managing array luns in a storage network with a multi-path configuration and devices thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant