CN111694653A - Method, device and system for adjusting distribution of calculation operator types in calculation system - Google Patents

Method, device and system for adjusting distribution of calculation operator types in calculation system Download PDF

Info

Publication number
CN111694653A
CN111694653A CN201910189636.8A CN201910189636A CN111694653A CN 111694653 A CN111694653 A CN 111694653A CN 201910189636 A CN201910189636 A CN 201910189636A CN 111694653 A CN111694653 A CN 111694653A
Authority
CN
China
Prior art keywords
calculation
operator
computing system
operators
programmable hardware
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.)
Pending
Application number
CN201910189636.8A
Other languages
Chinese (zh)
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910189636.8A priority Critical patent/CN111694653A/en
Publication of CN111694653A publication Critical patent/CN111694653A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a method, a device and a system for adjusting distribution of computation operator types in a computing system, wherein the method comprises the following steps: and acquiring the operand data record of the calculation operator in the actual data processing process of the calculation system, predicting the prediction demand of the calculation operator on the calculation system in the future time period T, and further adjusting the calculation operator type and the distribution proportion realized on the calculation system in a programmable hardware mode before the future time period T comes according to the prediction demand of the calculation operator on the calculation system. By adopting the method for adjusting the distribution of the types of the calculation operators in the calculation system, the calculation power of the calculation operators realized in a programmable hardware mode can be served for the busiest data processing task as much as possible, so that the calculation efficiency of the whole calculation system is improved.

Description

