CN117951166B - Heterogeneous computing-oriented resource intelligent selection method, device and system - Google Patents

Heterogeneous computing-oriented resource intelligent selection method, device and system Download PDF

Info

Publication number
CN117951166B
CN117951166B CN202410346113.0A CN202410346113A CN117951166B CN 117951166 B CN117951166 B CN 117951166B CN 202410346113 A CN202410346113 A CN 202410346113A CN 117951166 B CN117951166 B CN 117951166B
Authority
CN
China
Prior art keywords
operator
heterogeneous
operator information
information table
acceleration device
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.)
Active
Application number
CN202410346113.0A
Other languages
Chinese (zh)
Other versions
CN117951166A (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 Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain 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 Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Priority to CN202410346113.0A priority Critical patent/CN117951166B/en
Publication of CN117951166A publication Critical patent/CN117951166A/en
Application granted granted Critical
Publication of CN117951166B publication Critical patent/CN117951166B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a heterogeneous computing-oriented intelligent resource selection method, device and system, and relates to the technical field of database retrieval. The method comprises the following steps: generating a query operator information table according to the equipment operator information table; determining at least one execution plan to be evaluated corresponding to the query request; determining an operation included in any execution plan to be evaluated; determining a target operator according to any execution plan operation to be evaluated and querying an operator information table, and determining the cost of a corresponding execution plan; screening the cost of the execution plan to determine a target execution plan; and sequentially calling corresponding target operators according to the sequence of the operations contained in the target execution plan so as to complete the query request. By implementing the heterogeneous computing-oriented resource intelligent selection method, device and system disclosed by the embodiment of the application. An optimal heterogeneous acceleration device capable of determining to execute the query request; screening to obtain an optimal execution plan, and executing a database query request; and the database query efficiency is improved.

Description

Heterogeneous computing-oriented resource intelligent selection method, device and system
Technical Field
The invention relates to the technical field of database retrieval, in particular to a heterogeneous computing-oriented intelligent resource selection method, device and system.
Background
Databases are software that efficiently organizes, stores, and manages data, and since the advent of the information age, database technology has become an important mainstay for computer information systems and applications as the scale of data has exploded. With the advent of a large number of new applications, the need for real-time querying and analysis of data has grown higher and higher, and some CPU tasks have been written to heterogeneous acceleration devices for execution. Although research on heterogeneous acceleration of databases has achieved a certain result in recent years, means such as forced unloading of query tasks to a certain heterogeneous acceleration device for execution or forced conversion of the heterogeneous acceleration device into CPU computing power are adopted, so that flexibility of matching of the heterogeneous acceleration device is lost, and influence of differences of running environments on performance of the heterogeneous acceleration device is ignored. The optimal acceleration effect of heterogeneous acceleration cannot be exerted, and further the improvement of query efficiency is limited.
Disclosure of Invention
In order to obtain a failure rate value with higher accuracy while reducing the test cost for obtaining the failure rate through reliability test, and further accurately evaluate the failure rate of the whole server, the application provides the following technical scheme.
In a first aspect, a method for intelligently selecting resources facing heterogeneous computing is provided, including: acquiring a device operator information table, and generating a query operator information table according to the device operator information table, wherein the device operator information table comprises operations executed by any operator; acquiring a query request, and determining at least one execution plan to be evaluated corresponding to the query request, wherein any one of the at least one execution plan to be evaluated is used for completing the query request; determining an operation included in any execution plan to be evaluated; sequentially extracting any operation of an execution plan to be evaluated, determining a target operator according to the operation and a query operator information table, and determining the cost of the corresponding execution plan according to the target operator; screening the cost of the execution plan to determine a target execution plan; and sequentially calling corresponding target operators according to the sequence of the operations contained in the target execution plan so as to complete the query request.
Further, sequentially extracting any operation of an execution plan to be evaluated, determining a target operator according to the operation and a query operator information table, and determining a cost of a corresponding execution plan according to the target operator, including: determining an operation type according to the operation; determining a corresponding executable operator according to the operation type and the query operator information table; calculating the cost of any executable operator to execute the corresponding operation; determining an operator with the cost meeting a preset condition for executing the corresponding operation as a target operator; and taking the cost of the corresponding operation of the target operator as the operation cost.
Further, calculating a cost for any one of the executable operators to perform a corresponding operation includes: acquiring hardware parameters and operator information parameters of any executable operator; and determining the cost of each operator for executing corresponding operation by adopting an operator execution cost model according to the query data scale, the hardware parameters and the operator information parameters of the query request.
Further, the operator information parameters include: a first operator information parameter set, a second operator information parameter set; according to the query data size, hardware parameters and operator information parameters of the query request, an operator execution cost model is adopted to determine the cost of each operator for executing corresponding operation, and the method comprises the following steps: according to the following: f (x) =σ 1θTx + σ2θT, calculating an operator execution cost of any operator to execute the corresponding operator, wherein f (x) represents the operator execution cost, x represents the query data size, θ represents a hardware parameter, and the hardware parameter includes at least one of: host CPU dominant frequency, host memory bus throughput, heterogeneous acceleration device frequency, heterogeneous acceleration device core number, heterogeneous acceleration device memory space, bus throughput of a bus connecting the host and the heterogeneous acceleration device, access delay of the host and the heterogeneous acceleration device, sigma 1 represents a first operator information parameter set, the first operator information parameter set is a vector, and the form is: σ 1 = (σ1112,……,σ1n).
Σ 2 represents a second operator information parameter set, which is a vector in the form of: σ 2 = (σ2122,……,σ2n); wherein σ 11 is a first parameter of the first operator information parameter set, σ 12 is a second parameter of the first operator information parameter set, σ 21 is a first parameter of the second operator information parameter set, σ 22 is a second parameter of the second operator information parameter set, and n is a natural number.
Further, filtering the cost of the execution plan to determine a target execution plan includes: accumulating the cost of a target operator corresponding to the operation included in any execution plan to be evaluated; ordering the cost of executing the execution plan to be evaluated; and taking the execution plan to be evaluated, of which the cost of executing the query request meets the preset condition, as a target execution plan.
Further, obtaining the device operator information table, and generating a query operator information table according to the device operator information table, including:
Traversing all heterogeneous acceleration devices connected with a host, and acquiring a device operator information table of the corresponding heterogeneous acceleration device according to the connection relation between any heterogeneous acceleration device and the host, wherein the host is the device initiating the query request, and the connection relation at least comprises: the first connection relation, the second connection relation and the third connection relation; generating a query operator information table according to the device operator information table, wherein the device operator information table further comprises: any operator contained in the corresponding heterogeneous acceleration device, and a corresponding relation between any operator contained in the corresponding heterogeneous acceleration device and an executable operation of the operator.
Further, according to the connection relation between any heterogeneous acceleration device and the host, a device operator information table of the corresponding heterogeneous acceleration device is obtained, including: responding to the connection relation between the heterogeneous acceleration device and the host as a first connection relation, and reading a device operator information table of the corresponding heterogeneous acceleration device through a PCIe bus; responding to the connection relation between the heterogeneous acceleration device and the host as a second connection relation, and reading a device operator information table of the corresponding heterogeneous acceleration device through a second bus and a management network, wherein the second bus at least comprises a CXL bus; and in response to the connection relation between the heterogeneous acceleration device and the host being a third connection relation, reading a device operator information table of the corresponding heterogeneous acceleration device through a third bus, wherein the third bus at least comprises an InfiniBand bus.
Further, the second connection relationship includes: the host is connected with at least one heterogeneous acceleration device through a CXL bus, the at least one heterogeneous acceleration device is connected with a management network through a management network bus, and the management network is connected with the host; reading a device operator information table of the corresponding heterogeneous acceleration device through a second bus and a management network, wherein the device operator information table comprises: the management network queries heterogeneous acceleration device information of heterogeneous acceleration devices connected with the second bus in a preset period through a management network bus; and in response to the management network finding that the heterogeneous acceleration device exists on the second bus, acquiring a device operator information table of the heterogeneous acceleration device.
Further, the third connection relationship includes: the host is connected with at least one remote heterogeneous acceleration device through a third bus; reading a device operator information table of the corresponding heterogeneous acceleration device through a third bus, wherein the device operator information table comprises: and communicating with a remote host, and acquiring a device operator information table of any one of at least one heterogeneous acceleration device, wherein the remote host comprises the at least one heterogeneous acceleration device.
Further, generating a query operator information table according to the device operator information table, including: clustering operators according to operation types of the operations, and generating corresponding relations between the operations and the executable operators; and constructing a query operator information table according to the corresponding relation, wherein the query operator information table comprises equipment types, operator calculation cost, callback functions, equipment information and operator parameter information.
Further, sequentially calling corresponding target operators according to the sequence of the operations contained in the target execution plan, including: occupying a target operator corresponding to an operation contained in a target execution plan; and sequentially calling corresponding target operators according to the sequence of the operations in the target execution plan.
Further, the first operator information parameter set and the second operator information parameter set are obtained by: executing preset operation on any heterogeneous acceleration device on a plurality of different hosts to obtain training sample data; according to training sample data, a multiple linear regression method is adopted to determine a first operator information parameter set and a second operator information parameter set; recording the first operator information parameter set and the second operator information parameter set in an acceleration equipment information table of the heterogeneous acceleration equipment; traversing the type of the preset operation until the equipment operator information table of the heterogeneous acceleration equipment completes the recording of operator information parameters corresponding to all the operations.
Further, executing a preset operation on any heterogeneous acceleration device on a plurality of different hosts to obtain training sample data, including: acquiring equipment hardware parameters of heterogeneous acceleration equipment; sequentially obtaining host hardware parameters corresponding to a plurality of different hosts; and sequentially interconnecting the heterogeneous acceleration equipment with a plurality of different hosts, and calling and executing preset operation through the corresponding hosts to obtain test data of the preset operation as training sample data.
Further, after sequentially calling the corresponding target operators according to the sequence of the operations contained in the target execution plan to complete the query request, the method further comprises the following steps: releasing the invoked operator.
Further, releasing the invoked operator, comprising: adding the called operator into a list to be released; determining the use frequency of each operator in the list to be released; releasing the operator which is not used in the preset query times when the use frequency is smaller than the frequency threshold value and stopping the query.
Further, determining the use frequency of each operator in the to-be-released list includes:
According to the following:
Wherein f op represents the frequency of use of the operator, M is a preset value, and δ is an acceleration device index.
Further, after sequentially calling the corresponding target operators according to the sequence of the operations contained in the target execution plan to complete the query request, the method further comprises the following steps: executing the target execution plan to obtain a query result corresponding to the query request; responding to the query request with the query result.
Further, the device operator information table includes at least one of: heterogeneous acceleration device parameters, and operator parameters.
Further, the heterogeneous acceleration device parameters include at least one of: the type of the board card, the size of the parameter space, the number of supporting operators, the working frequency of the equipment and the size of the memory space of the equipment.
Further, the operator parameters include at least one of: the method comprises the steps of operator types, operator parameter space sizes, operator cost estimation models, the number of cores, a first operator information parameter set and a second operator information parameter set.
Further, obtaining hardware parameters for any executable operator includes at least one of: acquiring equipment hardware parameters of heterogeneous acceleration equipment where any executable operator is located; acquiring host hardware parameters of a host; and acquiring interconnection parameters between heterogeneous acceleration equipment where any executable operator is located and a host.
Further, the device hardware parameters include at least one of: heterogeneous acceleration device frequency, heterogeneous acceleration device number of cores, heterogeneous acceleration device memory space.
Further, the host hardware parameters include at least one of: host CPU master frequency, host memory bus throughput.
Further, the interconnection parameters include at least one of: bus throughput of the bus for connecting the host and the heterogeneous acceleration device, and access delay of the host and the heterogeneous acceleration device.
In a second aspect, an intelligent resource selecting device for heterogeneous computing is provided, including: the information generation module is used for acquiring the equipment operator information table and generating a query operator information table according to the equipment operator information table, wherein the equipment operator information table comprises operations executed by any operator; the query analysis module is used for acquiring a query request and determining at least one execution plan to be evaluated corresponding to the query request, wherein any one of the at least one execution plan to be evaluated is used for completing the query request; the operation determining module is used for determining an operation included in any execution plan to be evaluated; the cost determining module is used for sequentially extracting any operation of the execution plan to be evaluated, determining a target operator according to the operation and the query operator information table, and determining the cost of the corresponding execution plan according to the target operator; the plan screening module is used for screening the cost of the execution plan to determine a target execution plan; and the operator calling module is used for calling the corresponding target operators in sequence according to the sequence of the operations contained in the target execution plan so as to complete the query request.
In a third aspect, an intelligent heterogeneous computing-oriented resource selection system is provided, including a memory, a processor, and an intelligent heterogeneous computing-oriented resource selection program stored in the memory and capable of running on the processor, where the processor implements the intelligent heterogeneous computing-oriented resource selection method described in the first aspect when executing the intelligent heterogeneous computing-oriented resource selection program.
In a fourth aspect, a computer-readable storage medium is provided, on which a heterogeneous computing-oriented resource intelligent selection program is stored, where the heterogeneous computing-oriented resource intelligent selection program is executed by a processor to implement the heterogeneous computing-oriented resource intelligent selection method described in the first aspect.
The technical scheme provided by the embodiment of the application has the beneficial effects that: 1. by implementing the heterogeneous computation-oriented resource intelligent selection method, device and system disclosed by the embodiment of the application, the optimal heterogeneous acceleration equipment for executing the query request can be determined; 2. screening to obtain an optimal execution plan, and executing a database query request; 3. and the database query efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a heterogeneous computing-oriented resource intelligent selection method provided by an embodiment of the invention;
FIG. 2 is a schematic diagram of a heterogeneous acceleration device network according to an embodiment of the present invention;
FIG. 3 is a diagram of query operator information representing intent provided by an embodiment of the present invention;
FIG. 4 is a schematic diagram of an intelligent resource selection device for heterogeneous computing according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a resource intelligent selection system facing heterogeneous computing provided in an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some examples of the present invention, not all examples. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Unless defined otherwise, technical or scientific terms used in this disclosure should be given the ordinary meaning as understood by one of ordinary skill in the art to which this disclosure belongs. The terms "first," "second," and the like, as used in this disclosure, do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. Likewise, the terms "a," "an," or "the" and similar terms do not denote a limitation of quantity, but rather denote the presence of at least one. The numerals in the drawings of the specification merely denote distinction of respective functional components or modules, and do not denote logical relationships between the components or modules. The word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", etc. are used merely to indicate relative positional relationships, which may also be changed when the absolute position of the object to be described is changed.
Hereinafter, various embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Note that in the drawings, the same reference numerals are given to constituent parts having substantially the same or similar structures and functions, and repeated description thereof will be omitted.
Aiming at the contradiction that the failure rate value of the server component with higher precision is obtained while the reliability test cost is reduced, the application provides the following technical scheme: in some embodiments, as shown in fig. 1, a heterogeneous computing-oriented resource intelligent selection method includes:
s100: and acquiring the equipment operator information table, and generating a query operator information table according to the equipment operator information table. The device operator information table comprises operations executed by any operator. The device operator information table is stored in each heterogeneous acceleration device. Illustratively, table 1 shows elements and meanings in the device operator information table.
Heterogeneous acceleration device refers to: an apparatus for heterogeneous computing; each heterogeneous acceleration device includes at least one operator operable to accelerate operations parsed from the database query request through a purchasable calculation. Heterogeneous calculations refer to: computing systems composed of computing units using different types of instruction sets and architectures. Heterogeneous computing is a technique that allows the most appropriate hardware to do the most appropriate thing, and is a balance of performance, cost, and power consumption.
The heterogeneous acceleration device according to the present application comprises at least: local heterogeneous acceleration device, CXL (Compute Express Link) heterogeneous acceleration device, and remote heterogeneous acceleration device. The local heterogeneous acceleration device is a heterogeneous acceleration device configured by a host, and is connected through a first bus, wherein the first bus is preferably a PCIe bus (PERIPHERAL COMPONENT INTERCONNECT EXPRESS, high-speed serial computer expansion bus); the CXL heterogeneous acceleration device is a heterogeneous acceleration device connected through a second bus, and the second bus is preferably a CXL bus; the remote heterogeneous acceleration device is a heterogeneous acceleration device connected by a third bus, preferably an InfiniBand bus, typically disposed within the remote host. Fig. 2 illustrates the topological relation between the three heterogeneous acceleration devices and the host and the database. In fig. 2, a host is connected to a database, where the host includes a plurality of local heterogeneous acceleration devices, where the local heterogeneous acceleration devices are connected to the host through PCIe interfaces, and the host may obtain an acceleration device information table of the heterogeneous acceleration device by reading a first memory BAR space of the heterogeneous acceleration device, where the acceleration device information table of the heterogeneous acceleration device is stored in a continuous memory with an offset address of 0 in the first memory BAR. The host is connected with a plurality of CXL heterogeneous acceleration devices through the CXL bus, the host can realize the call of the CXL heterogeneous acceleration devices through the CXL bus, and a specific call method is needed to be implemented by combining with a management network, which will be described in detail below. The host is connected with the remote machine through an InfiniBand bus, the remote machine comprises a plurality of remote heterogeneous acceleration devices, and the host can realize the call of the remote heterogeneous acceleration devices through the InfiniBand bus by means of RDMA (Remote Direct Memory Access meaning remote direct address access) technology.
The Fabric Manager in FIG. 2 is used to manage CXL heterogeneous acceleration devices. The network address of the Fabric Manager is stored in a database configuration file, and the database configuration file also stores the network address of a remote host of the remote heterogeneous acceleration device. One or more Fabric Manager managers may be provided in the network. One or more remote hosts may also be provided in the network.
Table 1 device operator information table
When the host computer calls the CXL heterogeneous acceleration device through the CXL bus, the Fabric Manager periodically sends a query command through the management network to acquire the heterogeneous acceleration device information on the CXL bus. When the Fabric Manager recognizes that heterogeneous acceleration devices suitable for the database exist on the CXL bus, the Fabric Manager independently sends an information reading command to the CXL heterogeneous acceleration devices, and after the CXL heterogeneous acceleration devices receive the information reading command, the Fabric Manager replies relevant information in the acceleration device information table. The Fabric Manager maintains information on the CXL heterogeneous acceleration devices on the CXL bus. Typically, the Fabric Manager saves information of the CXL heterogeneous acceleration device in the form of a node adjacency table; in addition, the node adjacency list can also store the device operator information of the CXL heterogeneous acceleration device, the connection topology information of the CXL heterogeneous acceleration device, the occupation condition of the CXL heterogeneous acceleration device and the like. Preferably, the management network adopts one of an RS-232 bus, an RS-485 bus and an I2C bus.
The database computing node is provided with a device management process which is responsible for managing the local heterogeneous acceleration device, the CXL heterogeneous acceleration device and the remote heterogeneous acceleration device. The database compute node is a query cost node, typically the host that issues the query request, that processes the execution plan to be evaluated.
The content of the device operator information table includes at least one of: heterogeneous acceleration device information, operator execution cost models, and corresponding operator information parameter sets. Table 2 shows the contents of a device operator information table. The heterogeneous acceleration device parameters include at least one of: the type of the board card, the size of the parameter space, the number of supporting operators, the working frequency of the equipment and the size of the memory space of the equipment. The operator parameters include at least one of: the method comprises the steps of operator types, operator parameter space sizes, operator cost estimation models, the number of cores, a first operator information parameter set and a second operator information parameter set.
Table 2 device operator information table
Acquiring a device operator information table, and generating a query operator information table according to the device operator information table, wherein the method comprises the following steps: s110: traversing all heterogeneous acceleration devices connected with a host, and acquiring a device operator information table of the corresponding heterogeneous acceleration device according to the connection relation between any heterogeneous acceleration device and the host, wherein the host is the device initiating the query request, and the connection relation at least comprises: the first connection relation, the second connection relation and the third connection relation.
An operator array is stored in the query operator information table, as shown in fig. 3. Each member of the operator array holds an operator pointer information that performs the operation. The operator pointer information includes: the heterogeneous acceleration device type is used for marking a local heterogeneous acceleration device, a CXL heterogeneous acceleration device or a remote heterogeneous acceleration device; the operator execution cost is used for storing operator information parameters of the heterogeneous acceleration device for executing the corresponding operator and calculating an operator execution cost of the corresponding operator by adopting an operator execution cost model; a callback function for storing a function pointer of the database calling the operator; heterogeneous acceleration device information, specific information of the device where the operator is located, and the like. Schematically, two operators that can perform Scan operations are shown in fig. 3.
According to the connection relation between any heterogeneous acceleration device and a host, obtaining a device operator information table of the corresponding heterogeneous acceleration device, wherein the device operator information table comprises: s111: responding to the connection relation between the heterogeneous acceleration device and the host as a first connection relation, and reading a device operator information table of the corresponding heterogeneous acceleration device through a PCIe bus; the first connection relationship means: devices connected through the PCIe bus generally refer to hosts and local heterogeneous acceleration devices connected by the PCIe bus. The device management process reads the acceleration device information table of the local heterogeneous acceleration device through the PCIe bus.
S112: responding to the connection relation between the heterogeneous acceleration device and the host as a second connection relation, and reading a device operator information table of the corresponding heterogeneous acceleration device through a second bus and a management network, wherein the second bus at least comprises a CXL bus; the second connection relationship includes: the host computer is connected with at least one heterogeneous acceleration device through a CXL bus, the at least one heterogeneous acceleration device is connected with a management network through a management network bus, and the management network is connected with the host computer.
Reading a device operator information table of the corresponding heterogeneous acceleration device through a second bus and a management network, wherein the device operator information table comprises: s1121: the management network queries heterogeneous acceleration device information of heterogeneous acceleration devices connected with the second bus in a preset period through a management network bus; s1122: and in response to the management network finding that the heterogeneous acceleration device exists on the second bus, acquiring a device operator information table of the heterogeneous acceleration device.
And the device management process reads the network address of the Fabric Manager stored in the configuration file, communicates with the Fabric Manager, and acquires an acceleration device information table of CXL heterogeneous acceleration devices on the same CXL bus with the database computing node.
S113: and in response to the connection relation between the heterogeneous acceleration device and the host being a third connection relation, reading a device operator information table of the corresponding heterogeneous acceleration device through a third bus, wherein the third bus at least comprises an InfiniBand bus.
The third connection relationship includes: the host is connected with at least one remote heterogeneous acceleration device through a third bus.
Reading a device operator information table of the corresponding heterogeneous acceleration device through a third bus, wherein the device operator information table comprises: s1131: and communicating with a remote host, and acquiring a device operator information table of any one of at least one heterogeneous acceleration device, wherein the remote host comprises the at least one heterogeneous acceleration device.
And the equipment manager process reads the remote host address stored in the configuration file, communicates with the remote host and acquires an acceleration equipment information table of the remote heterogeneous acceleration equipment in the remote host.
Preferably, the device operator information table of any one of the at least one heterogeneous acceleration device is obtained through RDMA.
The device management process can further indicate whether the corresponding device is occupied by a database computing node.
S120: and generating a query operator information table according to the device operator information table. Wherein the device operator information table further comprises: any operator contained in the corresponding heterogeneous acceleration device, and a corresponding relation between any operator contained in the corresponding heterogeneous acceleration device and an executable operation of the operator.
Generating a query operator information table according to the device operator information table, including: s121: clustering operators according to operation types of the operations, and generating corresponding relations between the operations and the executable operators; s122: and constructing a query operator information table according to the corresponding relation, wherein the query operator information table comprises equipment types, operator calculation cost, callback functions, equipment information and operator parameter information.
S200: and acquiring the query request, and determining at least one execution plan to be evaluated corresponding to the query request, wherein any one of the at least one execution plan to be evaluated is used for completing the query request.
The query request refers to: and the database receives a request for inquiring the data in the database, which is sent by an inquiring host node on the network. Querying a host refers to: a host issuing a query request. After the query request is acquired, the query request is analyzed by a query optimizer to obtain an execution plan to be evaluated. The query optimizer is a core component in the database system. As the performance of database query and the association of heterogeneous acceleration equipment are higher and higher, a query optimizer of the heterogeneous acceleration equipment can flexibly schedule and optimize various hardware resources, and the execution efficiency of the database is improved. The execution plan under evaluation consists of a series of operations in series. In an embodiment of the present application, the operations include: independent operation and combined operation. Illustratively, table 3 lists the types of partially independent operations and combined operations. Wherein, "Scan", "Join", etc. are independent operations; "Scan+join", "Scan+join+agg", etc. are combination operations. Note that, in table 3, the numbers of operations do not have a correspondence with the types of operations, and are only used to mark the order of different operations in the table. The present application is also not limited to the order in which the various types of operations are arranged.
Different types of operations may be heterogeneous accelerated by respective operators.
TABLE 3 independent and Combined operation
S300: determining an operation included in any execution plan to be evaluated; s400: sequentially extracting any operation of an execution plan to be evaluated, determining a target operator according to the operation and a query operator information table, and determining the cost of the corresponding execution plan according to the target operator, wherein the method specifically comprises the following steps: s410: determining an operation type according to the operation; s420: determining a corresponding executable operator according to the operation type and the query operator information table; s430: calculating the cost of any executable operator to execute the corresponding operation specifically comprises the following steps: s431: acquiring hardware parameters and operator information parameters of any executable operator; wherein the acquiring of the hardware parameters of any executable operator comprises at least one of the following: s4311: acquiring equipment hardware parameters of heterogeneous acceleration equipment where any executable operator is located; s4312: acquiring host hardware parameters of a host; s4313: and acquiring interconnection parameters between heterogeneous acceleration equipment where any executable operator is located and a host.
The device hardware parameters include at least one of: heterogeneous acceleration device frequency, heterogeneous acceleration device number of cores, heterogeneous acceleration device memory space.
The host hardware parameters include at least one of: host CPU master frequency, host memory bus throughput.
The interconnection parameters include at least one of: bus throughput of the bus for connecting the host and the heterogeneous acceleration device, and access delay of the host and the heterogeneous acceleration device.
S432: according to the query data size, hardware parameters and operator information parameters of the query request, adopting an operator execution cost model to determine the cost of each operator to execute corresponding operation, wherein the method comprises the following steps: f (x) =σ 1θTx + σ2θT, calculating the operator execution cost of any operator to execute the corresponding operator.
Wherein f (x) represents operator execution cost, x represents query data size, θ represents hardware parameters including at least one of: the method comprises the steps of host CPU main frequency, host memory bus throughput rate, heterogeneous acceleration device frequency, heterogeneous acceleration device core number, heterogeneous acceleration device memory space, bus throughput rate of a bus connecting a host and the heterogeneous acceleration device, and access delay of the host and the heterogeneous acceleration device. The operator information parameters include: a first operator information parameter set, a second operator information parameter set; σ 1 represents a first operator information parameter set, which is a vector in the form of: σ 1 = (σ1112,……,σ1n).
Σ 2 represents a second operator information parameter set, which is a vector in the form of: σ 2 = (σ2122,……,σ2n), wherein σ 11 is a first parameter of a first operator information parameter set, σ 12 is a second parameter of the first operator information parameter set, σ 21 is a first parameter of a second operator information parameter set, σ 22 is a second parameter of the second operator information parameter set, and n is a natural number.
The hardware parameter θ may be expressed as a vector of the form: θ= (θ 1234567, 1).
Schematically, θ 1 represents a host CPU frequency, θ 2 represents a host memory bus throughput rate, θ 3 represents a heterogeneous acceleration device frequency, θ 4 represents a heterogeneous acceleration device core number, θ 5 represents a heterogeneous acceleration device memory space, θ 6 represents a bus throughput rate of a bus connecting the host and the heterogeneous acceleration device, and θ 7 represents an access delay of the host and the heterogeneous acceleration device. The application does not limit the correspondence between the content of the hardware parameter and the representative symbol. Wherein θ 1、θ2 is a host hardware parameter; θ 3、θ4、θ5 is a device hardware parameter; θ 6、θ7 is the interconnection parameter.
The application takes n=8 as an example to describe the technical means related to the operator execution cost model. When n=8, the first operator information parameter set is denoted :σ1 = (σ1112131415161718); and the second operator information parameter set is denoted :σ1 = (σ1112131415161718); σ2= (σ2122232425262728).
The operator information parameters are stored in a device operator information table of heterogeneous acceleration devices where the operators are located.
And evaluating the execution cost of the heterogeneous acceleration device for any operator from three dimensions of a host hardware parameter, a device hardware parameter and an interconnection parameter, and fully considering the performance phenotype of the heterogeneous acceleration device in a host running environment. The problem that the calculation force of heterogeneous acceleration equipment is simply converted into the calculation force of a CPU, so that a large error occurs in the evaluation of the execution cost of an operator is avoided.
The hardware parameters are obtained by the device management process according to the connection mode of the operator and the host computer through the corresponding bus by the management network through the mode described above. It should be noted that, the device management process and the remote host perform RDMA communication through the InfiniBand bus, obtain parameters such as the bus throughput rate and RDMA network card parameter information of the remote heterogeneous acceleration device, and then utilize the local RDMA network card parameter information, the remote host RDMA network card parameter information and the heterogeneous acceleration device bus throughput rate, so as to calculate and obtain the bus throughput rate of the remote heterogeneous acceleration device and the host and the access delay of the heterogeneous acceleration device. The application provides a method for calculating bus throughput rate, which comprises the following steps: taking the minimum value of the RDMA network card throughput rate, the remote host RDMA throughput rate and the heterogeneous acceleration device bus throughput rate as the bus throughput rate. The application provides a method for calculating access delay of heterogeneous acceleration equipment, which comprises the following steps: the access latency of the heterogeneous acceleration device employs a communication latency of the inquiring host node with the remote host RDMA network. The application does not limit the bus throughput rate and the method for calculating the access delay of the heterogeneous acceleration device.
The first operator information parameter set and the second operator information parameter set are obtained by the following modes: s010: executing preset operations on any heterogeneous acceleration device on a plurality of different hosts to obtain training sample data, wherein the method comprises the following steps:
S011: acquiring equipment hardware parameters of heterogeneous acceleration equipment; s012: sequentially obtaining host hardware parameters corresponding to a plurality of different hosts; s013: and sequentially interconnecting the heterogeneous acceleration equipment with a plurality of different hosts, and calling and executing preset operation through the corresponding hosts to obtain test data of the preset operation as training sample data.
S020: according to training sample data, a multiple linear regression method is adopted to determine a first operator information parameter set and a second operator information parameter set; s030: recording the first operator information parameter set and the second operator information parameter set in an acceleration equipment information table of the heterogeneous acceleration equipment; s040: traversing the type of the preset operation until the equipment operator information table of the heterogeneous acceleration equipment completes the recording of operator information parameters corresponding to all the operations.
For any heterogeneous acceleration device connected with the host, a hardware parameter θ= (θ 1234567, 1) is acquired. And calling corresponding heterogeneous acceleration equipment to process data by the host computer by adopting data with known size to obtain processing time. Illustratively, 14 sets of test data, 1M, 10M, 100M, 500M, 1G, 5G, 10G, 30G, 70G, 100G, 150G, 200G, 250G, 300G, etc., are used to test for corresponding processing times. The present invention is not limited to the number of test data sets. Preferably, the number of test data sets is a multiple of the sum of the elements of the first operator information parameter set and the second operator information parameter set.
And sequentially executing the contents on different hosts to obtain data samples corresponding to the number of the hosts.
According to the training sample data, a multiple linear regression method is adopted to determine a first operator information parameter set σ1 = (σ1112131415161718), and a second operator information parameter set σ2 = (σ2122232425262728).
S440: determining an operator with the cost meeting a preset condition for executing the corresponding operation as a target operator; s450: and taking the cost of the corresponding operation of the target operator as the operation cost.
S500: screening the cost of the execution plan to determine a target execution plan, specifically comprising: s510: accumulating the cost of a target operator corresponding to the operation included in any execution plan to be evaluated; s520: ordering the cost of executing the execution plan to be evaluated; s530: and taking the execution plan to be evaluated, of which the cost of executing the query request meets the preset condition, as a target execution plan.
Preferably, the preset condition is at a minimum cost.
S600: sequentially calling corresponding target operators according to the sequence of operations contained in the target execution plan to complete the query request, wherein the method comprises the following steps: s610: occupying a target operator corresponding to an operation contained in a target execution plan; s620: and sequentially calling corresponding target operators according to the sequence of the operations in the target execution plan.
After receiving the occupation instruction, the device management process checks the resource occupation condition of the host. If the resource is a local heterogeneous acceleration device and is not occupied by the host, sending an instruction to the local heterogeneous acceleration device through the PCIe bus to apply for occupying the local heterogeneous acceleration device.
If the resource is CXL heterogeneous acceleration equipment or remote heterogeneous acceleration equipment and is not occupied by the host, an instruction is sent to a Fabric Manager or remote host to apply for occupying the corresponding heterogeneous acceleration equipment.
And if the resources are occupied, sequentially selecting suboptimal structure acceleration equipment of the corresponding operator from the query operator information table to occupy until the operator occupies the corresponding heterogeneous acceleration equipment.
S700: releasing the invoked operator, comprising: s710: adding the called operator into a list to be released; s720: determining the use frequency of each operator in the to-be-released list, including:
According to the following:
Wherein f op represents the frequency of use of the operator, M is a preset value, and δ is an acceleration device index.
For the acceleration device index δ, δ=1 when the heterogeneous acceleration device is a local heterogeneous acceleration device; when the isomerisation acceleration device is a CXL isomerisation acceleration device, δ=0.8; when the heterogeneous acceleration device is a remote heterogeneous acceleration device, δ=0.5.
Through the process, heterogeneous acceleration equipment which is not commonly used for the query node can be released, so that the transition occupation of computing resources is avoided, and other hosts on the network can also obtain heterogeneous computing resources in time.
S730: releasing the operator which is not used in the preset query times when the use frequency is smaller than the frequency threshold value and stopping the query.
S800: executing the target execution plan to obtain a query result corresponding to the query request; s900: responding to the query request with the query result.
It should be understood that, although the steps in the flowchart of fig. 1 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of other steps or sub-steps of other steps.
In other embodiments, as shown in fig. 4, an intelligent resource selecting device for heterogeneous computing includes: the information generation module is used for acquiring an equipment operator information table and generating a query operator information table according to the equipment operator information table, wherein the equipment operator information table comprises operations executed by any operator; the query analysis module is used for acquiring a query request and determining at least one execution plan to be evaluated corresponding to the query request, wherein any one of the at least one execution plan to be evaluated is used for completing the query request; an operation determining module, configured to determine an operation included in the any execution plan to be evaluated; the cost determining module is used for sequentially extracting the operation of any execution plan to be evaluated, determining a target operator according to the operation and a query operator information table, and determining the cost of the corresponding execution plan according to the target operator; the plan screening module is used for screening the cost of the execution plan to determine a target execution plan; and the operator calling module is used for calling corresponding target operators in sequence according to the sequence of the operations contained in the target execution plan so as to complete the query request.
The specific limitation of the heterogeneous computing-oriented resource intelligent selection device described above can be referred to the limitation of the heterogeneous computing-oriented resource intelligent selection method described above, and is not repeated herein. All or part of each module in the heterogeneous computing-oriented resource intelligent selection device can be realized by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In other embodiments, as shown in fig. 5, an intelligent heterogeneous computing-oriented resource selection system includes a memory, a processor, and an intelligent heterogeneous computing-oriented resource selection program stored in the memory and capable of running on the processor, where when the processor executes the intelligent heterogeneous computing-oriented resource selection program, the intelligent heterogeneous computing-oriented resource selection method described in the first aspect is implemented, and the intelligent heterogeneous computing-oriented resource selection method includes: s100: and acquiring the equipment operator information table, and generating a query operator information table according to the equipment operator information table. The device operator information table comprises operations executed by any operator. The device operator information table includes at least one of: heterogeneous acceleration device parameters, and operator parameters. The heterogeneous acceleration device parameters include at least one of: the type of the board card, the size of the parameter space, the number of supporting operators, the working frequency of the equipment and the size of the memory space of the equipment. The operator parameters include at least one of: the method comprises the steps of operator types, operator parameter space sizes, operator cost estimation models, the number of cores, a first operator information parameter set and a second operator information parameter set.
Acquiring a device operator information table, and generating a query operator information table according to the device operator information table, wherein the method comprises the following steps: s110: traversing all heterogeneous acceleration devices connected with a host, and acquiring a device operator information table of the corresponding heterogeneous acceleration device according to the connection relation between any heterogeneous acceleration device and the host, wherein the host is the device initiating the query request, and the connection relation at least comprises: the first connection relation, the second connection relation and the third connection relation.
According to the connection relation between any heterogeneous acceleration device and a host, obtaining a device operator information table of the corresponding heterogeneous acceleration device, wherein the device operator information table comprises: s111: responding to the connection relation between the heterogeneous acceleration device and the host as a first connection relation, and reading a device operator information table of the corresponding heterogeneous acceleration device through a PCIe bus; s112: responding to the connection relation between the heterogeneous acceleration device and the host as a second connection relation, and reading a device operator information table of the corresponding heterogeneous acceleration device through a second bus and a management network, wherein the second bus at least comprises a CXL bus; the second connection relationship includes: the host computer is connected with at least one heterogeneous acceleration device through a CXL bus, the at least one heterogeneous acceleration device is connected with a management network through a management network bus, and the management network is connected with the host computer.
Reading a device operator information table of the corresponding heterogeneous acceleration device through a second bus and a management network, wherein the device operator information table comprises: s1121: the management network queries heterogeneous acceleration device information of heterogeneous acceleration devices connected with the second bus in a preset period through a management network bus; s1122: and in response to the management network finding that the heterogeneous acceleration device exists on the second bus, acquiring a device operator information table of the heterogeneous acceleration device.
S113: and in response to the connection relation between the heterogeneous acceleration device and the host being a third connection relation, reading a device operator information table of the corresponding heterogeneous acceleration device through a third bus, wherein the third bus at least comprises an InfiniBand bus.
The third connection relationship includes: the host is connected with at least one remote heterogeneous acceleration device through a third bus.
Reading a device operator information table of the corresponding heterogeneous acceleration device through a third bus, wherein the device operator information table comprises: s1131: and communicating with a remote host, and acquiring a device operator information table of any one of at least one heterogeneous acceleration device, wherein the remote host comprises the at least one heterogeneous acceleration device.
S120: and generating a query operator information table according to the device operator information table. Wherein the device operator information table further comprises: any operator contained in the corresponding heterogeneous acceleration device, and a corresponding relation between any operator contained in the corresponding heterogeneous acceleration device and an executable operation of the operator.
Generating a query operator information table according to the device operator information table, including: s121: clustering operators according to operation types of the operations, and generating corresponding relations between the operations and the executable operators; s122: and constructing a query operator information table according to the corresponding relation, wherein the query operator information table comprises equipment types, operator calculation cost, callback functions, equipment information and operator parameter information.
S200: and acquiring the query request, and determining at least one execution plan to be evaluated corresponding to the query request, wherein any one of the at least one execution plan to be evaluated is used for completing the query request.
S300: an operation included in any execution plan to be evaluated is determined.
S400: sequentially extracting any operation of an execution plan to be evaluated, determining a target operator according to the operation and a query operator information table, and determining the cost of the corresponding execution plan according to the target operator, wherein the method specifically comprises the following steps: s410: determining an operation type according to the operation; s420: determining a corresponding executable operator according to the operation type and the query operator information table; s430: calculating the cost of any executable operator to execute the corresponding operation specifically comprises the following steps: s431: acquiring hardware parameters and operator information parameters of any executable operator; wherein the acquiring of the hardware parameters of any executable operator comprises at least one of the following: s4311: acquiring equipment hardware parameters of heterogeneous acceleration equipment where any executable operator is located;
S4312: acquiring host hardware parameters of a host; s4313: and acquiring interconnection parameters between heterogeneous acceleration equipment where any executable operator is located and a host.
The device hardware parameters include at least one of: heterogeneous acceleration device frequency, heterogeneous acceleration device number of cores, heterogeneous acceleration device memory space.
The host hardware parameters include at least one of: host CPU master frequency, host memory bus throughput.
The interconnection parameters include at least one of: bus throughput of the bus for connecting the host and the heterogeneous acceleration device, and access delay of the host and the heterogeneous acceleration device.
S432: according to the query data size, hardware parameters and operator information parameters of the query request, adopting an operator execution cost model to determine the cost of each operator to execute corresponding operation, wherein the method comprises the following steps: f (x) =σ 1θTx + σ2θT, calculating the operator execution cost of any operator to execute the corresponding operator.
Wherein f (x) represents operator execution cost, x represents query data size, θ represents hardware parameters including at least one of: the method comprises the steps of host CPU main frequency, host memory bus throughput rate, heterogeneous acceleration device frequency, heterogeneous acceleration device core number, heterogeneous acceleration device memory space, bus throughput rate of a bus connecting a host and the heterogeneous acceleration device, and access delay of the host and the heterogeneous acceleration device. The operator information parameters include: a first operator information parameter set, a second operator information parameter set; σ 1 represents a first operator information parameter set, which is a vector in the form of: σ 1 = (σ1112,……,σ1n).
Σ 2 represents a second operator information parameter set, which is a vector in the form of: σ 2 = (σ2122,……,σ2n), wherein σ 11 is a first parameter of a first operator information parameter set, σ 12 is a second parameter of the first operator information parameter set, σ 21 is a first parameter of a second operator information parameter set, σ 22 is a second parameter of the second operator information parameter set, and n is a natural number.
The first operator information parameter set and the second operator information parameter set are obtained by the following modes: s010: executing preset operations on any heterogeneous acceleration device on a plurality of different hosts to obtain training sample data, wherein the method comprises the following steps:
S011: acquiring equipment hardware parameters of heterogeneous acceleration equipment; s012: sequentially obtaining host hardware parameters corresponding to a plurality of different hosts; s013: and sequentially interconnecting the heterogeneous acceleration equipment with a plurality of different hosts, and calling and executing preset operation through the corresponding hosts to obtain test data of the preset operation as training sample data.
S020: according to training sample data, a multiple linear regression method is adopted to determine a first operator information parameter set and a second operator information parameter set; s030: recording the first operator information parameter set and the second operator information parameter set in an acceleration equipment information table of the heterogeneous acceleration equipment; s040: traversing the type of the preset operation until the equipment operator information table of the heterogeneous acceleration equipment completes the recording of operator information parameters corresponding to all the operations.
S440: determining an operator with the cost meeting a preset condition for executing the corresponding operation as a target operator; s450: and taking the cost of the corresponding operation of the target operator as the operation cost.
S500: screening the cost of the execution plan to determine a target execution plan, specifically comprising: s510: accumulating the cost of a target operator corresponding to the operation included in any execution plan to be evaluated; s520: ordering the cost of executing the execution plan to be evaluated; s530: and taking the execution plan to be evaluated, of which the cost of executing the query request meets the preset condition, as a target execution plan.
S600: sequentially calling corresponding target operators according to the sequence of operations contained in the target execution plan to complete the query request, wherein the method comprises the following steps: s610: occupying a target operator corresponding to an operation contained in a target execution plan; s620: and sequentially calling corresponding target operators according to the sequence of the operations in the target execution plan.
S700: releasing the invoked operator, comprising: s710: adding the called operator into a list to be released; s720: determining the use frequency of each operator in the to-be-released list, including:
According to the following:
Wherein f op represents the frequency of use of the operator, M is a preset value, and δ is an acceleration device index.
S730: releasing the operator which is not used in the preset query times when the use frequency is smaller than the frequency threshold value and stopping the query.
S800: executing the target execution plan to obtain a query result corresponding to the query request; s900: responding to the query request with the query result.
In other embodiments, a computer readable storage medium has stored thereon a heterogeneous computing-oriented resource intelligent selection program, where the heterogeneous computing-oriented resource intelligent selection program, when executed by a processor, implements the heterogeneous computing-oriented resource intelligent selection method according to the first aspect, and specifically includes: s100: and acquiring the equipment operator information table, and generating a query operator information table according to the equipment operator information table. The device operator information table comprises operations executed by any operator. The device operator information table includes at least one of: heterogeneous acceleration device parameters, and operator parameters. The heterogeneous acceleration device parameters include at least one of: the type of the board card, the size of the parameter space, the number of supporting operators, the working frequency of the equipment and the size of the memory space of the equipment. The operator parameters include at least one of: the method comprises the steps of operator types, operator parameter space sizes, operator cost estimation models, the number of cores, a first operator information parameter set and a second operator information parameter set.
Acquiring a device operator information table, and generating a query operator information table according to the device operator information table, wherein the method comprises the following steps: s110: traversing all heterogeneous acceleration devices connected with a host, and acquiring a device operator information table of the corresponding heterogeneous acceleration device according to the connection relation between any heterogeneous acceleration device and the host, wherein the host is the device initiating the query request, and the connection relation at least comprises: the first connection relation, the second connection relation and the third connection relation.
According to the connection relation between any heterogeneous acceleration device and a host, obtaining a device operator information table of the corresponding heterogeneous acceleration device, wherein the device operator information table comprises: s111: responding to the connection relation between the heterogeneous acceleration device and the host as a first connection relation, and reading a device operator information table of the corresponding heterogeneous acceleration device through a PCIe bus; s112: responding to the connection relation between the heterogeneous acceleration device and the host as a second connection relation, and reading a device operator information table of the corresponding heterogeneous acceleration device through a second bus and a management network, wherein the second bus at least comprises a CXL bus; the second connection relationship includes: the host computer is connected with at least one heterogeneous acceleration device through a CXL bus, the at least one heterogeneous acceleration device is connected with a management network through a management network bus, and the management network is connected with the host computer.
Reading a device operator information table of the corresponding heterogeneous acceleration device through a second bus and a management network, wherein the device operator information table comprises: s1121: the management network queries heterogeneous acceleration device information of heterogeneous acceleration devices connected with the second bus in a preset period through a management network bus; s1122: and in response to the management network finding that the heterogeneous acceleration device exists on the second bus, acquiring a device operator information table of the heterogeneous acceleration device.
S113: and in response to the connection relation between the heterogeneous acceleration device and the host being a third connection relation, reading a device operator information table of the corresponding heterogeneous acceleration device through a third bus, wherein the third bus at least comprises an InfiniBand bus.
The third connection relationship includes: the host is connected with at least one remote heterogeneous acceleration device through a third bus.
Reading a device operator information table of the corresponding heterogeneous acceleration device through a third bus, wherein the device operator information table comprises: s1131: and communicating with a remote host, and acquiring a device operator information table of any one of at least one heterogeneous acceleration device, wherein the remote host comprises the at least one heterogeneous acceleration device.
S120: and generating a query operator information table according to the device operator information table. Wherein the device operator information table further comprises: any operator contained in the corresponding heterogeneous acceleration device, and a corresponding relation between any operator contained in the corresponding heterogeneous acceleration device and an executable operation of the operator.
Generating a query operator information table according to the device operator information table, including: s121: clustering operators according to operation types of the operations, and generating corresponding relations between the operations and the executable operators; s122: and constructing a query operator information table according to the corresponding relation, wherein the query operator information table comprises equipment types, operator calculation cost, callback functions, equipment information and operator parameter information.
S200: acquiring a query request, and determining at least one execution plan to be evaluated corresponding to the query request, wherein any one of the at least one execution plan to be evaluated is used for completing the query request; s300: determining an operation included in any execution plan to be evaluated; s400: sequentially extracting any operation of an execution plan to be evaluated, determining a target operator according to the operation and a query operator information table, and determining the cost of the corresponding execution plan according to the target operator, wherein the method specifically comprises the following steps: s410: the operation type is determined according to the operation.
S420: and determining a corresponding executable operator according to the operation type and the query operator information table.
S430: calculating the cost of any executable operator to execute the corresponding operation specifically comprises the following steps: s431: acquiring hardware parameters and operator information parameters of any executable operator; wherein the acquiring of the hardware parameters of any executable operator comprises at least one of the following: s4311: acquiring equipment hardware parameters of heterogeneous acceleration equipment where any executable operator is located; s4312: acquiring host hardware parameters of a host; s4313: and acquiring interconnection parameters between heterogeneous acceleration equipment where any executable operator is located and a host.
The device hardware parameters include at least one of: heterogeneous acceleration device frequency, heterogeneous acceleration device number of cores, heterogeneous acceleration device memory space.
The host hardware parameters include at least one of: host CPU master frequency, host memory bus throughput.
The interconnection parameters include at least one of: bus throughput of the bus for connecting the host and the heterogeneous acceleration device, and access delay of the host and the heterogeneous acceleration device.
S432: according to the query data size, hardware parameters and operator information parameters of the query request, adopting an operator execution cost model to determine the cost of each operator to execute corresponding operation, wherein the method comprises the following steps: f (x) =σ 1θTx + σ2θT, calculating the operator execution cost of any operator to execute the corresponding operator.
Wherein f (x) represents operator execution cost, x represents query data size, θ represents hardware parameters including at least one of: the method comprises the steps of host CPU main frequency, host memory bus throughput rate, heterogeneous acceleration device frequency, heterogeneous acceleration device core number, heterogeneous acceleration device memory space, bus throughput rate of a bus connecting a host and the heterogeneous acceleration device, and access delay of the host and the heterogeneous acceleration device. The operator information parameters include: a first operator information parameter set, a second operator information parameter set; σ 1 represents a first operator information parameter set, which is a vector in the form of: σ 1 = (σ1112,……,σ1n).
Σ 2 represents a second operator information parameter set, which is a vector in the form of: σ 2 = (σ2122,……,σ2n), wherein σ 11 is a first parameter of a first operator information parameter set, σ 12 is a second parameter of the first operator information parameter set, σ 21 is a first parameter of a second operator information parameter set, σ 22 is a second parameter of the second operator information parameter set, and n is a natural number.
The first operator information parameter set and the second operator information parameter set are obtained by the following modes: s010: executing preset operations on any heterogeneous acceleration device on a plurality of different hosts to obtain training sample data, wherein the method comprises the following steps: s011: acquiring equipment hardware parameters of heterogeneous acceleration equipment; s012: sequentially obtaining host hardware parameters corresponding to a plurality of different hosts; s013: and sequentially interconnecting the heterogeneous acceleration equipment with a plurality of different hosts, and calling and executing preset operation through the corresponding hosts to obtain test data of the preset operation as training sample data.
S020: and determining a first operator information parameter set and a second operator information parameter set by adopting a multiple linear regression method according to the training sample data.
S030: and recording the first operator information parameter set and the second operator information parameter set in an acceleration equipment information table of the heterogeneous acceleration equipment.
S040: traversing the type of the preset operation until the equipment operator information table of the heterogeneous acceleration equipment completes the recording of operator information parameters corresponding to all the operations.
S440: and determining an operator with the cost meeting a preset condition for executing the corresponding operation as a target operator.
S450: and taking the cost of the corresponding operation of the target operator as the operation cost.
S500: screening the cost of the execution plan to determine a target execution plan, specifically comprising: s510: accumulating the cost of a target operator corresponding to the operation included in any execution plan to be evaluated; s520: ordering the cost of executing the execution plan to be evaluated; s530: and taking the execution plan to be evaluated, of which the cost of executing the query request meets the preset condition, as a target execution plan.
S600: sequentially calling corresponding target operators according to the sequence of operations contained in the target execution plan to complete the query request, wherein the method comprises the following steps: s610: occupying a target operator corresponding to an operation contained in a target execution plan; s620: and sequentially calling corresponding target operators according to the sequence of the operations in the target execution plan.
S700: releasing the invoked operator, comprising: s710: and adding the called operator into the to-be-released list.
S720: determining the use frequency of each operator in the to-be-released list, including:
According to the following:
Wherein f op represents the frequency of use of the operator, M is a preset value, and δ is an acceleration device index.
S730: releasing the operator which is not used in the preset query times when the use frequency is smaller than the frequency threshold value and stopping the query.
S800: executing the target execution plan to obtain a query result corresponding to the query request; s900: responding to the query request with the query result.
By implementing the heterogeneous computing-oriented resource intelligent selection method, device and system disclosed by the embodiment of the application. An optimal heterogeneous acceleration device capable of determining to execute the query request; screening to obtain an optimal execution plan, and executing a database query request; and the database query efficiency is improved.
Any combination of the above optional solutions may be adopted to form an optional embodiment of the present invention, which is not described herein.
Example 1
A heterogeneous computing-oriented resource intelligent selection method, as shown in figure 1, comprises the following steps: s100: acquiring a device operator information table, and generating a query operator information table according to the device operator information table, wherein the device operator information table comprises operations executed by any operator; s200: acquiring a query request, and determining at least one execution plan to be evaluated corresponding to the query request, wherein any one of the at least one execution plan to be evaluated is used for completing the query request; s300: determining an operation included in any execution plan to be evaluated; s400: sequentially extracting any operation of an execution plan to be evaluated, determining a target operator according to the operation and a query operator information table, and determining the cost of the corresponding execution plan according to the target operator; s500: screening the cost of the execution plan to determine a target execution plan; s600: and sequentially calling corresponding target operators according to the sequence of the operations contained in the target execution plan so as to complete the query request.
Example two
On the basis of the first embodiment, a heterogeneous computing-oriented resource intelligent selection method includes: s100: and acquiring the equipment operator information table, and generating a query operator information table according to the equipment operator information table. The device operator information table comprises operations executed by any operator. The device operator information table includes at least one of: heterogeneous acceleration device parameters, and operator parameters. The heterogeneous acceleration device parameters include at least one of: the type of the board card, the size of the parameter space, the number of supporting operators, the working frequency of the equipment and the size of the memory space of the equipment. The operator parameters include at least one of: the method comprises the steps of operator types, operator parameter space sizes, operator cost estimation models, the number of cores, a first operator information parameter set and a second operator information parameter set.
Acquiring a device operator information table, and generating a query operator information table according to the device operator information table, wherein the method comprises the following steps: s110: traversing all heterogeneous acceleration devices connected with a host, and acquiring a device operator information table of the corresponding heterogeneous acceleration device according to the connection relation between any heterogeneous acceleration device and the host, wherein the host is the device initiating the query request, and the connection relation at least comprises: the first connection relation, the second connection relation and the third connection relation.
According to the connection relation between any heterogeneous acceleration device and a host, obtaining a device operator information table of the corresponding heterogeneous acceleration device, wherein the device operator information table comprises: s111: responding to the connection relation between the heterogeneous acceleration device and the host as a first connection relation, and reading a device operator information table of the corresponding heterogeneous acceleration device through a PCIe bus; s112: responding to the connection relation between the heterogeneous acceleration device and the host as a second connection relation, and reading a device operator information table of the corresponding heterogeneous acceleration device through a second bus and a management network, wherein the second bus at least comprises a CXL bus; the second connection relationship includes: the host computer is connected with at least one heterogeneous acceleration device through a CXL bus, the at least one heterogeneous acceleration device is connected with a management network through a management network bus, and the management network is connected with the host computer.
Reading a device operator information table of the corresponding heterogeneous acceleration device through a second bus and a management network, wherein the device operator information table comprises: s1121: the management network queries heterogeneous acceleration device information of heterogeneous acceleration devices connected with the second bus in a preset period through a management network bus; s1122: and in response to the management network finding that the heterogeneous acceleration device exists on the second bus, acquiring a device operator information table of the heterogeneous acceleration device.
S113: and in response to the connection relation between the heterogeneous acceleration device and the host being a third connection relation, reading a device operator information table of the corresponding heterogeneous acceleration device through a third bus, wherein the third bus at least comprises an InfiniBand bus.
The third connection relationship includes: the host is connected with at least one remote heterogeneous acceleration device through a third bus.
Reading a device operator information table of the corresponding heterogeneous acceleration device through a third bus, wherein the device operator information table comprises: s1131: and communicating with a remote host, and acquiring a device operator information table of any one of at least one heterogeneous acceleration device, wherein the remote host comprises the at least one heterogeneous acceleration device.
S120: and generating a query operator information table according to the device operator information table. Wherein the device operator information table further comprises: any operator contained in the corresponding heterogeneous acceleration device, and a corresponding relation between any operator contained in the corresponding heterogeneous acceleration device and an executable operation of the operator.
Generating a query operator information table according to the device operator information table, including: s121: clustering operators according to operation types of the operations, and generating corresponding relations between the operations and the executable operators; s122: and constructing a query operator information table according to the corresponding relation, wherein the query operator information table comprises equipment types, operator calculation cost, callback functions, equipment information and operator parameter information.
S200: and acquiring the query request, and determining at least one execution plan to be evaluated corresponding to the query request, wherein any one of the at least one execution plan to be evaluated is used for completing the query request.
S300: an operation included in any execution plan to be evaluated is determined.
S400: sequentially extracting any operation of an execution plan to be evaluated, determining a target operator according to the operation and a query operator information table, and determining the cost of the corresponding execution plan according to the target operator, wherein the method specifically comprises the following steps: s410: the operation type is determined according to the operation.
S420: and determining a corresponding executable operator according to the operation type and the query operator information table.
S430: calculating the cost of any executable operator to execute the corresponding operation specifically comprises the following steps: s431: acquiring hardware parameters and operator information parameters of any executable operator; wherein the acquiring of the hardware parameters of any executable operator comprises at least one of the following: s4311: acquiring equipment hardware parameters of heterogeneous acceleration equipment where any executable operator is located; s4312: acquiring host hardware parameters of a host; s4313: and acquiring interconnection parameters between heterogeneous acceleration equipment where any executable operator is located and a host.
The device hardware parameters include at least one of: heterogeneous acceleration device frequency, heterogeneous acceleration device number of cores, heterogeneous acceleration device memory space.
The host hardware parameters include at least one of: host CPU master frequency, host memory bus throughput.
The interconnection parameters include at least one of: bus throughput of the bus for connecting the host and the heterogeneous acceleration device, and access delay of the host and the heterogeneous acceleration device.
S432: according to the query data size, hardware parameters and operator information parameters of the query request, an operator execution cost model is adopted to determine the cost of each operator for executing corresponding operation, and the method comprises the following steps: according to the following: f (x) =σ 1θTx + σ2θT, calculating the operator execution cost of any operator to execute the corresponding operator.
Wherein f (x) represents operator execution cost, x represents query data size, θ represents hardware parameters including at least one of: the method comprises the steps of host CPU main frequency, host memory bus throughput rate, heterogeneous acceleration device frequency, heterogeneous acceleration device core number, heterogeneous acceleration device memory space, bus throughput rate of a bus connecting a host and the heterogeneous acceleration device, and access delay of the host and the heterogeneous acceleration device. The operator information parameters include: a first operator information parameter set, a second operator information parameter set; σ 1 represents a first operator information parameter set, which is a vector in the form of: σ 1 = (σ1112,……,σ1n);σ2 represents a second operator information parameter set.
The second operator information parameter set is a vector in the form of: σ 2 = (σ2122,……,σ2n); wherein σ 11 is a first parameter of the first operator information parameter set, σ 12 is a second parameter of the first operator information parameter set, σ 21 is a first parameter of the second operator information parameter set, σ 22 is a second parameter of the second operator information parameter set, and n is a natural number.
The first operator information parameter set and the second operator information parameter set are obtained by the following modes: s010: executing preset operations on any heterogeneous acceleration device on a plurality of different hosts to obtain training sample data, wherein the method comprises the following steps: s011: acquiring equipment hardware parameters of heterogeneous acceleration equipment; s012: sequentially obtaining host hardware parameters corresponding to a plurality of different hosts; s013: and sequentially interconnecting the heterogeneous acceleration equipment with a plurality of different hosts, and calling and executing preset operation through the corresponding hosts to obtain test data of the preset operation as training sample data.
S020: according to training sample data, a multiple linear regression method is adopted to determine a first operator information parameter set and a second operator information parameter set; s030: recording the first operator information parameter set and the second operator information parameter set in an acceleration equipment information table of the heterogeneous acceleration equipment; s040: traversing the type of the preset operation until the equipment operator information table of the heterogeneous acceleration equipment completes the recording of operator information parameters corresponding to all the operations.
S440: determining an operator with the cost meeting a preset condition for executing the corresponding operation as a target operator; s450: and taking the cost of the corresponding operation of the target operator as the operation cost.
S500: screening the cost of the execution plan to determine a target execution plan, specifically comprising: s510: accumulating the cost of a target operator corresponding to the operation included in any execution plan to be evaluated; s520: ordering the cost of executing the execution plan to be evaluated; s530: and taking the execution plan to be evaluated, of which the cost of executing the query request meets the preset condition, as a target execution plan.
S600: sequentially calling corresponding target operators according to the sequence of operations contained in the target execution plan to complete the query request, wherein the method comprises the following steps: s610: occupying a target operator corresponding to an operation contained in a target execution plan; s620: and sequentially calling corresponding target operators according to the sequence of the operations in the target execution plan.
S700: releasing the invoked operator, comprising: s710: adding the called operator into a list to be released; s720: determining the use frequency of each operator in the to-be-released list, including:
According to the following:
Wherein f op represents the frequency of use of the operator, M is a preset value, and δ is an acceleration device index.
S730: releasing the operator which is not used in the preset query times when the use frequency is smaller than the frequency threshold value and stopping the query.
S800: and executing the target execution plan and acquiring a query result corresponding to the query request.
S900: responding to the query request with the query result.
Example III
An intelligent resource selecting device for heterogeneous computing, as shown in fig. 4, includes: the information generation module is used for acquiring the equipment operator information table and generating a query operator information table according to the equipment operator information table, wherein the equipment operator information table comprises operations executed by any operator.
The query analysis module is used for acquiring the query request and determining at least one execution plan to be evaluated corresponding to the query request, wherein any one of the at least one execution plan to be evaluated is used for completing the query request.
And the operation determining module is used for determining the operation included in any execution plan to be evaluated.
And the cost determining module is used for sequentially extracting any operation of the execution plan to be evaluated, determining a target operator according to the operation and the query operator information table, and determining the cost of the corresponding execution plan according to the target operator.
And the plan screening module is used for screening the cost of the execution plan to determine the target execution plan.
And the operator calling module is used for calling the corresponding target operators in sequence according to the sequence of the operations contained in the target execution plan so as to complete the query request.
Example IV
A heterogeneous computation-oriented resource intelligent selection system, as shown in fig. 5, includes a memory, a processor and a heterogeneous computation-oriented resource intelligent selection program stored in the memory and capable of running on the processor, where the heterogeneous computation-oriented resource intelligent selection method described in the first embodiment or the second embodiment is implemented when the processor executes the heterogeneous computation-oriented resource intelligent selection program. The contents described in the first embodiment and the second embodiment are not described herein.
Example five
A computer-readable storage medium having stored thereon a heterogeneous computing-oriented resource intelligent selection program, which when executed by a processor, implements the heterogeneous computing-oriented resource intelligent selection method described in embodiment one or embodiment two. The contents described in the first embodiment and the second embodiment are not described herein.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program loaded on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via a communication device, or from memory, or from ROM. The above-described functions defined in the method of the embodiment of the present application are performed when the computer program is executed by an external processor.
It should be noted that, the computer readable medium of the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in embodiments of the present application, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (Radio Frequency), and the like, or any suitable combination thereof.
The computer readable medium may be contained in the server; or may exist alone without being assembled into the server. The computer readable medium carries one or more programs which, when executed by the server, cause the server to: acquiring a frame rate of an application on the terminal in response to detecting that a peripheral mode of the terminal is not activated; when the frame rate meets the screen-extinguishing condition, judging whether a user is acquiring screen information of the terminal; and controlling the screen to enter an immediate dimming mode in response to the judgment result that the user does not acquire the screen information of the terminal.
Computer program code for carrying out operations for embodiments of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for a system or system embodiment, since it is substantially similar to a method embodiment, the description is relatively simple, with reference to the description of the method embodiment being made in part. The systems and system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The foregoing has outlined rather broadly the more detailed description of the application in order that the detailed description of the application that follows may be better understood, and in order that the present principles and embodiments may be better understood; also, it is within the scope of the present application to be modified by those of ordinary skill in the art in light of the present teachings. In view of the foregoing, this description should not be construed as limiting the application.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (26)

1. An intelligent selection method for resources facing heterogeneous computing is characterized by comprising the following steps:
Acquiring an equipment operator information table, and generating a query operator information table according to the equipment operator information table, wherein the equipment operator information table comprises operations executed by any operator;
Acquiring a query request, and determining at least one execution plan to be evaluated corresponding to the query request, wherein any one of the at least one execution plan to be evaluated is used for completing the query request;
determining an operation included in any execution plan to be evaluated;
sequentially extracting the operation of any execution plan to be evaluated, determining a target operator according to the operation and a query operator information table, and determining the cost of the corresponding execution plan according to the target operator;
screening the cost of the execution plan to determine a target execution plan;
Sequentially calling corresponding target operators according to the sequence of the operations contained in the target execution plan so as to complete the query request;
The step of sequentially extracting the operations of any execution plan to be evaluated, the step of determining a target operator according to the operations and a query operator information table, and the step of determining the cost of the corresponding execution plan according to the target operator comprises the following steps: calculating the cost of any executable operator to execute the corresponding operation;
The calculating the cost of any executable operator to execute the corresponding operation comprises the following steps: determining the cost of each operator for executing corresponding operation by adopting an operator execution cost model according to the query data scale, the hardware parameters and the operator information parameters of the query request;
The determining the cost of each operator to execute the corresponding operation by adopting an operator execution cost model according to the query data scale of the query request, the hardware parameter and the operator information parameter comprises: calculating an operator execution cost of any operator to execute the corresponding operator according to f (x) =sigma 1θTx+σ2θT, wherein f (x) represents the operator execution cost, x represents the query data size, and θ represents a hardware parameter, and the hardware parameter comprises at least one of the following items: host CPU dominant frequency, host memory bus throughput, heterogeneous acceleration device frequency, heterogeneous acceleration device core number, heterogeneous acceleration device memory space, bus throughput of a bus connecting the host and the heterogeneous acceleration device, access delay of the host and the heterogeneous acceleration device, sigma 1 represents a first operator information parameter set, and sigma 2 represents a second operator information parameter set.
2. The heterogeneous computing-oriented resource intelligent selection method according to claim 1, wherein before the computing the cost of any executable operator to perform the corresponding operation, further comprises:
Determining an operation type according to the operation;
Determining a corresponding executable operator according to the operation type and the query operator information table;
after calculating the cost of executing the corresponding operation by any executable operator, the method further comprises the following steps:
Determining an operator with the cost meeting a preset condition for executing the corresponding operation as a target operator;
And taking the cost of executing the corresponding operation by the target operator as the operation cost.
3. The heterogeneous computing-oriented resource intelligent selection method according to claim 2, wherein the determining the cost of each operator by using an operator execution cost model according to the query data size of the query request, the hardware parameters, and the operator information parameters, further comprises:
And acquiring hardware parameters and operator information parameters of any executable operator.
4. The heterogeneous computing-oriented resource intelligent selection method of claim 3, wherein the operator information parameters include: a first operator information parameter set, a second operator information parameter set;
the first operator information parameter set is a vector, and the form is:
σ1=(σ1112,……,σ1n);
the second operator information parameter set is a vector, which is in the form of:
σ2=(σ2122,……,σ2n);
Wherein σ 11 is a first parameter of the first operator information parameter set, σ 12 is a second parameter of the first operator information parameter set, σ 21 is a first parameter of the second operator information parameter set, σ 22 is a second parameter of the second operator information parameter set, and n is a natural number.
5. The heterogeneous computing-oriented resource intelligent selection method of claim 1, wherein the screening the cost of the execution plan to determine the target execution plan comprises:
accumulating the cost of a target operator corresponding to the operation included in any execution plan to be evaluated;
Ordering the cost of executing the execution plan to be evaluated;
And taking the execution plan to be evaluated, of which the cost of executing the query request meets the preset condition, as a target execution plan.
6. The heterogeneous computing-oriented resource intelligent selection method of claim 1, wherein the obtaining the device operator information table and generating the query operator information table according to the device operator information table comprise:
traversing all heterogeneous acceleration devices connected with a host, and acquiring a device operator information table of the corresponding heterogeneous acceleration device according to the connection relation between any heterogeneous acceleration device and the host, wherein the host is the device initiating the query request, and the connection relation at least comprises: the first connection relation, the second connection relation and the third connection relation;
generating a query operator information table according to the device operator information table, wherein the device operator information table further comprises: any operator contained in the corresponding heterogeneous acceleration device, and a corresponding relation between any operator contained in the corresponding heterogeneous acceleration device and an executable operation of the operator.
7. The heterogeneous computing-oriented resource intelligent selection method according to claim 6, wherein the obtaining the device operator information table of the corresponding heterogeneous acceleration device according to the connection relationship between any heterogeneous acceleration device and the host machine includes:
responding to the connection relation between the heterogeneous acceleration device and the host as a first connection relation, and reading a device operator information table of the corresponding heterogeneous acceleration device through a PCIe bus;
Responding to the connection relation between the heterogeneous acceleration device and the host as a second connection relation, and reading a device operator information table of the corresponding heterogeneous acceleration device through a second bus and a management network, wherein the second bus at least comprises a CXL bus;
And in response to the connection relation between the heterogeneous acceleration device and the host is a third connection relation, reading a device operator information table of the corresponding heterogeneous acceleration device through a third bus, wherein the third bus at least comprises an InfiniBand bus.
8. The heterogeneous computing-oriented resource intelligent selection method of claim 7, wherein the second connection relationship comprises: the host is connected with at least one heterogeneous acceleration device through the CXL bus, the at least one heterogeneous acceleration device is connected with a management network through a management network bus, and the management network is connected with the host; the reading, by the second bus and the management network, the device operator information table of the corresponding heterogeneous acceleration device includes:
the management network queries heterogeneous acceleration device information of heterogeneous acceleration devices connected with the second bus in a preset period through the management network bus;
And in response to the management network finding that heterogeneous acceleration equipment exists on the second bus, acquiring an equipment operator information table of the heterogeneous acceleration equipment.
9. The heterogeneous computing-oriented resource intelligent selection method of claim 8, wherein the third connection relationship comprises: the host is connected with at least one remote heterogeneous acceleration device through the third bus; reading a device operator information table of the corresponding heterogeneous acceleration device through the third bus, wherein the device operator information table comprises:
and communicating with a remote host to acquire a device operator information table of any one of the at least one heterogeneous acceleration device, wherein the remote host comprises the at least one heterogeneous acceleration device.
10. The heterogeneous computing-oriented resource intelligent selection method of claim 6, wherein the generating a query operator information table according to the device operator information table comprises:
clustering operators according to operation types of the operations, and generating corresponding relations between the operations and the executable operators;
And constructing the query operator information table according to the corresponding relation, wherein the query operator information table comprises equipment types, operator calculation cost, callback functions, equipment information and operator parameter information.
11. The heterogeneous computing-oriented resource intelligent selection method according to claim 1, wherein the sequentially calling the corresponding target operators according to the sequence of the operations included in the target execution plan comprises:
Occupying a target operator corresponding to an operation contained in the target execution plan;
and sequentially calling corresponding target operators according to the sequence of the operations in the target execution plan.
12. The heterogeneous computing-oriented resource intelligent selection method of claim 4, wherein the first operator information parameter set and the second operator information parameter set are obtained by:
executing preset operation on any heterogeneous acceleration device on a plurality of different hosts to obtain training sample data;
According to the training sample data, a multiple linear regression method is adopted to determine a first operator information parameter set and a second operator information parameter set;
Recording the first operator information parameter set and the second operator information parameter set in an acceleration equipment information table of the heterogeneous acceleration equipment; traversing the type of the preset operation until the equipment operator information table of the heterogeneous acceleration equipment completes the recording of operator information parameters corresponding to all the operations.
13. The heterogeneous computing-oriented resource intelligent selection method of claim 12, wherein the executing a preset operation on a plurality of different hosts by any heterogeneous acceleration device to obtain training sample data comprises:
Acquiring equipment hardware parameters of the heterogeneous acceleration equipment;
Sequentially acquiring host hardware parameters corresponding to the different hosts;
and sequentially interconnecting the heterogeneous acceleration equipment and the different hosts, and calling and executing preset operation through the corresponding hosts to obtain test data of the preset operation as training sample data.
14. The heterogeneous computing-oriented resource intelligent selection method according to claim 1, wherein after sequentially calling corresponding target operators according to the order of operations included in the target execution plan to complete the query request, further comprises: releasing the invoked operator.
15. The heterogeneous computing-oriented resource intelligent selection method of claim 14, wherein the releasing the invoked operator comprises:
Adding the called operator into a list to be released;
determining the use frequency of each operator in the list to be released;
Releasing the operator which is not used in the preset query times when the use frequency is smaller than the frequency threshold value and stopping the query.
16. The heterogeneous computing-oriented resource intelligent selection method of claim 15, wherein determining the frequency of use of each operator in the to-be-released list comprises:
According to the following:
Wherein f op represents the frequency of use of the operator, M is a preset value, and δ is an acceleration device index.
17. The heterogeneous computing-oriented resource intelligent selection method according to claim 1, wherein after sequentially calling corresponding target operators according to the order of operations included in the target execution plan to complete the query request, further comprises: executing the target execution plan to obtain a query result corresponding to the query request;
And responding to the query request with the query result.
18. The heterogeneous computing-oriented resource intelligent selection method of claim 1, wherein the device operator information table comprises at least one of: heterogeneous acceleration device parameters, and operator parameters.
19. The heterogeneous computing-oriented resource intelligent selection method of claim 18, wherein the heterogeneous acceleration device parameters include at least one of: the type of the board card, the size of the parameter space, the number of supporting operators, the working frequency of the equipment and the size of the memory space of the equipment.
20. The heterogeneous computing-oriented resource intelligent selection method of claim 18, wherein the operator parameters include at least one of: the method comprises the steps of operator types, operator parameter space sizes, operator cost estimation models, the number of cores, a first operator information parameter set and a second operator information parameter set.
21. The heterogeneous computing-oriented resource intelligent selection method of claim 3, wherein the acquiring and any executable operator hardware parameters comprises at least one of:
acquiring equipment hardware parameters of heterogeneous acceleration equipment where any executable operator is located;
acquiring host hardware parameters of a host;
and acquiring interconnection parameters between heterogeneous acceleration equipment where any executable operator is located and the host.
22. The heterogeneous computing-oriented resource intelligent selection method of claim 21, wherein the device hardware parameters include at least one of: heterogeneous acceleration device frequency, heterogeneous acceleration device number of cores, heterogeneous acceleration device memory space.
23. The heterogeneous computing-oriented resource intelligent selection method of claim 21, wherein the host hardware parameters include at least one of: host CPU master frequency, host memory bus throughput.
24. The heterogeneous computing-oriented resource intelligent selection method of claim 21, wherein the interconnection parameters include at least one of: bus throughput of the bus for connecting the host and the heterogeneous acceleration device, and access delay of the host and the heterogeneous acceleration device.
25. An intelligent heterogeneous computing-oriented resource selection device, comprising:
the information generation module is used for acquiring an equipment operator information table and generating a query operator information table according to the equipment operator information table, wherein the equipment operator information table comprises operations executed by any operator;
The query analysis module is used for acquiring a query request and determining at least one execution plan to be evaluated corresponding to the query request, wherein any one of the at least one execution plan to be evaluated is used for completing the query request;
an operation determining module, configured to determine an operation included in the any execution plan to be evaluated;
The cost determining module is used for sequentially extracting the operation of any execution plan to be evaluated, determining a target operator according to the operation and a query operator information table, and determining the cost of the corresponding execution plan according to the target operator;
the plan screening module is used for screening the cost of the execution plan to determine a target execution plan;
The operator calling module is used for calling corresponding target operators in sequence according to the sequence of the operations contained in the target execution plan so as to complete the query request;
The step of sequentially extracting the operations of any execution plan to be evaluated, the step of determining a target operator according to the operations and a query operator information table, and the step of determining the cost of the corresponding execution plan according to the target operator comprises the following steps: calculating the cost of any executable operator to execute the corresponding operation;
The calculating the cost of any executable operator to execute the corresponding operation comprises the following steps: determining the cost of each operator for executing corresponding operation by adopting an operator execution cost model according to the query data scale, the hardware parameters and the operator information parameters of the query request;
The determining the cost of each operator to execute the corresponding operation by adopting an operator execution cost model according to the query data scale of the query request, the hardware parameter and the operator information parameter comprises: calculating an operator execution cost of any operator to execute the corresponding operator according to f (x) =sigma 1θTx+σ2θT, wherein f (x) represents the operator execution cost, x represents the query data size, and θ represents a hardware parameter, and the hardware parameter comprises at least one of the following items: host CPU dominant frequency, host memory bus throughput, heterogeneous acceleration device frequency, heterogeneous acceleration device core number, heterogeneous acceleration device memory space, bus throughput of a bus connecting the host and the heterogeneous acceleration device, access delay of the host and the heterogeneous acceleration device, sigma 1 represents a first operator information parameter set, and sigma 2 represents a second operator information parameter set.
26. The heterogeneous computing-oriented resource intelligent selection system is characterized by comprising a memory, a processor and a heterogeneous computing-oriented resource intelligent selection program which is stored in the memory and can run on the processor, wherein the heterogeneous computing-oriented resource intelligent selection method of any one of claims 1 to 24 is realized when the heterogeneous computing-oriented resource intelligent selection program is executed by the processor.
CN202410346113.0A 2024-03-26 2024-03-26 Heterogeneous computing-oriented resource intelligent selection method, device and system Active CN117951166B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410346113.0A CN117951166B (en) 2024-03-26 2024-03-26 Heterogeneous computing-oriented resource intelligent selection method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410346113.0A CN117951166B (en) 2024-03-26 2024-03-26 Heterogeneous computing-oriented resource intelligent selection method, device and system

Publications (2)

Publication Number Publication Date
CN117951166A CN117951166A (en) 2024-04-30
CN117951166B true CN117951166B (en) 2024-06-18

Family

ID=90799704

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410346113.0A Active CN117951166B (en) 2024-03-26 2024-03-26 Heterogeneous computing-oriented resource intelligent selection method, device and system

Country Status (1)

Country Link
CN (1) CN117951166B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101001439A (en) * 2006-01-10 2007-07-18 华为技术有限公司 Method for terminal switching between heterogeneous network

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7363299B2 (en) * 2004-11-18 2008-04-22 University Of Washington Computing probabilistic answers to queries
CN101064952B (en) * 2006-04-29 2012-08-08 株式会社Ntt都科摩 Distributed wireless resource management system and method for heterogeneous wireless network
CN116431448A (en) * 2022-01-04 2023-07-14 北京金山云网络技术有限公司 Evaluation method and device of execution cost and electronic equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101001439A (en) * 2006-01-10 2007-07-18 华为技术有限公司 Method for terminal switching between heterogeneous network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于信息网模型的分布并行多连接查询优化;徐晶;刘梦赤;;计算机应用与软件;20170715(07);第73-80页 *

Also Published As

Publication number Publication date
CN117951166A (en) 2024-04-30

Similar Documents

Publication Publication Date Title
CN107885762B (en) Intelligent big data system, method and equipment for providing intelligent big data service
CN109902105B (en) Data query system, method, device and storage medium for micro-service architecture
US20090077235A1 (en) Mechanism for profiling and estimating the runtime needed to execute a job
CN110457277A (en) Service process performance analysis method, device, equipment and storage medium
US20090228446A1 (en) Method for controlling load balancing in heterogeneous computer system
US8812645B2 (en) Query optimization in a parallel computer system with multiple networks
CN111563014A (en) Interface service performance test method, device, equipment and storage medium
KR101965277B1 (en) System and method for analysis of hypergraph data and computer program for the same
US20230306027A1 (en) Method and system for recommending indexes by cloud computation
CN111090686B (en) Data processing method, device, server and storage medium
CN113672500B (en) Deep learning algorithm testing method and device, electronic device and storage medium
CN113918622B (en) Information tracing method and system based on block chain
CN111367681A (en) Cloud computing cluster-oriented bridge design system under high load state
CN108038215A (en) Data processing method and system
CN101196901B (en) Computer system and method for database query
CN110389873A (en) A kind of method and apparatus of determining server resource service condition
CN109684093A (en) Data processing method and system
CN117951166B (en) Heterogeneous computing-oriented resource intelligent selection method, device and system
US20210158248A1 (en) Computer system and resource management method
CN113138906A (en) Call chain data acquisition method, device, equipment and storage medium
CN115795368B (en) Enterprise internal training data processing method and system based on artificial intelligence
CN115016911A (en) Task arrangement method, device, equipment and medium for large-scale federal learning
CN113570333B (en) Process design method suitable for integration
CN110995815B (en) Information transmission method based on Gaia big data analysis system
US20230185620A1 (en) Information infrastructure management method, management server of information infrastructure, and non-transitory computer-readable recording medium for information infrastructure management program

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