Operator unloading method and system of vectorization execution engine based on DPU heterogeneous architecture
By adopting the DPU heterogeneous architecture in the vectorized execution engine, intercepting and converting execution plans, and offloading high-resource-consuming operators to the DPU network card, the problems of frequent CPU interruptions and memory copying in the existing technology are solved, and efficient data processing and performance improvement are achieved.
Patent Information
- Application Number
- CN202411584927.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-11-07
AI Technical Summary
In the prior art, vectorized execution engines rely on CPU SIMD instructions, resulting in CPU interruptions and frequent memory copying during computation-intensive tasks, resulting in performance losses.
Using a vectorized execution engine based on DPU heterogeneous architecture, the physical execution plan is intercepted through the Spark plug-in, and converted into a query plan that satisfies the cross-language serialization protocol of relational algebra, and operators whose computing resource consumption is higher than the preset standard are offloaded from the CPU to the DPU network card for data processing.
Through operator offloading, the CPU performance bottlenecks under large data volume and I/O-intensive computing are solved, and the DPU network card is used to provide high-performance computing capabilities, which improves the execution efficiency and throughput of query tasks.
Smart Images

Figure CN119781850A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of operator offloading, and in particular to an operator offloading method and system of a vectorized execution engine based on a DPU heterogeneous architecture. Background Art
[0002] Apache Spark is an open source distributed computing system that can be used for batch processing, interactive query (SparkSQL), real-time stream processing (Spark Streaming), machine learning (Spark MLlib), and graph computing (GraphX). Spark uses memory to load and save data and perform iterative calculations to reduce disk overflow, and supports multiple high-level programming languages such as Java, Scala, Python, and R, which enables the open source distributed computing system to cope with various complex big data application scenarios.
[0003] In the prior art, vectorized execution engines rely on the SIMD instructions (Single Instruction, Multiple Data) of the CPU (central processing unit) to process data in batches. For some computationally intensive tasks, such as complex aggregation operations or join operations, a large number of virtual function calls will be generated, causing the CPU to be interrupted, which in turn causes the calculation and scheduling to occupy the CPU resources and lose performance; the vectorized execution engine still needs to perform memory copy operations through the CPU, and frequent copying will increase memory overhead, thereby affecting the performance of the entire interactive query execution task. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides an operator offloading method and system for a vectorized execution engine based on a DPU heterogeneous architecture to eliminate or improve one or more defects existing in the prior art and solve the problem of low data processing performance of query tasks in the prior art.
[0005] One aspect of the present invention provides an operator offloading method of a vectorized execution engine based on a DPU heterogeneous architecture, wherein the DPU heterogeneous architecture is applied to an open source distributed computing system, and the DPU heterogeneous architecture includes a CPU and a DPU network card; the method includes the following steps:
[0006] Obtaining the query language input by the user, parsing the query language and obtaining a logical execution plan for the query task, adding a physical execution phase operation to the logical execution plan for the query task to obtain a physical execution plan; the physical execution plan is a strategy for the open source distributed computing system to execute the query task;
[0007] The physical execution plan is intercepted by a Spark plug-in, and based on set rules, the physical execution plan is converted into a query plan that satisfies the relational algebra cross-language serialization protocol and transmitted to the vectorized engine execution path, and the vectorized execution engine is called to perform data processing on multiple operators in the query plan; the vectorized engine execution path is a path for data processing by calling the vectorized execution engine; the initial execution path is a path for data processing by the original execution engine in the open source distributed computing system;
[0008] Call the function function of the DPU heterogeneous computing version in the function system of the vectorized execution engine, calculate the computing resource consumption of multiple operators that can be processed by the vectorized execution engine in the query plan through the function function, and unload the operators whose computing resource consumption is higher than the preset standard from the original CPU of the open source distributed computing system to the DPU network card, so as to realize the operator unloading of the vectorized execution engine and perform data processing.
[0009] In some embodiments, the method further comprises:
[0010] The data in the processing of the DPU network card and the CPU are expressed through column vectors and transmitted in the open source distributed computing system.
[0011] In some embodiments, the vectorized execution engines include: Velox, ClickHouse, and Apache Arrow.
[0012] In some embodiments, constructing a DPU heterogeneous computing version of the function and registering it in the function system of the vectorized execution engine includes:
[0013] Developing a DPU heterogeneous computing version of a specific task using a programming language suitable for the DPU network card;
[0014] Constructing a description function that describes the calling method and execution method of the function; the description content includes but is not limited to the entry point, parameter type and return type of the function;
[0015] The functional function and the description function are registered in the function system of the vectorized execution engine through the application program interface of the vectorized execution engine.
[0016] In some embodiments, the computing resource consumption of multiple vectorized execution engine processable operators in the query plan is calculated by the function function, and the operators with computing resource consumption higher than a preset standard are unloaded from the original CPU of the open source distributed computing system to the DPU network card, so as to realize the operator unloading of the vectorized execution engine and perform data processing. The process of the DPU network card performing data processing on the query plan includes:
[0017] Converting the query plan into a plan tree consisting of a plurality of plan nodes by the vectorized execution engine;
[0018] Converting multiple plan nodes in the plan tree into multiple operation operators and combining the multiple operation operators according to operation types to obtain operation tasks;
[0019] The operation task is executed by the driver and transferred to the DPU network card through the application program interface for data processing.
[0020] In some embodiments, the operator offloading method of the vectorized execution engine based on the DPU heterogeneous architecture uses C language or C++ language to compile the vectorized execution engine to support multi-threading and heterogeneous operations between the CPU and the DPU network card.
[0021] In some embodiments, the method further comprises:
[0022] When calling the vectorized execution engine to process data of multiple operators in the query plan, if there are operators in the query plan that cannot be processed by the vectorized execution engine, fall back to the initial execution path to process data;
[0023] When the DPU network card executes operator offloading of the vectorized execution engine and performs data processing, if there are operators that cannot be processed by the DPU network card among the operators that can be processed by the vectorized execution engine, it falls back to the CPU to perform data processing.
[0024] On the other hand, the present invention also provides an operator offloading system for a vectorized execution engine based on a DPU heterogeneous architecture, comprising a processor, a memory, and a computer program / instruction stored in the memory, wherein the processor is used to execute the computer program / instruction, and when the computer program / instruction is executed, the system implements the steps of any one of the above methods.
[0025] On the other hand, the present invention further provides a computer-readable storage medium having a computer program stored thereon, characterized in that the program implements the steps of any of the above methods when executed by a processor.
[0026] On the other hand, the present invention further provides a computer program product, comprising a computer program / instruction, characterized in that when the computer program / instruction is executed by a processor, the steps of any of the above methods are implemented.
[0027] The beneficial effects of the present invention are at least:
[0028] In the operator offloading method and system of the vectorized execution engine based on the DPU heterogeneous architecture of the present invention, the open source distributed computing system obtains a physical execution plan representing the query task execution strategy through the query language input by the user, and the Spark plug-in intercepts the physical execution plan and converts it into a query plan that satisfies the relational algebra cross-language serialization protocol based on the set rules, transmits it to the vectorized engine execution path and calls the vectorized execution engine to perform data processing on multiple operators in the query plan. When there are operators in the query plan that the vectorized execution engine cannot process, it falls back to the initial execution path for data processing, reasonably allocates multiple operators in the physical execution plan and improves the execution efficiency of the query task; the vectorized engine execution path inputs the vectorized execution engine processable operators in the query plan into the vectorized execution engine, calculates the computing resources of the vectorized execution engine processable operators according to the function system of the function function registered with the DPU heterogeneous computing version, and unloads the operators higher than the preset standard from the original CPU to the DPU network card; the performance bottleneck of the CPU under large data volume and I / O intensive computing is solved through operator offloading, and the DPU network card is used to provide high-performance computing capability support for the CPU.
[0029] Furthermore, the present invention uses C language or C++ language to compile a vectorized execution engine to support multi-threading and heterogeneous operations between the CPU and the DPU network card, and uses parallel processing to improve the efficiency and throughput of data processing.
[0030] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.
[0031] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of the present application, and do not constitute a limitation of the present invention. In the drawings:
[0033] Figure 1 The present invention is a flowchart of an operator offloading method of a vectorized execution engine based on a DPU heterogeneous architecture according to an embodiment of the present invention.
[0034] Figure 2 A schematic diagram of the structure of an operator offloading method of a vectorized execution engine based on a DPU heterogeneous architecture according to an embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0036] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.
[0037] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0038] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.
[0039] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0040] In the prior art, vectorized execution relies on the single instruction, multiple data instructions of the CPU to process data in batches. For some computationally intensive tasks, such as complex aggregation operations or join operations, a large number of virtual function calls will be generated, causing CPU interruptions, which in turn causes the calculation and scheduling to occupy CPU resources and lose performance; the vectorized execution engine still needs to perform memory copy operations through the CPU, and frequent copying will increase memory overhead, thereby affecting the performance of the entire interactive query execution task; the present invention proposes an operator unloading method and system for a vectorized execution engine based on a DPU heterogeneous architecture, which obtains a physical execution plan based on the query language input by the user, intercepts the physical execution plan through a Spark plug-in, and converts the physical execution plan into a query plan that satisfies the relational algebra cross-language serialization protocol based on the set rules and transmits it to The vectorized engine executes the path, calls the vectorized execution engine to process data on multiple operators in the query plan, and when the query plan contains operators that the vectorized execution engine cannot process, falls back to the initial execution path for data processing; calls the function function of the DPU heterogeneous computing version in the function system of the vectorized execution engine, calculates the computing resource consumption of multiple vectorized execution engine-processable operators in the query plan, and unloads the operators whose computing resource consumption is higher than the preset standard from the original CPU of the open source distributed computing system to the DPU network card, and when the vectorized execution engine-processable operators contain operators that are not supported by the DPU network card, falls back to the CPU for data processing.
[0041] Figure 1 The present invention is a flowchart of an operator offloading method of a vectorized execution engine based on a DPU heterogeneous architecture according to an embodiment of the present invention. Specifically, the present invention provides an operator offloading method of a vectorized execution engine based on a DPU heterogeneous architecture, wherein the DPU heterogeneous architecture is applied to an open source distributed computing system, and the DPU heterogeneous architecture includes a CPU and a DPU network card; the method includes the following steps S101 to S103:
[0042] Step S101: obtain the query language input by the user, perform syntax analysis on the query language and obtain the query task logical execution plan, add physical execution phase operations to the query task logical execution plan to obtain the physical execution plan; the physical execution plan is the strategy for the open source distributed computing system to execute the query task.
[0043] Step S102: intercept the physical execution plan through the Spark plug-in, convert the physical execution plan into a query plan that satisfies the relational algebra cross-language serialization protocol based on the set rules and transmit it to the vectorized engine execution path, and call the vectorized execution engine to perform data processing on multiple operators in the query plan; the vectorized engine execution path is a path for data processing by calling the vectorized execution engine; the initial execution path is a path for data processing by the original execution engine in the open source distributed computing system.
[0044] Step S103: Call the function function of the DPU heterogeneous computing version in the function system of the vectorized execution engine, calculate the computing resource consumption of operators that can be processed by multiple vectorized execution engines in the query plan through the function function, and unload the operators whose computing resource consumption is higher than the preset standard from the original CPU of the open source distributed computing system to the DPU network card, so as to realize the operator unloading of the vectorized execution engine and perform data processing.
[0045] In step S101, after obtaining the query language, the open source distributed computing system first parses the query language into a syntax tree and generates a logical plan tree according to the set rules, and finally generates a query task logical execution plan. Specifically, the parser is used to convert the query language input by the user into a syntax tree. Each node in the syntax tree represents an element in the query language, including table name, column name and operator. The open source distributed computing system generates a logical plan tree based on the syntax tree. The logical plan tree is an abstract representation of the query language. The query task logical execution plan is obtained through processing operations. The processing operations include but are not limited to eliminating unnecessary calculations, selecting operators with lower costs, and rewriting queries to improve efficiency. One or more physical execution phase operations are added to the query task logical execution plan to obtain a physical execution plan. The physical execution phase operations include but are not limited to data aggregation, data shuffling, and full table scanning.
[0046] In step S102, the Spark plug-in part includes a query plan conversion component (Plan Conversation), a memory manager component (Memory Manager), a columnar shuffle component (Columnar Shuffle), an adaptation layer component (ShimLayer), a fallback component (Fallback) and a metric component (Metric). Specifically, the query plan conversion component converts the physical execution plan into a query plan according to the set rules and transmits it to the vectorized execution engine for data processing. The memory manager component uniformly manages the memory of the vectorized execution engine to avoid memory overflow. The column shuffle component is responsible for shuffling data and ensuring that columnar vectors (Columnar Vector) are used during data flow. The adaptation layer component is used to act as an intermediate layer between different components, provide a compatibility interface with different computing systems, and interact with different computing systems without modifying the upper layer of the open source distributed computing system. In some embodiments, the method also includes: when calling the vectorized execution engine to process data on multiple operators in the query plan, when there are operators in the query plan that the vectorized execution engine cannot process, fall back to the initial execution path for data processing. The fallback component is used to fall back to the initial execution path for data processing when there are operators that the vectorized execution engine cannot process, and fall back to the CPU for processing when there are operators that the DPU network card (data processing unit) cannot process. The indicator component uploads the indicator statistics to the open source distributed computing system through the Spark plug-in and uses it for display or application program interface calls; the Spark plug-in intercepts the physical execution plan to obtain an efficient execution strategy to improve the efficiency of query task execution; the open source distributed computing system injects the vectorized execution engine to improve execution efficiency and save computing resources. In some embodiments, the vectorized execution engine includes: Velox, ClickHouse and Apache Arrow. Specifically, the vectorized execution engine improves CPU performance by processing multiple data at one time or using C language or C++ to modulate a more advanced system kernel. In some embodiments, the operator unloading method of the vectorized execution engine uses C language or C++ language to compile the vectorized execution engine to support multi-threading and heterogeneous operations between the CPU and the DPU network card, and uses parallel processing to improve data processing efficiency and throughput.
[0047] Furthermore, the query plan that satisfies the relational algebra cross-language serialization protocol is designed to support cross-language and cross-execution engines, thereby converting the physical execution plan into a language-independent representation. The query plan is sent to the vectorized engine execution path and executed by the vectorized execution engine, skipping the initial execution path of the original execution engine for data processing. Operators that cannot be processed by the vectorized execution engine will be rolled back to the initial execution path and the original execution engine will be skipped for data processing, ensuring the stability of the open source distributed computing system in executing query tasks, and using the vectorized execution engine to obtain high-performance computing capabilities. The original execution engine can use a Java virtual machine engine.
[0048] In step S103, after obtaining the query plan, a DPU heterogeneous computing version of the function function is used and registered to the function system of the vectorized execution engine to unload operators with computing resources higher than the preset standard from the original CPU of the open source distributed computing system to the newly deployed DPU network card, thereby improving query performance; the data processing chip in the DPU network card is a KPU architecture (core processor architecture). The DPU network card chip based on the KPU architecture is a professional data processing chip, which achieves performance improvement when processing complex data calculations, and unloads data processing from the CPU to the DPU network card, so that the CPU performs data calculation scheduling, and the DPU network card performs data processing for query tasks, thereby improving the computing power of interactive queries in big data scenarios.
[0049] In some embodiments, constructing a DPU heterogeneous computing version of the function and registering it in the function system of the vectorized execution engine includes steps S1031 to S1033:
[0050] Step S1031: Develop a DPU heterogeneous computing version of a specific task using a programming language suitable for the DPU network card.
[0051] Step S1032: construct a description function that describes the function calling method and execution method; the description content includes but is not limited to the function entry point, parameter type and return type.
[0052] Step S1033: registering the functional function and the description function into the function system of the vectorized execution engine through the application program interface of the vectorized execution engine.
[0053] Specifically, the functional functions of the DPU heterogeneous computing version can effectively utilize the hardware characteristics of the DPU network card, and the hardware image includes single instruction set data processing and multi-threaded data processing.
[0054] Furthermore, in some embodiments, the method also includes: when the DPU network card executes the operator unloading of the vectorized execution engine and performs data processing, when there are operators among the operators that the vectorized execution engine can process that do not support the processing of the DPU network card, fall back to the CPU for data processing. When there are operators that do not support the processing of the DPU network card, the CPU is returned to perform data processing through the Fallback mechanism; the vectorized execution engine unloads the operator from the CPU to the DPU network card without affecting the generation of the physical execution plan and the query plan, and uses a general external interface to integrate the high-performance computing capabilities of the DPU network card into the data processing architecture of the open source distributed computing system. In some embodiments, the operator unloading method of the vectorized execution engine based on the DPU heterogeneous architecture also includes:
[0055] The data in the DPU network card and CPU processing process is expressed through column vectors and transmitted in the open source distributed computing system. Specifically, the data calculated by the vectorized execution engine and the original execution engine will be returned to the open source distributed computing system in the form of column vectors. Column vectors can provide efficient data access and calculation.
[0056] In some embodiments, the computing resource consumption of multiple vectorized execution engine-processable operators in the query plan is calculated by a functional function, and the operators whose computing resource consumption is higher than a preset standard are unloaded from the original CPU of the open source distributed computing system to the DPU network card, so as to realize the operator unloading of the vectorized execution engine and perform data processing. The process of the DPU network card performing data processing on the query plan includes steps S201 to S203:
[0057] Step S201: converting a query plan into a plan tree consisting of multiple plan nodes through a vectorized execution engine.
[0058] Step S202: convert multiple plan nodes in the plan tree into multiple operation operators and combine the multiple operation operators according to the operation type to obtain the operation task.
[0059] Step S203: Execute the operation task through the driver and transfer the data to the DPU network card through the application program interface for data processing.
[0060] Specifically, an operator contains one or more expressions to implement a calculation logic. The expression contains a function. The operator converted from the plan node will start from the root node in a subsequent traversal recursively, and after passing through all expressions in the operator, an expression tree describing the logical process of the data processing operation is obtained.
[0061] On the other hand, the present invention also provides an operator offloading system for a vectorized execution engine based on a DPU heterogeneous architecture, comprising a processor, a memory, and a computer program / instruction stored in the memory, wherein the processor is used to execute the computer program / instruction, and when the computer program / instruction is executed, the system implements the steps of any one of the above methods.
[0062] On the other hand, the present invention further provides a computer-readable storage medium having a computer program stored thereon, characterized in that the program implements the steps of any of the above methods when executed by a processor.
[0063] On the other hand, the present invention further provides a computer program product, comprising a computer program / instruction, characterized in that the computer program / instruction implements the steps of any of the above methods when executed by a processor.
[0064] The present invention is described below in conjunction with a specific embodiment:
[0065] Figure 2This is a structural diagram of the operator unloading method of the vectorized execution engine based on the DPU heterogeneous architecture described in one embodiment of the present invention. The physical execution plan is a plan for how the open source distributed computing system executes the query steps after obtaining a SQL (Structured Query Language) input by the user. The open source distributed computing system will first parse the structured query language statement into a syntax tree, and then generate a logical plan tree according to certain rules. Finally, it will generate an optimized query task logical execution plan based on the optimization strategy. Subsequently, according to the optimized query task logical execution plan, the open source distributed computing system will insert a series of physical execution stages, including data aggregation, data shuffling, and full table scan operations, and finally generate a physical execution plan (Physical Plan); the core capability of the Gluten plug-in is through the Spark plug-in (Spark The Gluten plug-in intercepts the physical execution plan, adds some extension rules, generates a language-independent query plan (Substrait plan) that satisfies the relational algebra cross-language serialization protocol, and sends it to the vectorized execution engine (Native execution engine) for execution, skipping the inefficient execution path of the native open source distributed computing system. The overall execution framework still uses the existing implementation of the open source distributed computing system, and for operators that the vectorized execution engine cannot undertake, Gluten arranges to fall back to the normal open source distributed computing system execution path for calculation, thereby ensuring the stability of task execution of the open source distributed computing system, so that the open source distributed computing system can use the vectorized execution engine to obtain high-performance computing capabilities; Velox is a novel C++ data acceleration library that integrates various existing computing engine optimizations. It redesigns the data model to support efficient computing of complex data types, and provides reusable, scalable, high-performance and language-independent data processing components for building execution engines and enhancing data management systems. Since Velox only receives fully optimized query plans as input, it does not provide structured query language parsers, dataframe layers, other domain-specific languages (DSL) or global query optimizers, and focuses on becoming an execution engine for big data computing. This enables the Gluten+Velox architecture to achieve modularization of big data components; the DPU network card chip based on the KPU architecture is a dedicated data processing chip, which has a very high performance improvement compared to the CPU when processing complex data calculations. Therefore, offloading the data calculation of interactive queries from the CPU to the DPU network card can greatly improve the performance of interactive queries, accelerate the computing power of interactive queries in big data scenarios, and allow the CPU to focus on the computing scheduling of open source distributed computing systems, while the DPU network card focuses on data calculations in interactive queries.
[0066] The present invention supports the vectorized execution engine to use the DPU network card to implement its own algorithm. The vectorized execution engines include: Velox, ClickHouse and Apache Arrow. Since there is no difference in usage between calling the algorithm function of the DPU network card and calling the algorithm function of the CPU, the actual computing hardware is replaced for the vectorized execution engine layer. As for the Spark layer and the Gluten layer, they only interact with the vectorized execution engine layer, so Spark and Gluten can use the high-performance computing capabilities provided by the DPU network card without perception.
[0067] The vectorized execution engine converts the query plan sent by the upper layer Gluten that satisfies the relational algebra cross-language serialization protocol into a tree composed of plan nodes (PlanNode), and then converts the plan nodes into operators (Operator), and multiple operators are encapsulated into an operation task (Task), which is then handed over to the driver (Driver) to execute these operators. The operator, as the basic operator, is the logical framework for the actual algorithm execution, carrying the abstraction of various expressions. Each Operator contains one or more expressions to implement a complex and complete calculation logic block, and the bottom layer of the expression is implemented by a function function (Function). The present invention can offload the computing task to the big data computing acceleration DPU network card by implementing a function function of a DPU heterogeneous computing version and then registering this function function to the function system of the vectorized execution engine.
[0068] The operator converted from the plan node will be recursively traversed from the root node to traverse the expressions in the operator to generate an expression tree. Taking the Filter operator as an example, for the specific expression cast(Aas bigint)>1, the operator of the Filter operator will use std::unique_ptr <exprset>The exprs_ variable is used to perform filtering and projection calculations. When it is located at a leaf node, it starts to execute the application function (applyFunction) of the leaf node and calls the data processing logic vector function (vectorFunction), which is the actual algorithm function. In this algorithm function, the computing kernel is replaced with the DPU network card to realize operator offloading.
[0069] In summary, the present invention provides an operator unloading method and system for a vectorized execution engine based on a DPU heterogeneous architecture, which obtains a physical execution plan according to a query language input by a user, intercepts the physical execution plan through a Spark plug-in, converts the physical execution plan into a query plan that satisfies a relational algebra cross-language serialization protocol based on set rules and transmits it to a vectorized engine execution path, calls the vectorized execution engine to perform data processing on multiple operators in the query plan, and when there are operators in the query plan that the vectorized execution engine cannot process, falls back to the initial execution path for data processing; calls a functional function of a DPU heterogeneous computing version in a function system of the vectorized execution engine to calculate the computing resource consumption of multiple vectorized execution engine-processable operators in the query plan and unloads operators with computing resource consumption higher than a preset standard from the original CPU of the open source distributed computing system to the newly deployed DPU network card, and when there are operators in the vectorized execution engine-processable operators that do not support processing by the DPU network card, falls back to the CPU for data processing.
[0070] Furthermore, the present invention uses C language or C++ language to compile a vectorized execution engine to support multi-threading and heterogeneous operations between the CPU and the DPU network card, and uses parallel processing to improve the efficiency and throughput of data processing.
[0071] An embodiment of the present invention further provides a computer device, which may include a processor and a memory, wherein the processor and the memory may be connected via a bus or in other ways.
[0072] The processor may be a CPU (Central Processing Unit, CPU). The processor may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components and other chips, or a combination of the above chips.
[0073] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as the program instructions / modules corresponding to the key shielding method of the vehicle-mounted display device in the embodiment of the present invention. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory.
[0074] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0075] The one or more modules are stored in the memory, and when executed by the processor, the method described in this embodiment is performed.
[0076] The embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned edge computing server deployment method are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.
[0077] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.
[0078] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0079] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.
[0080] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.< / exprset>
Claims
1. An operator offloading method for a vectorized execution engine based on a DPU heterogeneous architecture, characterized in that: The DPU heterogeneous architecture is applied to an open source distributed computing system, and the DPU heterogeneous architecture includes a CPU and a DPU network card; the method includes the following steps: Obtaining the query language input by the user, parsing the query language and obtaining a logical execution plan for the query task, adding a physical execution phase operation to the logical execution plan for the query task to obtain a physical execution plan; the physical execution plan is a strategy for the open source distributed computing system to execute the query task; The physical execution plan is intercepted by a Spark plug-in, and based on set rules, the physical execution plan is converted into a query plan that satisfies the relational algebra cross-language serialization protocol and transmitted to the vectorized engine execution path, and the vectorized execution engine is called to perform data processing on multiple operators in the query plan; the vectorized engine execution path is a path for data processing by calling the vectorized execution engine; the initial execution path is a path for data processing by the original execution engine in the open source distributed computing system; Call the function function of the DPU heterogeneous computing version in the function system of the vectorized execution engine, calculate the computing resource consumption of multiple operators that can be processed by the vectorized execution engine in the query plan through the function function, and unload the operators whose computing resource consumption is higher than the preset standard from the original CPU of the open source distributed computing system to the DPU network card, so as to realize the operator unloading of the vectorized execution engine and perform data processing.
2. The operator offloading method of the vectorized execution engine based on the DPU heterogeneous architecture according to claim 1 is characterized in that: The method further comprises: The data in the processing of the DPU network card and the CPU are expressed through column vectors and transmitted in the open source distributed computing system.
3. The operator offloading method of the vectorized execution engine based on the DPU heterogeneous architecture according to claim 1 is characterized in that: The vectorized execution engines include: Velox, ClickHouse and Apache Arrow.
4. The operator offloading method of the vectorized execution engine based on the DPU heterogeneous architecture according to claim 1 is characterized in that: The steps of constructing a DPU heterogeneous computing version of the function function and registering it in the function system of the vectorized execution engine include: Developing a DPU heterogeneous computing version of a specific task using a programming language suitable for the DPU network card; Constructing a description function that describes the calling method and execution method of the function; the description content includes but is not limited to the entry point, parameter type and return type of the function; The functional function and the description function are registered in the function system of the vectorized execution engine through the application program interface of the vectorized execution engine.
5. The operator offloading method of the vectorized execution engine based on the DPU heterogeneous architecture according to claim 1 is characterized in that: The computing resource consumption of the operators that can be processed by the vectorized execution engines in the query plan is calculated by the function function, and the operators whose computing resource consumption is higher than the preset standard are unloaded from the original CPU of the open source distributed computing system to the DPU network card, so as to realize the operator unloading of the vectorized execution engine and perform data processing. The process of the DPU network card performing data processing on the query plan includes: Converting the query plan into a plan tree consisting of a plurality of plan nodes by the vectorized execution engine; Converting multiple plan nodes in the plan tree into multiple operation operators and combining the multiple operation operators according to operation types to obtain operation tasks; The operation task is executed by the driver and transferred to the DPU network card through the application program interface for data processing.
6. The operator offloading method of the vectorized execution engine based on the DPU heterogeneous architecture according to claim 1 is characterized in that: The operator offloading method of the vectorized execution engine uses C language or C++ language to compile the vectorized execution engine to support multi-threading and heterogeneous operations between the CPU and the DPU network card.
7. The operator offloading method of the vectorized execution engine based on the DPU heterogeneous architecture according to claim 1 is characterized in that: The method further comprises: When calling the vectorized execution engine to process data of multiple operators in the query plan, if there are operators in the query plan that cannot be processed by the vectorized execution engine, fall back to the initial execution path to process data; When the DPU network card executes operator offloading of the vectorized execution engine and performs data processing, if there are operators that cannot be processed by the DPU network card among the operators that can be processed by the vectorized execution engine, it falls back to the CPU to perform data processing.
8. An operator offloading system of a vectorized execution engine based on a DPU heterogeneous architecture, comprising a processor, a memory, and a computer program / instruction stored in the memory, characterized in that: The processor is used to execute the computer program / instructions, and when the computer program / instructions are executed, the system implements the steps of the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method as claimed in any one of claims 1 to 7 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Graph query method and system based on vectorization relational database
CN117931807A
Execution management method and device of Spark SQL query plan tree based on DPU
CN118861096A
Memory hierarchy to transfer vector data for operators of a directed acyclic graph
US10437600B1
Programmable Logic Device-Based Software-Defined Vector Engines
US20240152357A1
Cited By
Model reasoning acceleration method and device, storage medium and program product
CN120354956A
Model reasoning acceleration method, device, storage medium and program product
CN120354956B
Data processing method and device based on dynamic code generation
CN120653258A
Data processing method and device based on dynamic code generation
CN120653258B
Data vectorization acceleration method and system
CN120653308A