Method, device and system for adjusting distribution of calculation operator types in calculation system
Technical Field
The application relates to the field of intelligent control, in particular to a method for adjusting distribution of calculation operator types in a calculation system. The invention also relates to a device and a system for adjusting the distribution of the types of the calculation operators in the calculation system.
Background
In recent years, with the rapid development of network technology, the storage and management scale of database data is increasing exponentially, and more users send data processing requests to the database through applications. How to accelerate the data processing speed and improve the operation efficiency of the database system becomes a technical goal pursued by the technicians in the field.
In order to solve the above technical problems, in the prior art, a mode that a CPU (Central Processing Unit) and a hardware accelerator (which may be one or a combination of a GPU, an FPGA, and an ASIC chip) form an integrated heterogeneous hardware computing system is generally adopted to perform a data Processing task in a database, and by matching different hardware, various gains are realized, and the operating efficiency of the database system is effectively improved. The CPU provides the operational capability by executing the instructions provided for the CPU, and the CPU can execute different tasks at any time according to different instructions; and the FPGA has a different working mode with the CPU and the GPU.
An FPGA (Field Programmable Gate Array) is a semi-custom circuit in the Field of Application Specific Integrated Circuits (ASICs), which needs to be programmed before use to make its specific units perform specific tasks; once programmed, the work tasks that the FPGA is able to handle are fixed until the next programming changes its role. Because the FPGA has the characteristics of higher integration density, larger capacity and lower power consumption in the process of executing a specific task, the FPGA is often used as a hardware-level accelerator by some database manufacturers, and the FPGA undertakes the work of a calculation operator with a large operation demand in a computing system.
However, when using FPGA and similar programmable hardware for performing fixed tasks to speed up, the prior art can only implement some computation operators with higher loads in CPU into FPGA according to the estimation of the designer. The implementation mode is not accurate enough, so that a calculation operator with high calculation power demand cannot be supported by enough calculation power, and a calculation operator with low calculation power demand occupies calculation power resources for a long time, so that the acceleration effect of the whole calculation system is poor, the requirement of high-efficiency operation of a database system cannot be met, and the utilization rate of hardware is reduced.
Disclosure of Invention
The application provides a method for adjusting the distribution of the calculation algorithm type in a computing system, which aims to solve the problem of low operation efficiency caused by manually configuring the distribution of the calculation algorithm type in the prior art. The present application further provides an apparatus and system for adjusting the distribution of computing operator types in a computing system.
The application provides a method for adjusting distribution of computation operator types in a computing system, which comprises the following steps: acquiring operand data records of a calculation operator in actual data processing of a computing system, wherein the calculation operator is used for completing a data processing task; according to the operand data record of the calculation operator, the prediction demand of the future time period T on the calculation operator on the calculation system is obtained; adjusting, according to the predicted demand of the computing operator on the computing system, the computing operator implemented in programmable hardware on the computing system before the future time period T, the adjusting including at least one of: the type of the calculation operator realized by the programmable hardware mode and the distribution proportion of the calculation operator realized by the programmable hardware mode.
Optionally, the adjusting, according to the predicted demand of the computing operator on the computing system, the computing operator implemented in a programmable hardware manner on the computing system before the future time period T comes includes: determining a calculation operator which reaches or exceeds a preset demand threshold value in the calculation operators on the computing system according to the predicted demand of the calculation operators on the computing system; determining the type of the computing operator meeting or exceeding a preset demand threshold as the type of the computing operator needing to be implemented in programmable hardware on the computing system before the future time period T comes; and adjusting the type of the calculation operator which is preset on the computing system and is realized in a programmable hardware manner before the future time interval T comes according to the type of the calculation operator which is required to be realized in a programmable hardware manner on the computing system.
Optionally, the adjusting, according to the type of the calculation operator implemented in the programmable hardware manner on the computing system, the type of the calculation operator implemented in the programmable hardware manner preset on the computing system before the future time period T comes includes: comparing the type of the calculation operator which needs to be realized on the computing system in a programmable hardware mode with the actual type of the calculation operator which is preset on the computing system and realized in a programmable hardware mode, judging whether the calculation operator of the corresponding type exists on the computing system, and if not, increasing the type of the calculation operator of the corresponding type on the computing system in the programmable hardware mode before the future time interval T comes.
Optionally, the adjusting, according to the predicted demand of the computing operator on the computing system, the computing operator implemented in a programmable hardware manner on the computing system before the future time period T comes includes: determining a calculation operator which reaches or exceeds a preset demand threshold value in the calculation operators on the computing system according to the predicted demand of the calculation operators on the computing system; determining the predicted demand of the calculation operator which reaches or exceeds the preset demand threshold value as the demand of the calculation operator which is realized on the calculation system in a programmable hardware mode before the future time period T comes; and adjusting the distribution proportion of the calculation operators which are realized in a programmable hardware manner and preset on the calculation system before the future time period T comes according to the demand of the calculation operators which are realized in a programmable hardware manner on the calculation system.
Optionally, the adjusting, according to the demand of the calculation operator implemented in the programmable hardware manner on the computing system, the distribution ratio of the calculation operator implemented in the programmable hardware manner preset on the computing system before the future time period T comes includes: when the demand of the calculation operators which are realized in a programmable hardware manner on the computing system is reduced, reducing the distribution proportion of the calculation operators which are realized in a programmable hardware manner of corresponding types before the future time period T comes; when the demand of the calculation operators which are realized in a programmable hardware manner on the computing system is increased, increasing the distribution proportion of the calculation operators which are realized in a programmable hardware manner of corresponding types before the future time period T comes; when the demand quantity of the calculation operator realized in the programmable hardware mode on the calculation system is stable in a preset interval range, the distribution proportion of the calculation operator of the corresponding type realized in the programmable hardware mode on the calculation system is kept unchanged.
Optionally, the adjusting, according to the demand of the calculation operator implemented in the programmable hardware manner on the computing system, the distribution ratio of the calculation operator implemented in the programmable hardware manner preset on the computing system before the future time period T comes includes: and comparing the demand quantity of the calculation operators realized in the programmable hardware mode on the calculation system with the distribution situation of the calculation operators realized in the programmable hardware mode preset on the calculation system, and if the matching degree is lower than a preset index, adjusting the distribution proportion of the calculation operators realized in the programmable hardware mode of the corresponding type on the calculation system before the future time interval T comes.
Optionally, the obtaining the predicted demand of the future time period T for the calculation operator on the calculation system according to the operand data record of the calculation operator includes: and inputting the operand data records of the calculation operator into a preset calculation operator demand prediction model to obtain the prediction demand of the calculation operator on the calculation system in the future time period T, wherein the calculation operator demand prediction model is a deep neural network model for predicting the prediction demand of the calculation operator in the future time period T according to the operand data records of the calculation operator in the preset time period.
Optionally, the method for adjusting the distribution of the types of computing operators in the computing system further includes: acquiring an operand data record sample of a calculation operator in the preset time period; obtaining an actual demand sample of the calculation operator in a future time period T matched with the operand data record sample of the calculation operator in the preset time period; training the deep neural network model by using the operand data record samples of the calculation operators in the preset time period and the actual demand samples of the calculation operators in the future time period T matched with the operand data record samples of the calculation operators in the preset time period, so as to obtain the calculation operator demand prediction model.
Optionally, the obtaining of the operand data record of the calculation operator in the actual data processing of the calculation system specifically includes: acquiring operand data records of calculation operators in the calculation system for processing data processing requests of clients in a database; accordingly, the calculation operators are all the dedicated calculation programs provided for the data processing tasks on the calculation systems in the database.
Optionally, the computing system is a heterogeneous hardware acceleration computing system for processing database data, and the heterogeneous hardware acceleration computing system is composed of a CPU module and a programmable hardware module.
Optionally, the operand data record of the calculation operator includes at least one of occupancy proportion data and usage time data of the calculation operator in the data processing process.
Optionally, the predicted demand amount of the calculation operator is time consumed by prediction of the calculation operator in the data processing process.
Correspondingly, the present application also provides an apparatus for adjusting distribution of computation operator types in a computing system, comprising: the system comprises a monitoring unit, a resource manager unit and a programmable hardware management unit; the monitoring unit is used for acquiring operand data records of a calculation operator in actual data processing of the computing system, and the calculation operator is used for completing a data processing task; the resource manager unit is used for acquiring the predicted demand of the future time period T on the calculation operator on the calculation system according to the operand data record of the calculation operator; the programmable hardware management unit is configured to, according to a predicted demand of a computing operator on the computing system, adjust the computing operator implemented in a programmable hardware manner on the computing system before the future time period T comes, where the adjustment includes at least one of: the type of the calculation operator realized by the programmable hardware mode and the distribution proportion of the calculation operator realized by the programmable hardware mode.
Optionally, the programmable hardware management unit is specifically configured to: determining a calculation operator which reaches or exceeds a preset demand threshold value in the calculation operators on the computing system according to the predicted demand of the calculation operators on the computing system; determining the type of the computing operator meeting or exceeding a preset demand threshold as the type of the computing operator needing to be implemented in programmable hardware on the computing system before the future time period T comes; and adjusting the type of the calculation operator which is preset on the computing system and is realized in a programmable hardware manner before the future time interval T comes according to the type of the calculation operator which is required to be realized in a programmable hardware manner on the computing system.
Optionally, the programmable hardware management unit is specifically configured to: comparing the type of the calculation operator which needs to be realized on the computing system in a programmable hardware mode with the actual type of the calculation operator which is preset on the computing system and realized in a programmable hardware mode, judging whether the calculation operator of the corresponding type exists on the computing system, and if not, increasing the type of the calculation operator of the corresponding type on the computing system in the programmable hardware mode before the future time interval T comes.
Optionally, the programmable hardware management unit is specifically configured to: determining a calculation operator which reaches or exceeds a preset demand threshold value in the calculation operators on the computing system according to the predicted demand of the calculation operators on the computing system; determining the predicted demand of the calculation operator which reaches or exceeds the preset demand threshold value as the demand of the calculation operator which is realized on the calculation system in a programmable hardware mode before the future time period T comes; and adjusting the distribution proportion of the calculation operators which are realized in a programmable hardware manner and preset on the calculation system before the future time period T comes according to the demand of the calculation operators which are realized in a programmable hardware manner on the calculation system.
Optionally, the programmable hardware management unit is specifically configured to: when the demand of the calculation operators which are realized in a programmable hardware manner on the computing system is reduced, reducing the distribution proportion of the calculation operators which are realized in a programmable hardware manner of corresponding types before the future time period T comes; when the demand of the calculation operators which are realized in a programmable hardware manner on the computing system is increased, increasing the distribution proportion of the calculation operators which are realized in a programmable hardware manner of corresponding types before the future time period T comes; when the demand quantity of the calculation operator realized in the programmable hardware mode on the calculation system is stable in a preset interval range, the distribution proportion of the calculation operator of the corresponding type realized in the programmable hardware mode on the calculation system is kept unchanged.
Optionally, the programmable hardware management unit is specifically configured to: and comparing the demand quantity of the calculation operators realized in the programmable hardware mode on the calculation system with the distribution situation of the calculation operators realized in the programmable hardware mode preset on the calculation system, and if the matching degree is lower than a preset index, adjusting the distribution proportion of the calculation operators realized in the programmable hardware mode of the corresponding type on the calculation system before the future time interval T comes.
Optionally, the resource manager unit is specifically configured to: and inputting the operand data records of the calculation operator into a preset calculation operator demand prediction model to obtain the prediction demand of the calculation operator on the calculation system in the future time period T, wherein the calculation operator demand prediction model is a deep neural network model for predicting the prediction demand of the calculation operator in the future time period T according to the operand data records of the calculation operator in the preset time period.
Optionally, the device for adjusting the distribution of the types of computation operators in the computing system further includes: the device comprises an operand data recording sample obtaining unit, an actual demand sample obtaining unit and a training unit; the operand data recording sample obtaining unit is used for obtaining operand data recording samples of the calculation operators in the preset time period; the actual demand sample obtaining unit is used for obtaining an actual demand sample of the calculation operator in a future time period T matched with the operand data record sample of the calculation operator in the preset time period; the training unit is used for training the deep neural network model by using the operand data record samples of the calculation operators in the preset time period and the actual demand samples of the future time period T, which are matched with the operand data record samples of the calculation operators in the preset time period, for the calculation operators, so as to obtain the calculation operator demand prediction model.
Optionally, the monitoring unit is specifically configured to: acquiring operand data records of calculation operators in the calculation system for processing data processing requests of clients in a database; accordingly, the calculation operators are all the dedicated calculation programs provided for the data processing tasks on the calculation systems in the database.
Optionally, the computing system is a heterogeneous hardware acceleration computing system for processing database data, and the heterogeneous hardware acceleration computing system is composed of a CPU module and a programmable hardware module.
Optionally, the operand data record of the calculation operator includes at least one of occupancy proportion data and usage time data of the calculation operator in the data processing process.
Optionally, the predicted demand amount of the calculation operator is predicted demand time of the calculation operator in the data processing process.
Correspondingly, the present application also provides a system for adjusting distribution of computational operator types in a computing system, comprising: means for adjusting the distribution of the type of computational operators in the computing system of any of the above.
Correspondingly, the present application also provides an electronic device, comprising: a processor and a memory, wherein the memory is used for storing a program of a method for adjusting the distribution of the types of computation algorithms in a computing system, and after the device is powered on and the program of the method for adjusting the distribution of the types of computation algorithms in the computing system is executed by the processor, the following steps are executed: acquiring operand data records of a calculation operator in actual data processing of a computing system, wherein the calculation operator is used for completing a data processing task; according to the operand data record of the calculation operator, the prediction demand of the future time period T on the calculation operator on the calculation system is obtained; adjusting, according to the predicted demand of the computing operator on the computing system, the computing operator implemented in programmable hardware on the computing system before the future time period T, the adjusting including at least one of: the type of the calculation operator realized by the programmable hardware mode and the distribution proportion of the calculation operator realized by the programmable hardware mode.
Accordingly, the present application also provides a storage device storing a program for a method of adjusting distribution of computation operator types in a computing system, the program being executed by a processor and performing the following steps: acquiring operand data records of a calculation operator in actual data processing of a computing system, wherein the calculation operator is used for completing a data processing task; according to the operand data record of the calculation operator, the prediction demand of the future time period T on the calculation operator on the calculation system is obtained; adjusting, according to the predicted demand of the computing operator on the computing system, the computing operator implemented in programmable hardware on the computing system before the future time period T, the adjusting including at least one of: the type of the calculation operator realized by the programmable hardware mode and the distribution proportion of the calculation operator realized by the programmable hardware mode.
Accordingly, the present application further provides a method for adjusting distribution of computation operator types in a computing system, comprising: acquiring operand data records of at least one part of types of calculation operators in actual data processing of a computing system, wherein the calculation operators are used for completing data processing tasks; according to the operand data record of the calculation operator, the prediction demand of the future time period T on the calculation operator on the calculation system is obtained; according to the predicted demand of the calculation operator on the calculation system, adjusting the calculation operator which is realized by the calculation system in a mode of a hardware accelerator before the future time period T comes, wherein the adjustment comprises at least one of the following items: the type of the calculation operator realized by the hardware accelerator mode and the distribution proportion of the calculation operator realized by the hardware accelerator mode.
Compared with the prior art, the method has the following advantages:
by adopting the method for adjusting the distribution of the types of the calculation operators in the calculation system, the prediction demand of the calculation operators in the future time period can be obtained by analyzing the operand data records of the calculation operators in the data processing process, and then the types and the distribution proportion of the calculation operators realized on the calculation system in a programmable hardware mode can be accurately adjusted, so that the calculation power of programmable hardware can be served for the busiest data processing task as much as possible, the calculation efficiency of the whole calculation system is improved, and the use efficiency of the hardware is improved.
Drawings
FIG. 1 is a flowchart of a method for adjusting the distribution of computing operators in a computing system according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating an apparatus for adjusting the distribution of computing operators in a computing system according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an electronic device according to an embodiment of the present invention;
FIG. 4 is a flowchart of an application scenario of a computing system according to an embodiment of the present invention;
FIG. 5a is a schematic diagram illustrating a distribution of computational algorithm types before adjustment in a computing system according to an embodiment of the present invention;
FIG. 5b is a diagram illustrating a distribution of computational algorithm types after adjustment in a computing system according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of monitoring operand data of a computing operator on a computing system according to an embodiment of the present invention;
FIG. 7a is a diagram illustrating a proportion of the types of computational algorithms before being modified in a modified computing system according to an embodiment of the present invention;
FIG. 7b is a diagram illustrating an adjusted proportion of the distribution of the computational operators in the computing system according to an embodiment of the present invention;
FIG. 8 is a flowchart illustrating a complete operation of a system for adjusting the distribution of computational algorithm types in a computing system according to an embodiment of the present invention.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, but rather construed as limited to the embodiments set forth herein.
The following describes an embodiment of the method for adjusting the distribution of the types of computation operators in the computing system according to the present invention in detail. The present embodiment is described by taking a computing system that handles database management and query processing tasks as an example.
Please refer to fig. 1, which is a flowchart illustrating a method for adjusting distribution of computing operators in a computing system according to an embodiment of the present invention.
The embodiment of the invention can be realized based on a traditional database system for providing data storage and management service, and the specific realization process comprises the following steps:
step S101: and acquiring operand data records of a calculation operator in actual data processing of the calculation system, wherein the calculation operator is used for finishing a data processing task.
In the embodiment of the present invention, the computing system may be a heterogeneous hardware acceleration computing system for processing database data, which is composed of a CPU module and a programmable hardware FPGA module, and often includes a GPU module.
The calculation operator is used for finishing a data processing task. The calculation operators may have different meanings for different calculation scenarios. The computing system for the database in this embodiment may include a Filter Operator, a Table Scan Operator, a Hash Join Operator, an Aggregation Operator, a Sort Operator, and a project Operator in the SQL processing task. As shown in fig. 4, in a specific implementation process of an application scenario flowchart of a computing system, a user sends a Data processing request to a DS (Data Store; database) through an APP application, Load Balancer (Load Balancer module) realizes Load balancing of the Data processing request, a Front Node module (Front Node Pool) receives the Data processing request distributed by the Load Balancer module, analyzes the Data processing request, distributes the Data processing request to different FN (Front Node; Front Node), generates a corresponding execution plan, sends the execution plan to a CN (computer Node; computing Node), and returns corresponding Data stored in the DS (Data Store; database). The execution plan is an AST (abstract syntax tree) composed of a number of calculation operators in a set logical order.
In the process of executing the execution plan, the calculation operators are respectively distributed to the CPU, the GPU and corresponding units in the FPGA module which is set as the corresponding calculation operators to execute. The types and the distribution proportions of the calculation operators preset in the programmable hardware FPGA module are usually set in advance according to manual experience, and only the operation tasks of the specific calculation operators can be executed after the setting. Therefore, in the process of accelerating the calculation of data processing, the calculation operator with large actual demand of the calculation amount may not obtain enough calculation power due to improper setting, and the operator with small actual demand of the calculation amount occupies calculation power resources of the FPGA module for a long time, so that the calculation efficiency of the whole calculation system is low.
Therefore, the invention provides a method for adjusting the distribution of the types of calculation operators in a calculation system, which has the premise that the calculation amount data of the calculation operators in the actual data processing process of the whole calculation system is monitored, recorded and statistically gathered, so that the calculation amount requirement of the calculation system on each calculation operator is mastered. The monitoring and recording of the operand data of the calculation operator can be carried out in different modes according to different requirements. One possible way is to monitor the computation load history data of each computation operator of the computing system, which mainly considers that the computation demand in the computing system often has the continuity of the history, and can use the history data to judge the future computation demand. One specific implementation of the method is described below.
Fig. 6 is a schematic diagram of monitoring operand data of a calculation operator on a computing system according to an embodiment of the present invention. Different types of calculation operators are represented by different colors, including: filter Operator, Table Scan Operator, Hash join Operator, Aggregation Operator, Sort Operator, and Project Operator. Analyzing the operand data records monitored in the period of 11 month 1 to 11 month 07, it can be found that, among the most time-consuming several types of calculation operators, the requirements of a Filter Operator and a Table Scan Operator on the calculation power are reduced, while the requirements of a Hash Operator and an aggregation Operator on the calculation power are continuously increased, the calculation power requirement of a Sort Operator is relatively stable, and the calculation power requirement of a Project Operator is fluctuated but the overall fluctuation is not large.
Step S102: and according to the operand data record of the calculation operator, obtaining the predicted demand of the calculation operator on the calculation system in the future time period T.
The step S101 obtains the operand data record in the predetermined time period of the calculation operator in the actual data processing of the calculation system. And preparing data for predicting the future time period T for the predicted demand of the calculation operator on the calculation system. In step S102, the predicted demand amount of the calculation operator on the calculation system in the future time period T can be obtained according to the monitored operand data record of the calculation operator.
By continuously monitoring and collecting the trend situation of the load on the whole computing system in the data processing process, the computing operator of which the predicted demand reaches or exceeds the preset demand threshold can be determined as the computing operator which needs the programmable hardware FPGA module to provide calculation force support. The above-mentioned monitored predicted demand amount of the calculation operator is a manner of measuring the demand of the operation amount with respect to the predicted demand amount of the operation amount, and specifically, the operation time may be used as a measurement index, that is, the operation amount demand of a certain calculation operator is the time consumed for executing the calculation operator within the determined time period. The time to execute a certain computational operator includes the time to execute the computational operator by the CPU, GPU, and FGPA or other programmable hardware. At the same time, a considerable number of calculation operators of this type can be executed simultaneously, the running time of each calculation operator being counted and the calculations being summed up. Of course, the calculation amount requirement of each calculation operator can also be measured by using the occupation proportion data of the calculation operator in the whole time consumed by the calculation operator. And determining the most time-consuming computing operators as the computing operators needing the programmable hardware FPGA module to provide computing power support.
For example: by analyzing the operand data records monitored in the period from 11 month 1 to 11 month 07, it can be found that, among the most time-consuming several types of calculation operators, the requirements of the Filter Operator and the Table scanner Operator on the calculation power are reduced, while the requirements of the Hash Operator and the Aggregation Operator are continuously increased, the calculation power requirement of the Sort Operator is relatively stable, and the calculation power requirement of the Project Operator is fluctuated but the overall fluctuation is not large. Therefore, the demand tendency for the operation amount can be derived before the future time period T comes: 1) the calculation power requirements of a Hash join Operator and an Aggregation Operator are continuously improved, the calculation power needs to be supplemented in time, otherwise, a calculation system is busy, the calculation efficiency is low, and the distribution proportion of the calculation operators in the programmable hardware FPGA module can be improved; 2) the calculation requirements of a Filter Operator and a Table scanner Operator are reduced, so that the distribution proportion of the calculation operators in the programmable hardware FPGA module can be released, otherwise, the waste of calculation resources can be caused; 3) the Sort Operator and Project Operator belong to the normal fluctuation range, and the distribution proportion of the calculation operators is not needed to be adjusted temporarily.
Specifically, the predicted demand of the calculation operator on the calculation system in the future time period T is obtained according to the monitored operand data record of the calculation operator, and the method can be implemented as follows: firstly, acquiring an operand data record sample of a calculation operator in a preset time period and an actual demand sample of a future time period T matched with the operand data record sample of the calculation operator in the preset time period for the calculation operator; and then training a preset deep neural network model aiming at the actual demand sample of the calculation operator by using the operand data record sample of the calculation operator in the preset time period and the future time period T matched with the operand data record sample of the calculation operator in the preset time period, and finally obtaining a calculation operator demand prediction model. And the monitored operand data records of the calculation operator are input into the calculation operator demand prediction model in real time, so that the predicted demand of the calculation operator on the calculation system in the future time period T can be accurately obtained. The calculation operator demand prediction model is a deep neural network model for predicting the prediction demand of the calculation operator in the future time period T according to the operand data record of the calculation operator in the predetermined time period. It should be noted that the prediction model according to the present invention is not limited to the above-mentioned training model obtained by collecting training samples to train a preset deep neural network model, and may also be implemented by a logistic regression model. In a specific implementation, a suitable model may be selected by a performance comparison test.
Step S103: adjusting, according to the predicted demand of the computing operator on the computing system, the computing operator implemented in programmable hardware on the computing system before the future time period T, the adjusting including at least one of: the type of the calculation operator realized by the programmable hardware mode and the distribution proportion of the calculation operator realized by the programmable hardware mode.
After the predicted demand amount of the calculation operator on the calculation system in the future time period T is obtained in step S102, the type and the distribution ratio of the calculation operator implemented in a programmable hardware manner on the calculation system can be adjusted in advance before the future time period T comes in this step by analyzing the predicted demand amount.
Specifically, the type and the distribution proportion of the calculation operator realized in the programmable hardware mode are accurately adjusted according to the predicted demand of the calculation operator on the calculation system within the preset time period which is monitored in advance, and the method can be realized by adopting the following mode:
1) according to the predicted demand of the calculation operators on the calculation system, firstly, the calculation operators which reach or exceed a preset demand threshold value in the calculation operators on the calculation system are determined. Determining the type of the computing operator that meets or exceeds the preset demand threshold as the type of computing operator that needs to be implemented in programmable hardware on the computing system before the future time period T. And adjusting the type of the calculation operator which is preset on the computing system and is realized in a programmable hardware mode before the future time period T comes according to the type of the calculation operator which is realized in a programmable hardware mode on the computing system. In a specific application process, the type of the calculation operator which needs to be implemented on the computing system in a programmable hardware manner can be compared with the actual type of the calculation operator which is preset on the computing system and implemented in a programmable hardware manner, whether the calculation operator of the corresponding type exists on the computing system is judged, and if not, the type of the calculation operator which is implemented on the computing system in a programmable hardware manner of the corresponding type is added before the future time period T comes.
Because the load condition of the calculation operators is usually changed continuously in the data processing process of the database system, not only are the demands of different types of calculation operators on the calculation power different, but also the demands of the same type of operators on the calculation power in different time periods may be different, namely, the calculation power demands have the characteristic of periodicity in time. Therefore, the load of the computing operator monitored during the above-mentioned determined time period may not always be able to reach or exceed the preset load threshold. Therefore, the type or distribution ratio of the calculation operators in the FPGA module needs to be adjusted in real time. Fig. 5a and fig. 5b are schematic diagrams of a pre-adjustment distribution of computational algorithms and a post-adjustment distribution of computational algorithms in a computing system according to an embodiment of the present invention. In the previous execution plan, it may be that two corresponding Table Scan operators (Table Scan operators) in fig. 5a need to be accelerated by using a programmable hardware FPGA module; in the latter execution plan, due to the change of statistical information of different calculation operators, the scheduling layer of the programmable hardware FPGA module automatically balances the types of the calculation operators. The method comprises the steps of loading an Aggregation Operator and a join Operator which are really loaded the highest in a recent period of time into an FPGA module according to a certain proportion, and unloading one of the Table ScanOperators with lower calculation force requirements. Therefore, from the perspective of a user, in the process of data processing of the same SQL by the database system, when the data processing is performed in different time periods, the FPGA module can be dynamically adjusted to provide different computational support. It should be noted that the operand data record of the calculation operator includes at least one of occupation ratio data and time-consuming data of the calculation operator in the data processing process.
2) And determining the calculation operators which reach or exceed a preset demand threshold value in the calculation operators on the calculation system according to the predicted demand of the calculation operators on the calculation system. And determining the predicted demand of the calculation operator reaching or exceeding the preset demand threshold as the demand of the calculation operator which is realized on the calculation system in a programmable hardware mode before the future time period T arrives. According to the demand of the calculation operator realized in the programmable hardware mode on the calculation system, the distribution proportion of the calculation operator realized in the programmable hardware mode preset on the calculation system is adjusted before the future time period T comes.
In a specific application process, one implementation manner is as follows: and comparing the demand quantity of the calculation operators realized in the programmable hardware mode on the computing system with the distribution condition of the calculation operators realized in the programmable hardware mode preset on the computing system, and if the matching degree is lower than a preset index, adjusting the distribution proportion of the calculation operators realized in the programmable hardware mode of the corresponding type on the computing system before the future time interval T comes. The other mode is as follows: when the demand of a calculation operator realized in a programmable hardware mode on a calculation system is monitored to be reduced, reducing the distribution proportion of the calculation operator realized in the programmable hardware mode of a corresponding type before a future time period T comes; when the demand quantity of the calculation operators realized in the programmable hardware mode on the calculation system is monitored to be increased, the distribution proportion of the calculation operators of the corresponding types realized in the programmable hardware mode is increased before a future time period T comes; when the demand quantity of the calculation operator realized in the programmable hardware mode on the calculation system is monitored to be stable in a preset interval range, the distribution proportion of the calculation operator realized in the programmable hardware mode of the corresponding type on the calculation system is kept unchanged.
Fig. 7a and 7b are schematic diagrams of a calculated operator type distribution ratio before adjustment and a calculated operator type distribution ratio after adjustment in a computing system according to an embodiment of the present invention.
By continuously monitoring and collecting the operand data conditions of the computation operators on the whole computing system in the data processing process, the operand demand condition of the computation operators in the future time period T can be predicted, and the computation operators with the largest operand demand are determined to be the computation operators needing the calculation force support provided by the programmable hardware FPGA module. Through monitoring for a while, in the several types of operators with the largest operand requirement shown in fig. 7a, the requirement of the Orc reader (Orc reading Operator) for the computation power is decreasing, the computation power requirements of the Hash Join Operator, the Json reader (Json reading Operator), the Csv reader (Csv reading Operator) and the Sorter Operator are increasing, and the computation power requirement of the Filter Operator fluctuates, but the overall fluctuation is not large. Thus, a preliminary conclusion can be drawn by statistical analysis: the calculation power requirements of a Hash Join Operator, a Json reader, a Csv reader and a Sorter Operator are continuously improved, the calculation power needs to be supplemented in time, otherwise, a computing system is busy, the operation efficiency is low, and the improvement of the distribution proportion of the operators in the programmable hardware FPGA module can be considered. As shown in fig. 7b, the computational power requirement of the Orc reader (Orc read operator) is decreasing, so that the distribution ratio of such operators in the redundant programmable hardware FPGA module can be released, otherwise, the computational resource waste may be caused; the Filter Operator belongs to the normal observation range to be continuously observed, and the distribution proportion of the Operator is not required to be adjusted temporarily.
In a complete embodiment of the present invention, as shown in fig. 8, it is a flowchart illustrating a complete operation of a system for adjusting the distribution of types of computation algorithms in a computing system according to an embodiment of the present invention. Firstly, a user creates a logic library and a logic table in a database service system and stores the logic library and the logic table into a metadata module (meta module). Then, a user submits SQL query data in a program of the user based on a database service system to implement corresponding data query operation, the SQL query data process mainly analyzes the data processing request of the user through an analysis module (Performance & Cost Analyzer), an SQL optimization control module (SQL Optimizer), a Physical Resource allocation module (Physical Resource manager), an Execution scheduling module (Execution schedule), an Execution module (Stage Execution) and a merge Result module (Result target), a logic Execution plan tree is formed, an Execution plan is generated, and the computing system provides computing power for the Execution plan. And finally, gradually summarizing and returning the data required by the user.
According to the invention, the calculation operator can be subjected to operand data statistics and calculation time consumption of the calculation operator can be also subjected to statistics in the calculation process through the monitoring module (Monitor), the information is finally collected into the uniform Resource management module (Resource Manager), and then the FPGA management module (FPGA Manager) adjusts the calculation operator type and distribution proportion in the FPGA module in data processing, and synchronizes the information of the adjusted calculation operator type and distribution proportion in the FPGA module into the metadata module (Meta module), so that accurate calculation support is provided for the next execution plan.
In the practical application process, when the programmable structure hardware FPGA module is used, firstly, the logic gate circuit allocation in the FPGA module is planned in advance according to the past experience, and the calculation operator with the largest possible operand requirement is written into the FPGA module in advance. Then, the trend situation of the load on the whole computing system in the data processing process in the next period of time is monitored and collected, the operand requirements of the computing operators in the future period of time T are predicted, and the computing operators with the largest predicted operand requirements are determined to be the computing operators needing the computation support provided by the programmable hardware FPGA module. And the database service system determines whether to dynamically adjust the calculation operator in the FPGA module or not by comparing the difference between the calculation operator plan in the preset FPGA module and the calculation operator situation predicted in the on-line actual data processing process. If some of the differences are stable enough (e.g., more than 10 days or 1 month) and reach or exceed a threshold range preset by the database service system (e.g., 5%), the FPGA manager configuration module (Partial Reconfiguration) of the FPGA module is triggered to make adjustments. And re-planning the arrangement of the logic gate circuit in the FPGA module according to the latest calculation operator distribution proportion predicted in the current actual data processing process, and gradually adjusting and replacing the calculation operator distribution proportion in the FPGA module. When the adjusted database business system receives new SQL query data, an SQL adjuster module (SQL Optimizer) of the database business system senses the adjusted distribution proportion information of the calculation operators and generates a latest execution plan for the SQL query data of the user. If some calculation operators are matched with the latest calculation operator list of the FPGA, the calculation operators are pushed to the FPGA module to be executed, otherwise, the calculation operators are executed in the CPU module, and the statistical information of the calculation operators is continuously collected. The whole process is repeated, the database service system continuously runs to collect data, the data are dynamically fed back to the FPGA manager arrangement module of the FPGA module, and then the types and the distribution proportion of calculation operators in the FPGA module are dynamically adjusted, so that the operation efficiency of the calculation system in the data processing process of the database service system is gradually improved.
It should be noted that the data processing process described in the present invention is not limited to the data processing task of the database service system, and the computing system is not limited to only accelerate the data processing task of the database service system, and the method for adjusting the distribution of the types of the computation operators in the computing system described in the present invention can be applied to accelerate different types of data processing tasks and computation scenarios.
By adopting the method for adjusting the distribution of the types of the calculation operators in the calculation system, the prediction demand of the calculation operators in the future time period can be obtained by analyzing the operation data records of the calculation operators in the data processing process, and then the types and the distribution proportion of the calculation operators realized on the calculation system in a programmable hardware mode can be accurately adjusted, so that the calculation power of a programmable hardware module can be served for the busiest data processing task as much as possible, and the operation efficiency of the whole calculation system is improved.
Corresponding to the method for adjusting the distribution of the calculation operator types in the computing system, the invention also provides a device for adjusting the distribution of the calculation operator types in the computing system. Since the embodiment of the apparatus is similar to the method embodiment described above, the description is simple, and please refer to the description of the method embodiment section, and the following description describes an embodiment of an apparatus for adjusting the distribution of the types of calculation algorithms in a calculation system, which is only illustrative. Fig. 2 is a schematic diagram of an apparatus for adjusting distribution of computing operators in a computing system according to an embodiment of the present invention.
The device for adjusting the distribution of the types of the calculation operators in the calculation system comprises the following parts:
the monitoring unit 201 is configured to obtain an operand data record of a calculation operator in actual data processing of the computing system, where the calculation operator is to complete a data processing task.
In the embodiment of the present invention, the computing system may be a heterogeneous hardware acceleration computing system for processing database data, which is composed of a CPU module and a programmable hardware FPGA module, and often includes a GPU module.
The calculation operator is used for finishing a data processing task. The calculation operators may have different meanings for different calculation scenarios. The computing system for the database in this embodiment may include a Filter Operator, a Table Scan Operator, a Hash Join Operator, an Aggregation Operator, a Sort Operator, and a project Operator in the SQL processing task. As shown in fig. 4, in a specific implementation process of an application scenario flowchart of a computing system, a user sends a Data processing request to a DS (Data Store; database) through an APP application, Load Balancer (Load Balancer module) realizes Load balancing of the Data processing request, a Front Node module (Front Node Pool) receives the Data processing request distributed by the Load Balancer module, analyzes the Data processing request, distributes the Data processing request to different FN (Front Node; Front Node), generates a corresponding execution plan, sends the execution plan to a CN (computer Node; computing Node), and returns corresponding Data stored in the DS (Data Store; database). The execution plan is an AST (abstract syntax tree) composed of a number of calculation operators in a set logical order.
In the process of executing the execution plan, the calculation operators are respectively distributed to the CPU, the GPU and corresponding units in the FPGA module which is set as the corresponding calculation operators to execute. The types and the distribution proportions of the calculation operators preset in the programmable hardware FPGA module are usually set in advance according to manual experience, and only the operation tasks of the specific calculation operators can be executed after the setting. Therefore, in the process of accelerating the calculation of data processing, the calculation operator with large actual demand of the calculation amount may not obtain enough calculation power due to improper setting, and the operator with small actual demand of the calculation amount occupies calculation power resources of the FPGA module for a long time, so that the calculation efficiency of the whole calculation system is low.
Therefore, the invention provides a method for adjusting the distribution of the types of calculation operators in a calculation system, which has the premise that the calculation amount data of the calculation operators in the actual data processing process of the whole calculation system is monitored, recorded and statistically gathered, so that the calculation amount requirement of the calculation system on each calculation operator is mastered. The monitoring and recording of the operand data of the calculation operator can be carried out in different modes according to different requirements. One possible way is to monitor the computation load history data of each computation operator of the computing system, which mainly considers that the computation demand in the computing system often has the continuity of the history, and can use the history data to judge the future computation demand. One specific implementation of the method is described below.
Fig. 6 is a schematic diagram of monitoring operand data of a calculation operator on a computing system according to an embodiment of the present invention. Different types of calculation operators are represented by different colors, including: filter Operator, Table Scan Operator, Hash join Operator, Aggregation Operator, Sort Operator, and Project Operator. Analyzing the operand data records monitored in the period of 11 month 1 to 11 month 07, it can be found that, among the most time-consuming several types of calculation operators, the requirements of a Filter Operator and a Table Scan Operator on the calculation power are reduced, while the requirements of a Hash Operator and an aggregation Operator on the calculation power are continuously increased, the calculation power requirement of a Sort Operator is relatively stable, and the calculation power requirement of a Project Operator is fluctuated but the overall fluctuation is not large.
And the resource manager unit 202 is configured to obtain the predicted demand of the future time period T for the calculation operator on the calculation system according to the operand data record of the calculation operator.
The monitoring unit 201 obtains the operand data record in the predetermined time period of the calculation operator in the actual data processing of the calculation system. Data preparation is done for the resource manager unit 202 to predict the future time period T for the predicted demand of the computing operators on the computing system. In the resource manager unit 202, the predicted demand amount of the computing operator on the computing system for the future time period T can be obtained according to the above monitored operand data record of the computing operator.
By continuously monitoring and collecting the trend situation of the load on the whole computing system in the data processing process, the computing operator of which the predicted demand reaches or exceeds the preset demand threshold can be determined as the computing operator which needs the programmable hardware FPGA module to provide calculation force support. The above-mentioned monitored predicted demand amount of the calculation operator is a manner of measuring the demand of the operation amount with respect to the predicted demand amount of the operation amount, and specifically, the operation time may be used as a measurement index, that is, the operation amount demand of a certain calculation operator is the time consumed for executing the calculation operator within the determined time period. The time to execute a certain computational operator includes the time to execute the computational operator by the CPU, GPU, and FGPA or other programmable hardware. At the same time, a considerable number of calculation operators of this type can be executed simultaneously, the running time of each calculation operator being counted and the calculations being summed up. Of course, the calculation amount requirement of each calculation operator can also be measured by using the occupation proportion data of the calculation operator in the whole time consumed by the calculation operator. And determining the most time-consuming computing operators as the computing operators needing the programmable hardware FPGA module to provide computing power support.
For example: by analyzing the operand data records monitored in the period from 11 month 1 to 11 month 07, it can be found that, among the most time-consuming several types of calculation operators, the requirements of the Filter Operator and the Table scanner Operator on the calculation power are reduced, while the requirements of the Hash Operator and the Aggregation Operator are continuously increased, the calculation power requirement of the Sort Operator is relatively stable, and the calculation power requirement of the Project Operator is fluctuated but the overall fluctuation is not large. Therefore, the demand tendency for the operation amount can be derived before the future time period T comes: 1) the calculation power requirements of a Hash join Operator and an Aggregation Operator are continuously improved, the calculation power needs to be supplemented in time, otherwise, a calculation system is busy, the calculation efficiency is low, and the distribution proportion of the calculation operators in the programmable hardware FPGA module can be improved; 2) the calculation requirements of a Filter Operator and a Table scanner Operator are reduced, so that the distribution proportion of the calculation operators in the programmable hardware FPGA module can be released, otherwise, the waste of calculation resources can be caused; 3) the Sort Operator and Project Operator belong to the normal fluctuation range, and the distribution proportion of the calculation operators is not needed to be adjusted temporarily.
Specifically, the predicted demand of the calculation operator on the calculation system in the future time period T is obtained according to the monitored operand data record of the calculation operator, and the method can be implemented as follows: firstly, acquiring an operand data record sample of a calculation operator in a preset time period and an actual demand sample of a future time period T matched with the operand data record sample of the calculation operator in the preset time period for the calculation operator; and then training a preset deep neural network model aiming at the actual demand sample of the calculation operator by using the operand data record sample of the calculation operator in the preset time period and the future time period T matched with the operand data record sample of the calculation operator in the preset time period, and finally obtaining a calculation operator demand prediction model. And the monitored operand data records of the calculation operator are input into the calculation operator demand prediction model in real time, so that the predicted demand of the calculation operator on the calculation system in the future time period T can be accurately obtained. The calculation operator demand prediction model is a deep neural network model for predicting the prediction demand of the calculation operator in the future time period T according to the operand data record of the calculation operator in the predetermined time period. It should be noted that the prediction model according to the present invention is not limited to the above-mentioned training model obtained by collecting training samples to train a preset deep neural network model, and may also be implemented by a logistic regression model. In a specific implementation, a suitable model may be selected by a performance comparison test.
A programmable hardware management unit 203, configured to adjust, according to a predicted demand of a computing operator on the computing system, the computing operator implemented in a programmable hardware manner on the computing system before the future time period T comes, where the adjustment includes at least one of: the type of the calculation operator realized by the programmable hardware mode and the distribution proportion of the calculation operator realized by the programmable hardware mode.
After the resource manager unit 202 obtains the predicted demand of the computing operator on the computing system in the future time period T, the programmable hardware management unit 203 may adjust the type and distribution ratio of the computing operator implemented in the programmable hardware on the computing system in advance before the future time period T by analyzing the predicted demand.
Specifically, the type and the distribution proportion of the calculation operator realized in the programmable hardware mode are accurately adjusted according to the predicted demand of the calculation operator on the calculation system within the preset time period which is monitored in advance, and the method can be realized by adopting the following mode:
1) according to the predicted demand of the calculation operators on the calculation system, firstly, the calculation operators which reach or exceed a preset demand threshold value in the calculation operators on the calculation system are determined. Determining the type of the computing operator that meets or exceeds the preset demand threshold as the type of computing operator that needs to be implemented in programmable hardware on the computing system before the future time period T. And adjusting the type of the calculation operator which is preset on the computing system and is realized in a programmable hardware mode before the future time period T comes according to the type of the calculation operator which is realized in a programmable hardware mode on the computing system. In a specific application process, the type of the calculation operator which needs to be implemented on the computing system in a programmable hardware manner can be compared with the actual type of the calculation operator which is preset on the computing system and implemented in a programmable hardware manner, whether the calculation operator of the corresponding type exists on the computing system is judged, and if not, the type of the calculation operator which is implemented on the computing system in a programmable hardware manner of the corresponding type is added before the future time period T comes.
Because the load condition of the calculation operators is usually changed continuously in the data processing process of the database system, not only are the demands of different types of calculation operators on the calculation power different, but also the demands of the same type of operators on the calculation power in different time periods may be different, namely, the calculation power demands have the characteristic of periodicity in time. Therefore, the load of the computing operator monitored during the above-mentioned determined time period may not always be able to reach or exceed the preset load threshold. Therefore, the type or distribution ratio of the calculation operators in the FPGA module needs to be adjusted in real time. Fig. 5a and fig. 5b are schematic diagrams of a pre-adjustment distribution of computational algorithms and a post-adjustment distribution of computational algorithms in a computing system according to an embodiment of the present invention. In the previous execution plan, it may be that two corresponding Table Scan operators (Table Scan operators) in fig. 5a need to be accelerated by using a programmable hardware FPGA module; in the latter execution plan, due to the change of statistical information of different calculation operators, the scheduling layer of the programmable hardware FPGA module automatically balances the types of the calculation operators. The method comprises the steps of loading an Aggregation Operator and a join Operator which are really loaded the highest in a recent period of time into an FPGA module according to a certain proportion, and unloading one of the Table ScanOperators with lower calculation force requirements. Therefore, from the perspective of a user, in the process of data processing of the same SQL by the database system, when the data processing is performed in different time periods, the FPGA module can be dynamically adjusted to provide different computational support. It should be noted that the operand data record of the calculation operator includes at least one of occupation ratio data and time-consuming data of the calculation operator in the data processing process.
2) And determining the calculation operators which reach or exceed a preset demand threshold value in the calculation operators on the calculation system according to the predicted demand of the calculation operators on the calculation system. And determining the predicted demand of the calculation operator reaching or exceeding the preset demand threshold as the demand of the calculation operator which is realized on the calculation system in a programmable hardware mode before the future time period T arrives. According to the demand of the calculation operator realized in the programmable hardware mode on the calculation system, the distribution proportion of the calculation operator realized in the programmable hardware mode preset on the calculation system is adjusted before the future time period T comes.
In a specific application process, one implementation manner is as follows: and comparing the demand quantity of the calculation operators realized in the programmable hardware mode on the computing system with the distribution condition of the calculation operators realized in the programmable hardware mode preset on the computing system, and if the matching degree is lower than a preset index, adjusting the distribution proportion of the calculation operators realized in the programmable hardware mode of the corresponding type on the computing system before the future time interval T comes. The other mode is as follows: when the demand of a calculation operator realized in a programmable hardware mode on a calculation system is monitored to be reduced, reducing the distribution proportion of the calculation operator realized in the programmable hardware mode of a corresponding type before a future time period T comes; when the demand quantity of the calculation operators realized in the programmable hardware mode on the calculation system is monitored to be increased, the distribution proportion of the calculation operators of the corresponding types realized in the programmable hardware mode is increased before a future time period T comes; when the demand quantity of the calculation operator realized in the programmable hardware mode on the calculation system is monitored to be stable in a preset interval range, the distribution proportion of the calculation operator realized in the programmable hardware mode of the corresponding type on the calculation system is kept unchanged.
By adopting the device for adjusting the distribution of the types of the calculation operators in the calculation system, the calculation amount data records of the calculation operators in the data processing process can be obtained through the monitoring unit, the resource manager analyzes the calculation amount data records to obtain the prediction demand of the calculation operators in the future time period, and then the type and the distribution proportion of the calculation operators realized on the calculation system in a programmable hardware mode are accurately adjusted through the programmable hardware management unit, so that the calculation power of the programmable hardware module can be served for the busiest data processing task as much as possible, and the calculation efficiency of the whole calculation system is improved.
Corresponding to the method for adjusting the distribution of the types of the calculation operators in the calculation system, the invention also provides electronic equipment. Fig. 3 is a schematic view of an electronic device according to an embodiment of the invention.
The electronic device provided by the invention specifically comprises: a processor 302 and a memory 301. The memory 301 is used for storing a program of a method for adjusting the distribution of the computational operators in a computing system, and after the device is powered on and runs the program of the method for adjusting the distribution of the computational operators in the computing system through the processor 302, the first step is executed: acquiring operand data records of a calculation operator in actual data processing of a computing system, wherein the calculation operator is used for completing a data processing task; step two: according to the operand data record of the calculation operator, the prediction demand of the future time period T on the calculation operator on the calculation system is obtained; step three: adjusting, according to the predicted demand of the computing operator on the computing system, the computing operator implemented in programmable hardware on the computing system before the future time period T, the adjusting including at least one of: the type of the calculation operator realized by the programmable hardware mode and the distribution proportion of the calculation operator realized by the programmable hardware mode.
Corresponding to the method for adjusting the distribution of the computational operators in the computing system, the invention also provides a storage device, which stores a program of the method for adjusting the distribution of the computational operators in the computing system, wherein the program is executed by a processor and executes the following steps: acquiring operand data records of a calculation operator in actual data processing of a computing system, wherein the calculation operator is used for completing a data processing task; step two: according to the operand data record of the calculation operator, the prediction demand of the future time period T on the calculation operator on the calculation system is obtained; step three: adjusting, according to the predicted demand of the computing operator on the computing system, the computing operator implemented in programmable hardware on the computing system before the future time period T, the adjusting including at least one of: the type of the calculation operator realized by the programmable hardware mode and the distribution proportion of the calculation operator realized by the programmable hardware mode.
Although the present invention has been described with reference to the preferred embodiments, it is not intended to limit the present invention, and those skilled in the art can make variations and modifications without departing from the spirit and scope of the present invention.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

Claims (17)

1. A method for adjusting a distribution of computing operator types in a computing system, comprising:
acquiring operand data records of at least one part of types of calculation operators in actual data processing of a computing system, wherein the calculation operators are used for completing data processing tasks;
according to the operand data record of the calculation operator, the prediction demand of the future time period T on the calculation operator on the calculation system is obtained;
adjusting, according to the predicted demand of the computing operator on the computing system, the computing operator implemented in programmable hardware on the computing system before the future time period T, the adjusting including at least one of: the type of the calculation operator realized by the programmable hardware mode and the distribution proportion of the calculation operator realized by the programmable hardware mode.
2. The method for adjusting distribution of computation operator types in a computing system according to claim 1, wherein the adjusting computation operators implemented in programmable hardware on the computing system before the future time period T according to the predicted demand of computation operators on the computing system comprises:
determining a calculation operator which reaches or exceeds a preset demand threshold value in the calculation operators on the computing system according to the predicted demand of the calculation operators on the computing system;
determining the type of the computing operator meeting or exceeding a preset demand threshold as the type of the computing operator needing to be implemented in programmable hardware on the computing system before the future time period T comes;
and adjusting the type of the calculation operator which is preset on the computing system and is realized in a programmable hardware manner before the future time interval T comes according to the type of the calculation operator which is required to be realized in a programmable hardware manner on the computing system.
3. The method according to claim 2, wherein the adjusting, according to the type of the computation operator implemented in a programmable hardware manner on the computing system, the type of the computation operator implemented in a programmable hardware manner preset on the computing system before the future time period T comes includes:
comparing the type of the calculation operator which needs to be realized on the computing system in a programmable hardware mode with the actual type of the calculation operator which is preset on the computing system and realized in a programmable hardware mode, judging whether the calculation operator of the corresponding type exists on the computing system, and if not, increasing the type of the calculation operator of the corresponding type on the computing system in the programmable hardware mode before the future time interval T comes.
4. The method for adjusting distribution of computation operator types in a computing system according to claim 1, wherein the adjusting computation operators implemented in programmable hardware on the computing system before the future time period T according to the predicted demand of computation operators on the computing system comprises:
determining a calculation operator which reaches or exceeds a preset demand threshold value in the calculation operators on the computing system according to the predicted demand of the calculation operators on the computing system;
determining the predicted demand of the calculation operator which reaches or exceeds the preset demand threshold value as the demand of the calculation operator which is realized on the calculation system in a programmable hardware mode before the future time period T comes;
and adjusting the distribution proportion of the calculation operators which are realized in a programmable hardware manner and preset on the calculation system before the future time period T comes according to the demand of the calculation operators which are realized in a programmable hardware manner on the calculation system.
5. The method for adjusting distribution of computing operators in a computing system according to claim 4, wherein the adjusting of the distribution ratio of the computing operators implemented in programmable hardware preset on the computing system before the future time period T according to the demand of the computing operators implemented in programmable hardware on the computing system specifically comprises:
when the demand of the calculation operators which are realized in a programmable hardware manner on the computing system is reduced, reducing the distribution proportion of the calculation operators which are realized in a programmable hardware manner of corresponding types before the future time period T comes;
when the demand of the calculation operators which are realized in a programmable hardware manner on the computing system is increased, increasing the distribution proportion of the calculation operators which are realized in a programmable hardware manner of corresponding types before the future time period T comes;
when the demand quantity of the calculation operator realized in the programmable hardware mode on the calculation system is stable in a preset interval range, the distribution proportion of the calculation operator of the corresponding type realized in the programmable hardware mode on the calculation system is kept unchanged.
6. The method for adjusting distribution of computing operators in a computing system according to claim 4, wherein the adjusting of the distribution ratio of the computing operators implemented in programmable hardware preset on the computing system before the future time period T according to the demand of the computing operators implemented in programmable hardware on the computing system specifically comprises:
and comparing the demand quantity of the calculation operators realized in the programmable hardware mode on the calculation system with the distribution situation of the calculation operators realized in the programmable hardware mode preset on the calculation system, and if the matching degree is lower than a preset index, adjusting the distribution proportion of the calculation operators realized in the programmable hardware mode of the corresponding type on the calculation system before the future time interval T comes.
7. The method for adjusting distribution of computation operator types in a computing system according to claim 1, wherein the obtaining predicted demand of future time period T for computation operators on the computing system according to operand data records of the computation operators comprises:
and inputting the operand data records of the calculation operator into a preset calculation operator demand prediction model to obtain the prediction demand of the calculation operator on the calculation system in the future time period T, wherein the calculation operator demand prediction model is a deep neural network model for predicting the prediction demand of the calculation operator in the future time period T according to the operand data records of the calculation operator in the preset time period.
8. The method for adjusting the distribution of computation operator types in a computing system according to claim 7, further comprising:
acquiring an operand data record sample of a calculation operator in the preset time period;
obtaining an actual demand sample of the calculation operator in a future time period T matched with the operand data record sample of the calculation operator in the preset time period;
training the deep neural network model by using the operand data record samples of the calculation operators in the preset time period and the actual demand samples of the calculation operators in the future time period T matched with the operand data record samples of the calculation operators in the preset time period, so as to obtain the calculation operator demand prediction model.
9. The method for adjusting distribution of computation operator types in a computing system according to claim 1, wherein the obtaining of operand data records of computation operators in actual data processing of the computing system specifically comprises:
acquiring operand data records of calculation operators in the calculation system for processing data processing requests of clients in a database;
accordingly, the calculation operators are all the dedicated calculation programs provided for the data processing tasks on the calculation systems in the database.
10. The method for adjusting the distribution of computation operator types in a computing system according to claim 1, wherein the computing system is a heterogeneous hardware accelerated computing system for processing database data, which is composed of a CPU module and a programmable hardware module.
11. The method for adjusting distribution of calculation operator types in a calculation system according to claim 1, wherein the operand data records of the calculation operators comprise at least one of occupancy proportion data and usage time data of the calculation operators in data processing.
12. The method for adjusting distribution of computation operator types in a computing system according to claim 1, wherein the predicted demand amount of the computation operator is the predicted time-consuming time of the computation operator in the data processing process.
13. An apparatus for adjusting distribution of computing operator types in a computing system, comprising: the system comprises a monitoring unit, a resource manager unit and a programmable hardware management unit;
the monitoring unit is used for acquiring operand data records of a calculation operator in actual data processing of the computing system, and the calculation operator is used for completing a data processing task;
the resource manager unit is used for acquiring the predicted demand of the future time period T on the calculation operator on the calculation system according to the operand data record of the calculation operator;
the programmable hardware management unit is configured to, according to a predicted demand of a computing operator on the computing system, adjust the computing operator implemented in a programmable hardware manner on the computing system before the future time period T comes, where the adjustment includes at least one of: the type of the calculation operator realized by the programmable hardware mode and the distribution proportion of the calculation operator realized by the programmable hardware mode.
14. A system for adjusting a distribution of computational operator types in a computing system, comprising: the computing system of claim 13 wherein the means for adjusting the distribution of the type of computing algorithms.
15. An electronic device, comprising:
a processor; and
a memory for storing a program of a method for adjusting a distribution of computational operators in a computing system, the apparatus performing the following steps after being powered on and running the program of the method for adjusting a distribution of computational operators in the computing system by the processor:
acquiring operand data records of a calculation operator in actual data processing of a computing system, wherein the calculation operator is used for completing a data processing task;
according to the operand data record of the calculation operator, the prediction demand of the future time period T on the calculation operator on the calculation system is obtained;
adjusting, according to the predicted demand of the computing operator on the computing system, the computing operator implemented in programmable hardware on the computing system before the future time period T, the adjusting including at least one of: the type of the calculation operator realized by the programmable hardware mode and the distribution proportion of the calculation operator realized by the programmable hardware mode.
16. A storage device storing a program for a method of adjusting distribution of computation operator types in a computing system, the program being executed by a processor and performing the steps of:
acquiring operand data records of a calculation operator in actual data processing of a computing system, wherein the calculation operator is used for completing a data processing task;
according to the operand data record of the calculation operator, the prediction demand of the future time period T on the calculation operator on the calculation system is obtained;
adjusting, according to the predicted demand of the computing operator on the computing system, the computing operator implemented in programmable hardware on the computing system before the future time period T, the adjusting including at least one of: the type of the calculation operator realized by the programmable hardware mode and the distribution proportion of the calculation operator realized by the programmable hardware mode.
17. A method for adjusting a distribution of computing operator types in a computing system, comprising:
acquiring operand data records of at least one part of types of calculation operators in actual data processing of a computing system, wherein the calculation operators are used for completing data processing tasks;
according to the operand data record of the calculation operator, the prediction demand of the future time period T on the calculation operator on the calculation system is obtained;
according to the predicted demand of the calculation operator on the calculation system, adjusting the calculation operator which is realized by the calculation system in a mode of a hardware accelerator before the future time period T comes, wherein the adjustment comprises at least one of the following items: the type of the calculation operator realized by the hardware accelerator mode and the distribution proportion of the calculation operator realized by the hardware accelerator mode.
CN201910189636.8A 2019-03-13 2019-03-13 Method, device and system for adjusting distribution of calculation operator types in calculation system Pending CN111694653A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910189636.8A CN111694653A (en) 2019-03-13 2019-03-13 Method, device and system for adjusting distribution of calculation operator types in calculation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910189636.8A CN111694653A (en) 2019-03-13 2019-03-13 Method, device and system for adjusting distribution of calculation operator types in calculation system

Publications (1)

Publication Number Publication Date
CN111694653A true CN111694653A (en) 2020-09-22

Family

ID=72475658

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910189636.8A Pending CN111694653A (en) 2019-03-13 2019-03-13 Method, device and system for adjusting distribution of calculation operator types in calculation system

Country Status (1)

Country Link
CN (1) CN111694653A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199196A (en) * 2020-10-21 2021-01-08 上海交通大学 Resource allocation method, medium and server
CN112631781A (en) * 2020-12-29 2021-04-09 上海商汤智能科技有限公司 Operator execution method and device, electronic equipment and storage medium
US11775584B1 (en) * 2019-04-26 2023-10-03 Amazon Technologies, Inc. Dynamically scaling query plan operations for query processing
CN117933496A (en) * 2024-03-21 2024-04-26 深圳威尔视觉科技有限公司 Calculation force demand prediction method and device and computer equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103118273A (en) * 2012-12-12 2013-05-22 张力 Method for forecasting memory resource allocation of security protection video hard coding chip
CN103390070A (en) * 2012-05-07 2013-11-13 北京大学深圳研究生院 Reconfigurable operator array structure
CN105786808A (en) * 2014-12-15 2016-07-20 阿里巴巴集团控股有限公司 Method and apparatus for executing relation type calculating instruction in distributed way
CN106506266A (en) * 2016-11-01 2017-03-15 中国人民解放军91655部队 Network flow analysis method based on GPU, Hadoop/Spark mixing Computational frame
CN106528171A (en) * 2016-11-24 2017-03-22 郑州云海信息技术有限公司 Method, device and system for designing interface between heterogeneous computing platforms
EP3226186A1 (en) * 2016-03-31 2017-10-04 DextraData GmbH Capacity analysis and planning tool, in particular for an information technology (infrastructure)
US20170308504A1 (en) * 2016-04-20 2017-10-26 International Business Machines Corporation System and method for hardware acceleration for operator parallelization with streams
CN107980145A (en) * 2015-06-29 2018-05-01 因斯布鲁克大学 Quantum treatment apparatus and method
US20180218038A1 (en) * 2017-01-30 2018-08-02 International Business Machines Corportation Database optimization based on forecasting hardware statistics using data mining techniques
CN108459905A (en) * 2017-02-17 2018-08-28 华为技术有限公司 Resource pool method for planning capacity and server

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103390070A (en) * 2012-05-07 2013-11-13 北京大学深圳研究生院 Reconfigurable operator array structure
CN103118273A (en) * 2012-12-12 2013-05-22 张力 Method for forecasting memory resource allocation of security protection video hard coding chip
CN105786808A (en) * 2014-12-15 2016-07-20 阿里巴巴集团控股有限公司 Method and apparatus for executing relation type calculating instruction in distributed way
CN107980145A (en) * 2015-06-29 2018-05-01 因斯布鲁克大学 Quantum treatment apparatus and method
EP3226186A1 (en) * 2016-03-31 2017-10-04 DextraData GmbH Capacity analysis and planning tool, in particular for an information technology (infrastructure)
US20170308504A1 (en) * 2016-04-20 2017-10-26 International Business Machines Corporation System and method for hardware acceleration for operator parallelization with streams
CN106506266A (en) * 2016-11-01 2017-03-15 中国人民解放军91655部队 Network flow analysis method based on GPU, Hadoop/Spark mixing Computational frame
CN106528171A (en) * 2016-11-24 2017-03-22 郑州云海信息技术有限公司 Method, device and system for designing interface between heterogeneous computing platforms
US20180218038A1 (en) * 2017-01-30 2018-08-02 International Business Machines Corportation Database optimization based on forecasting hardware statistics using data mining techniques
CN108459905A (en) * 2017-02-17 2018-08-28 华为技术有限公司 Resource pool method for planning capacity and server

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
STEFAN WERNER等: "Automated composition and execution of hardware-accelerated operator graphs", 2015 10TH INTERNATIONAL SYMPOSIUM ON RECONFIGURABLE COMMUNICATION-CENTRIC SYSTEMS-ON-CHIP (RECOSOC), 3 September 2015 (2015-09-03), pages 1 - 8 *
吕小巧: "一种基于FPGA的改进遗传算法硬件设计研究", 中国优秀硕士学位论文全文数据库信息科技辑, 15 August 2010 (2010-08-15), pages 140 - 67 *
陆俊;李俊;李宁;刘松;: "资源管理系统中用户资源需求量预测及其调度算法", 电子技术, no. 10, 25 October 2009 (2009-10-25) *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11775584B1 (en) * 2019-04-26 2023-10-03 Amazon Technologies, Inc. Dynamically scaling query plan operations for query processing
CN112199196A (en) * 2020-10-21 2021-01-08 上海交通大学 Resource allocation method, medium and server
CN112631781A (en) * 2020-12-29 2021-04-09 上海商汤智能科技有限公司 Operator execution method and device, electronic equipment and storage medium
CN117933496A (en) * 2024-03-21 2024-04-26 深圳威尔视觉科技有限公司 Calculation force demand prediction method and device and computer equipment
CN117933496B (en) * 2024-03-21 2024-06-07 深圳威尔视觉科技有限公司 Calculation force demand prediction method and device and computer equipment

Similar Documents

Publication Publication Date Title
CN111694653A (en) Method, device and system for adjusting distribution of calculation operator types in calculation system
US8224938B2 (en) Data processing system and method for iteratively re-distributing objects across all or a minimum number of processing units
US9430288B2 (en) Job scheduling based on historical job data
CN109144724A (en) A kind of micro services resource scheduling system and method
US9870269B1 (en) Job allocation in a clustered environment
CN107861796B (en) Virtual machine scheduling method supporting energy consumption optimization of cloud data center
CN112379935B (en) Spark performance optimization control method, device, equipment and storage medium
CN111143143B (en) Performance test method and device
CN110377519B (en) Performance capacity test method, device and equipment of big data system and storage medium
JP2016042284A (en) Parallel computer system, management device, method for controlling parallel computer system, and management device control program
WO2019226317A1 (en) Tune resource setting levels for query execution
CN117666947A (en) Data storage method, device, electronic equipment and computer readable medium
CN114138597A (en) Operating system performance tuning device, method, equipment and storage medium
Singhal et al. Predicting job completion time in heterogeneous mapreduce environments
CN117234733A (en) Distributed system task allocation method, system, storage medium and equipment
CN110069319B (en) Multi-target virtual machine scheduling method and system for cloud resource management
Marinho et al. LABAREDA: a predictive and elastic load balancing service for cloud-replicated databases
Sen et al. Predictive price-performance optimization for serverless query processing
EP3599547A1 (en) Elastic storage volume type selection and optimization engine for public cloud environments
Luo et al. Towards efficiently supporting database as a service with QoS guarantees
Omondi et al. Scalability and Nonlinear Performance Tuning in Storage Servers
CN118245234B (en) Distributed load balancing method and system based on cloud computing
CN118037245A (en) Comprehensive management and control method, equipment and medium for energy sources of power computing facility
CN114490298A (en) Data processing method and device of server cluster, processor and electronic equipment
US11720400B2 (en) Prescriptive analytics-based performance-centric dynamic serverless sizing

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