Sketch general configuration method and system based on data processing unit
By monitoring and configuring the DPU's hardware resources, dynamically switching the process model, and using Bayesian optimization algorithm to adjust parameters, the bandwidth bottlenecks, resource constraints and other problems in the DPU network measurement architecture are solved, and network measurement with high accuracy and high throughput is achieved.
Patent Information
- Application Number
- CN202411477518.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-10-22
AI Technical Summary
The existing DPU-based network measurement architecture faces bandwidth bottlenecks, hardware resource constraints, complex process model selection, state operation challenges, and balance of optimization goals, making it difficult to achieve high accuracy and high throughput in high concurrent data traffic scenarios.
By monitoring the DPU's hardware resources, identify available resources and configure resource parameters; dynamically switch pipeline models and real-time computing models; adjust resource allocation in real time; and use Bayesian optimization algorithm to recommend parameter configuration solutions to optimize communication efficiency, resource utilization and task processing performance.
It improves the data exchange efficiency between the DPU and the host, optimizes the use of hardware resources, and realizes flexible process model selection and efficient state operation configuration, so as to achieve the goals of high accuracy and high throughput under limited resources.
Smart Images

Figure CN119512889A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a general sketch configuration method and system based on a data processing unit, belonging to the technical field of data processing. Background Art
[0002] Network measurement is an indispensable part of modern network management tasks and is widely used in intrusion detection, load balancing, traffic engineering and other fields. In order to adapt to large-scale and real-time requirements, network measurement requires an efficient data processing architecture. Traditional network measurement methods are limited by hardware and communication bottlenecks and are difficult to cope with modern high-concurrency data traffic.
[0003] With the introduction of data processing units (DPUs), the performance of network measurement has been improved to a certain extent. As an independent processing module, DPU is located between the host and the external network. It communicates with the host through PCIe and with the external network through the network card. Its design can effectively share the processing burden of the host and improve data processing efficiency. However, the existing DPU-based network measurement architecture still faces multiple challenges:
[0004] 1. System location limitation: DPU relies on the network card on the host for communication and exchanges data with the host through PCIe. DPU faces bandwidth bottlenecks in high-bandwidth traffic transmission scenarios, especially when processing multiple network flows at the same time. Communication efficiency becomes a key factor affecting system performance.
[0005] 2. Hardware resource constraints. The hardware resources of DPU include SoC core, DRAM, L2, L3 cache, PCIe bandwidth and network card bandwidth. These resources are limited and cannot fully meet the large-scale concurrent processing requirements of modern network traffic. When resources are not configured reasonably, system performance is often difficult to reach the optimal state, and performance bottlenecks may even occur.
[0006] 3. Complexity of the process model. DPU supports two different process models: PL (Processing Logic) and RTC (Real-Time Computing). How to flexibly configure the process model according to different application scenarios and choose single-core operation or multi-core binding has become a major difficulty in system design.
[0007] 4. Challenges of stateful operations. In network measurement tasks, stateful operations and stateless operations are two common modes. Stateful operations usually involve memory access, such as data storage and processing, while stateless operations mainly focus on data parsing and calculation. How to reasonably allocate hardware resources in different operation modes to improve computing efficiency is one of the main technical challenges faced in the process of deploying Sketch.
[0008] 5. Balance of optimization goals. The core goal of network measurement tasks is to strike a balance between accuracy and throughput. Under limited resource conditions, how to achieve the best trade-off between the two through optimization has become a major challenge for Sketch in DPU deployment.
[0009] Based on the above background, the existing DPU deployment sketch method has many problems in system location, hardware resource management, process model selection, state operation and optimization target balance, and an efficient sketch general configuration method is urgently needed. Summary of the invention
[0010] In view of the shortcomings of the prior art, the present invention provides a general sketch configuration method and system based on a data processing unit, aiming to optimize the communication efficiency between the DPU and the host, reasonably allocate hardware resources, realize flexible process model selection and efficient state operation configuration, so as to achieve high accuracy and high throughput goals of network measurement under limited resources.
[0011] Terminology explanation:
[0012] Sketch: In data processing and network measurement, Sketch is an algorithm used for real-time traffic data estimation. By compressing the information in the data stream, Sketch can efficiently estimate the statistical characteristics of the data stream in a resource-constrained environment and is widely used in intrusion detection and traffic optimization tasks.
[0013] The technical solution of the present invention is as follows:
[0014] A general configuration method of Sketch based on a data processing unit, the steps are as follows:
[0015] (1) Resource parameter identification: monitor the hardware resources of the data processing unit, identify the available resources, and identify all primitives related to the available resources in the sketch program code of the data processing unit to determine the configurable resource parameters;
[0016] (2) Process model selection: configure the pipeline model (PL) and real-time computing model (RTC) on the data processing unit and dynamically switch between the two models;
[0017] (3) Resource constraint input: Configurable resource parameters are used as input and constraint conditions to make real-time adjustments to resource usage;
[0018] (4) Optimization target configuration: Setting optimization targets, including maximizing accuracy and throughput and minimizing resource usage;
[0019] (5) Parameter configuration recommendation: Use the Bayesian optimization algorithm to recommend multiple parameter values, enter these parameter values into the Sketch program and run it. Then, test and measure the accuracy, throughput, and resource usage of Sketch to generate the optimal parameter configuration solution.
[0020] Preferably, according to the present invention, in step (1), the available resources include SoC core, DRAM, L2 cache, L3 cache, PCIe bandwidth and network card bandwidth, and the configurable resource parameters are the number of available SoC cores, the allocated capacity of DRAM, the usage ratio of L2 cache, the usage ratio of L3 cache, the occupancy ratio of PCIe bandwidth, and the transmission rate of the network card bandwidth.
[0021] According to the present invention, the specific steps of resource parameter identification are as follows:
[0022] (1-1) Monitoring: When the sketch program is running in the data processing unit, the hardware resources in the DPU are monitored through the profiler tool. The number of SoC cores, DRAM allocation capacity, L2 cache size, L3 cache size, PCIe bandwidth, and network card bandwidth usage are recorded in real time to help users clearly understand the resources occupied by the current task;
[0023] (1-2) Resource classification and extraction: Use monitoring data to identify the current usage status and available capacity of hardware resources;
[0024] (1-3) Primitive identification: In the sketch program code of the data processing unit, all code segments involving resource usage are found through static analysis methods. These code segments are called primitives. Primitives contain calls to hardware resources, such as memory allocation, computing operations, data transmission, etc. These primitives are identified and the resource type involved in each primitive is determined;
[0025] (1-4) Configurable resource parameters: Find configurable resource parameters in the identified primitives. This step provides a flexible resource configuration basis for the sketch program.
[0026] Preferably, in step (2) of the present invention, the steps are as follows:
[0027] (2-1) Pipeline (PL) model: This model is suitable for high-throughput tasks. Through pipeline technology, multiple tasks can be processed in parallel at different stages. The task allocation and scheduling mechanism is configured for the pipeline model to ensure that different tasks can be evenly distributed on the SoC core and achieve efficient resource utilization;
[0028] (2-2) Real-time computing (RTC) model: The RTC model is suitable for real-time tasks with strict latency requirements. In this model, tasks are bound to specific SoC cores to ensure real-time execution of tasks. For real-time tasks, users are allowed to customize task priorities and dynamically allocate computing resources based on the real-time requirements of the tasks. The RTC model remains unchanged.
[0029] (2-3) Model switching mechanism: A dynamic model switching mechanism is designed to switch between the pipeline model and the real-time computing model according to the different characteristics of the tasks. For example, when certain tasks have high throughput requirements, the system automatically switches to the PL model; when encountering tasks that require real-time response, the system switches to the RTC model, thereby ensuring the optimal state of system performance.
[0030] Preferably, according to the present invention, in step (2-1), the key mechanism for achieving uniform distribution of different tasks is dynamic load balancing. The task allocation and scheduling mechanism is to continuously monitor the real-time load and task queue status of each SoC core, and use a feedback control system to dynamically adjust task allocation. When the task load of a group of cores exceeds a certain threshold (for example, 80% CPU utilization), the scheduling system will automatically identify the cores with lighter loads and migrate newly arrived tasks or part of the existing tasks to these cores to alleviate the overload state. This process dynamically adjusts the task position through a lightweight task migration protocol without significantly affecting task processing, ensuring that each core remains at a reasonable load level and achieving balanced resource utilization. This mechanism can quickly respond to changes in task requirements through periodic load evaluation and automatic adaptive adjustment, always maintain a balanced load on each SoC core, and achieve the goal of efficient resource utilization.
[0031] Preferably, in step (2-3) of the present invention, the specific process of the dynamic model switching mechanism includes: first, judging whether it is necessary to switch the model by real-time monitoring the CPU usage rate, data packet frequency and response time indicators of the task; if switching is required, suspending the allocation of new tasks and saving the current task status and data; then, reallocating resources to adapt to the target model, and executing model switching to move the task into the new operation model; finally, resuming task processing and continuing monitoring to ensure that the performance indicators meet expectations and to ensure the smoothness and efficiency of the switching.
[0032] According to the preferred embodiment of the present invention, step (3) is specifically:
[0033] (3-1) Resource input: The available resources of SoC core, DRAM, L2 cache, L3 cache, PCIe bandwidth and network card bandwidth are used as constraints and input into the Bayesian optimization algorithm. Each resource has its upper limit of use. The present invention ensures that resources will not be overused through constraint input, thereby avoiding performance degradation caused by resource competition;
[0034] (3-2) Resource constraint management: Based on task requirements, users are allowed to set the maximum usage of each type of resource. For example, users can specify that a maximum of 4 SoC cores are allowed to be used, a maximum of 2GB DRAM is allowed to be allocated, etc. These resource constraints will be passed to subsequent optimization algorithms as boundary conditions for resource usage;
[0035] (3-3) Dynamic resource adjustment: During actual operation, the resource requirements of the data processing unit may change. A dynamic resource adjustment mechanism is designed to adjust resource allocation in real time according to the actual load of the task. For example, when the computing requirements of a task increase, the SoC core or DRAM allocation can be dynamically increased without stopping the task execution.
[0036] Preferably, according to the present invention, in step (3-3), the dynamic resource adjustment mechanism timely identifies changes in resource requirements by real-time monitoring of the CPU load, memory usage and processing speed of the task. When it is detected that the computing demand of the task increases and causes the CPU or memory to be close to saturation, the number of SoC cores or DRAM capacity to be increased is determined according to the preset strategy rules and the increase is executed immediately. The execution process does not need to interrupt the task. By mobilizing idle SoC cores or reallocating memory resources, resources can be made effective immediately to improve the processing performance of the task. After completion, the task performance indicators are continuously monitored and analyzed to quickly iterate resource optimization when the demand changes again, so as to ensure the continuous optimization of DPU global resource utilization and performance.
[0037] Preferably, according to the present invention, in step (5), the parameter values include: the number of available SoC cores (e.g., 1 to 8 cores), the allocated capacity of DRAM (e.g., 512MB to 4GB), the L2 cache usage ratio (e.g., 10% to 90%), the L3 cache usage ratio (e.g., 10% to 80%), the PCIe bandwidth occupancy ratio (e.g., 10% to 100%), and the transmission rate of the network card bandwidth (e.g., 1Gbps to 40Gbps).
[0038] A sketch general configuration system based on a data processing unit, comprising:
[0039] Resource parameter identification module: used to monitor the hardware resources of the data processing unit, identify available resources, and identify all primitives related to available resources in the sketch program code of the data processing unit to determine configurable resource parameters;
[0040] Process model selection module: used to configure the pipeline model and real-time computing model on the data processing unit and dynamically switch between the two models;
[0041] Resource constraint input module: used to take configurable resource parameters as input and constraint conditions to make real-time adjustments to resource usage;
[0042] Optimization target configuration module: used to set optimization targets, including maximizing accuracy and throughput and minimizing resource usage;
[0043] Parameter configuration recommendation module: It is used to recommend multiple parameter values using the Bayesian optimization algorithm, enter these parameter values into the Sketch program to run it, and measure the accuracy, throughput and resource usage of Sketch through testing to generate the optimal parameter configuration solution.
[0044] The beneficial effects of the present invention are:
[0045] 1. System location: This invention proposes an optimization method that takes the DPU system location into consideration. By real-time monitoring and intelligent allocation of PCIe bandwidth and network card bandwidth, the bottleneck problem in the data transmission process is reduced. The optimization algorithm of PCIe communication improves the data exchange efficiency between the DPU and the host. At the same time, the multi-channel parallel processing technology of the network card is used to enhance the communication capability of the DPU and the external network, improve the utilization efficiency of PCIe bandwidth and network card bandwidth, effectively reduce the bottleneck in the data transmission process, and improve the real-time performance of network measurement tasks.
[0046] 2. Hardware resource optimization: The present invention identifies and optimizes the hardware resources of the DPU, including SoC core, DRAM, L2, L3 cache, PCIe bandwidth, network card bandwidth, etc., and dynamically allocates SoC core, DRAM, L2, L3 cache and other resources according to the actual needs of the sketch task. For computing-intensive tasks, multi-core resources are allocated first to increase the computing speed; for memory-sensitive tasks, large-capacity cache and DRAM resources are allocated first to ensure low latency in data access, thereby improving the performance of the sketch when deployed on the DPU and avoiding resource competition and bottleneck problems.
[0047] 3. Process model configuration: The present invention supports flexible selection of PL and RTC process models on the DPU, and can configure a single-core operation mode or bind a specific core according to task requirements. For tasks with high real-time requirements, the RTC model will be preferred, and single-core or multi-core binding can be configured according to task complexity, thereby improving real-time processing capabilities. For non-real-time tasks, the PL model ensures efficient use of resources through a reasonable scheduling algorithm. This method improves the efficiency of task processing, especially in resource-intensive tasks, and can effectively reduce system latency.
[0048] 4. State operation optimization: The present invention intelligently schedules the execution order and resource allocation of stateful operations and stateless operations. For tasks with stateful operations, the present invention reduces memory access bottlenecks by allocating more memory resources and caches; for tasks with stateless operations, the present invention optimizes data parsing and computing speeds through parallel processing. According to task requirements, the present invention can intelligently switch between stateful and stateless operations to ensure the overall performance of the system, optimize the coordination between memory access and computing, reduce memory bottlenecks in stateful operations, and improve the computing efficiency of stateless operations.
[0049] 5. Performance optimization goals: The present invention provides a set of multi-objective optimization strategies based on accuracy and throughput. Users can dynamically adjust the configuration of the sketch according to the network environment and task requirements. In the performance optimization process, the present invention uses the Bayesian optimization algorithm and the pruning algorithm to generate multiple candidate solutions under different resource and performance trade-offs. By testing the performance of each candidate solution under different traffic distributions, the configuration solution with the highest accuracy and the best throughput is finally selected, thereby improving the system throughput while ensuring high accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a structural schematic diagram of a data processing unit of the present invention;
[0051] Figure 2 It is a schematic diagram of the process model of the present invention, wherein: Figure 2 (a) is the sketch execution model based on the pipeline model. Figure 2 (b) is the sketch execution model based on the real-time computing model;
[0052] Figure 3 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0053] The present invention will be further described below by way of embodiments in conjunction with the accompanying drawings, but is not limited thereto.
[0054] Embodiment 1:
[0055] like Figure 3 As shown, this embodiment provides a general sketch configuration method based on a data processing unit, and the steps are as follows:
[0056] (1) Resource parameter identification: Monitor the hardware resources of the data processing unit and identify the available resources, including SoC core, DRAM, L2 cache, L3 cache, PCIe bandwidth and network card bandwidth. Identify all primitives related to the available resources in the sketch program code of the data processing unit and determine the configurable resource parameters, including the number of available SoC cores, the allocated capacity of DRAM, the usage ratio of L2 cache, the usage ratio of L3 cache, the usage ratio of PCIe bandwidth and the transmission rate of network card bandwidth.
[0057] The specific steps for resource parameter identification are:
[0058] (1-1) Monitoring: When the sketch program is running in the data processing unit, the hardware resources in the DPU are monitored through the profiler tool. The number of SoC cores, DRAM allocation capacity, L2 cache size, L3 cache size, PCIe bandwidth, and network card bandwidth usage are recorded in real time to help users clearly understand the resources occupied by the current task;
[0059] (1-2) Resource classification and extraction: Use monitoring data to identify the current usage status and available capacity of hardware resources;
[0060] (1-3) Primitive identification: In the sketch program code of the data processing unit, all code segments involving resource usage are found through static analysis methods. These code segments are called primitives. Primitives contain calls to hardware resources, such as memory allocation, computing operations, data transmission, etc. These primitives are identified and the resource type involved in each primitive is determined;
[0061] (1-4) Configurable resource parameters: Find configurable resource parameters in the identified primitives. This step provides a flexible resource configuration basis for the sketch program.
[0062] (2) Process model selection: Configure the pipeline model (PL) and real-time computing model (RTC) on the data processing unit and dynamically switch between the two models. Specifically:
[0063] (2-1) Pipeline (PL) model: This model is suitable for high-throughput tasks. Through pipeline technology, multiple tasks can be processed in parallel at different stages. The task allocation and scheduling mechanism is configured for the pipeline model to ensure that different tasks can be evenly distributed on the SoC core and achieve efficient resource utilization;
[0064] The key mechanism to achieve uniform distribution of different tasks is dynamic load balancing. The task allocation and scheduling mechanism is to continuously monitor the real-time load and task queue status of each SoC core, and use the feedback control system to dynamically adjust the task allocation. When the task load of a group of cores exceeds a certain threshold (for example, 80% CPU utilization), the scheduling system will automatically identify the cores with lighter loads and migrate newly arrived tasks or part of the existing tasks to these cores to alleviate the overload state. This process uses a lightweight task migration protocol to dynamically adjust the task position without significantly affecting task processing, ensuring that each core is maintained at a reasonable load level and achieving balanced resource utilization. This mechanism can quickly respond to changes in task requirements through periodic load evaluation and automatic adaptive adjustment, always maintaining a balanced load on each SoC core, and achieving the goal of efficient resource utilization;
[0065] (2-2) Real-time computing (RTC) model: The RTC model is suitable for real-time tasks with strict latency requirements. In this model, tasks are bound to specific SoC cores to ensure real-time execution of tasks. For real-time tasks, users are allowed to customize task priorities and dynamically allocate computing resources based on the real-time requirements of the tasks. The RTC model remains unchanged.
[0066] (2-3) Model switching mechanism: Design a dynamic model switching mechanism to switch between the pipeline model and the real-time computing model according to the different characteristics of the task. For example, when certain tasks have high throughput requirements, the system automatically switches to the PL model; when encountering tasks that require real-time response, the system switches to the RTC model, thereby ensuring the optimal state of system performance;
[0067] The specific process of the dynamic model switching mechanism includes: first, by real-time monitoring of the CPU usage rate, data packet frequency and response time indicators of the task, determine whether the model needs to be switched; if switching is required, suspend new task allocation and save the current task status and data; then, reallocate resources to adapt to the target model, and perform model switching to move the task to the new computing model; finally, resume task processing and continue monitoring to ensure that the performance indicators meet expectations and ensure the smoothness and efficiency of the switch;
[0068] (3) Resource constraint input: Configurable resource parameters are used as input and constraint conditions to adjust resource usage in real time. Specifically:
[0069] (3-1) Resource input: The available resources of SoC core, DRAM, L2 cache, L3 cache, PCIe bandwidth and network card bandwidth are used as constraints and input into the Bayesian optimization algorithm. Each resource has its upper limit of use. The present invention ensures that resources will not be overused through constraint input, thereby avoiding performance degradation caused by resource competition;
[0070] (3-2) Resource constraint management: Based on task requirements, users are allowed to set the maximum usage of each type of resource. For example, users can specify that a maximum of 4 SoC cores are allowed to be used, a maximum of 2GB DRAM is allowed to be allocated, etc. These resource constraints will be passed to subsequent optimization algorithms as boundary conditions for resource usage;
[0071] (3-3) Dynamic resource adjustment: During actual operation, the resource requirements of the data processing unit may change. A dynamic resource adjustment mechanism is designed to adjust resource allocation in real time according to the actual load of the task. For example, when the computing requirements of a task increase, the SoC core or DRAM allocation can be dynamically increased without stopping the task execution;
[0072] The dynamic resource adjustment mechanism monitors the CPU load, memory usage, and processing speed of the task in real time to identify changes in resource requirements in a timely manner. When it detects that the computing requirements of the task have increased and the CPU or memory is close to saturation, it determines the number of SoC cores or DRAM capacity that needs to be increased according to the preset policy rules and executes it immediately. The execution process does not require interrupting the task. By mobilizing idle SoC cores or reallocating memory resources, resources are immediately effective and the processing performance of the task is improved. After completion, the task performance indicators are continuously monitored and analyzed to quickly iterate resource optimization when the demand changes again, ensuring continuous optimization of DPU global resource utilization and performance.
[0073] (4) Optimization target configuration: Setting optimization targets, including maximizing accuracy and throughput and minimizing resource usage;
[0074] (4-1) Accuracy Optimization: In network measurement tasks, accuracy is a key metric. The present invention improves the measurement accuracy of the sketch through an optimization algorithm. First, the user can set the required minimum measurement accuracy as the target value, and the optimization algorithm will give priority to the configuration scheme that achieves the target value;
[0075] (4-2) Throughput optimization: Throughput is another core indicator, especially in high-traffic networks. The present invention improves the overall throughput of the system by adjusting the allocation of SoC core and network card bandwidth. During the optimization process, the system automatically balances the relationship between throughput and resource usage to ensure that the throughput is maximized under the condition of limited resources;
[0076] (4-3) Minimization of resource usage: In order to improve the resource utilization efficiency of the system, the present invention proposes an optimization strategy for resource minimization. The optimization algorithm minimizes the usage of SoC cores, DRAM, and cache as much as possible while ensuring accuracy and throughput, thereby reserving more resources for other tasks.
[0077] (5) Parameter configuration recommendation: Use the Bayesian optimization algorithm to recommend multiple parameter values (including the number of available SoC cores (e.g., 1 to 8 cores), DRAM allocation capacity (e.g., 512MB to 4GB), L2 cache usage ratio (e.g., 10% to 90%), L3 cache usage ratio (e.g., 10% to 80%), PCIe bandwidth occupancy ratio (e.g., 10% to 100%), and network card bandwidth transmission rate (e.g., 1Gbps to 40Gbps)). Enter these parameter values into the sketch program and run it. Then, measure the sketch’s accuracy, throughput, and resource usage through testing to generate the optimal parameter configuration solution.
[0078] Through the above steps, the present invention provides a complete set of sketch general configuration methods, which can intelligently and automatically generate the optimal parameter configuration solution based on the hardware resources and task requirements of the DPU, greatly improving the system performance and resource utilization efficiency.
[0079] Embodiment 2:
[0080] This embodiment provides a sketch general configuration system based on a data processing unit, including:
[0081] Resource parameter identification module: used to monitor the hardware resources of the data processing unit, identify available resources, and identify all primitives related to available resources in the sketch program code of the data processing unit to determine configurable resource parameters;
[0082] Process model selection module: used to configure the pipeline model and real-time computing model on the data processing unit and dynamically switch between the two models;
[0083] Resource constraint input module: used to take configurable resource parameters as input and constraint conditions to make real-time adjustments to resource usage;
[0084] Optimization target configuration module: used to set optimization targets, including maximizing accuracy and throughput and minimizing resource usage;
[0085] Parameter configuration recommendation module: It is used to recommend multiple parameter values using the Bayesian optimization algorithm, enter these parameter values into the Sketch program to run it, and measure the accuracy, throughput and resource usage of Sketch through testing to generate the optimal parameter configuration solution.
[0086] 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 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.
Claims
1. A general configuration method of sketch based on a data processing unit, characterized in that: Here are the steps: (1) Resource parameter identification: monitor the hardware resources of the data processing unit, identify the available resources, and identify all primitives related to the available resources in the sketch program code of the data processing unit to determine the configurable resource parameters; (2) Process model selection: configure the pipeline model and the real-time computing model on the data processing unit and dynamically switch between the two models; (3) Resource constraint input: Configurable resource parameters are used as input and constraint conditions to make real-time adjustments to resource usage; (4) Optimization target configuration: Setting optimization targets, including maximizing accuracy and throughput and minimizing resource usage; (5) Parameter configuration recommendation: Use the Bayesian optimization algorithm to recommend multiple parameter values, enter these parameter values into the Sketch program and run it. Then, test and measure the accuracy, throughput, and resource usage of Sketch to generate the optimal parameter configuration solution.
2. The general sketch configuration method based on a data processing unit according to claim 1, characterized in that: In step (1), the available resources include SoC core, DRAM, L2 cache, L3 cache, PCIe bandwidth and network card bandwidth, and the configurable resource parameters are the number of available SoC cores, the allocated capacity of DRAM, the usage ratio of L2 cache, the usage ratio of L3 cache, the occupancy ratio of PCIe bandwidth, and the transmission rate of network card bandwidth.
3. The sketch general configuration method based on the data processing unit according to claim 2, characterized in that: In step (1), the specific steps of resource parameter identification are: (1-1) Monitoring: When the data processing unit runs the sketch program, monitor the hardware resources in the DPU and record the number of SoC cores, DRAM allocation capacity, L2 cache size, L3 cache size, PCIe bandwidth, and network card bandwidth usage in real time; (1-2) Resource classification and extraction: Use monitoring data to identify the current usage status and available capacity of hardware resources; (1-3) Primitive identification: In the sketch program code of the data processing unit, all code segments involving resource usage are found through static analysis methods. These code segments are called primitives. (1-4) Configurable resource parameters: Find the configurable resource parameters in the identified primitives.
4. The general configuration method of sketch based on data processing unit according to claim 3, characterized in that: In step (2), specifically: (2-1) Pipeline model: Through pipeline technology, multiple tasks are processed in parallel at different stages. The task allocation and scheduling mechanism is configured for the pipeline model to ensure that different tasks can be evenly distributed on the SoC core; (2-2) Real-time computing model: This model is suitable for real-time tasks that have strict latency requirements. In this model, tasks are preferentially bound to specific SoC cores to ensure real-time execution of tasks. For real-time tasks, users are allowed to customize task priorities and dynamically allocate computing resources based on the real-time requirements of the tasks. (2-3) Model switching mechanism: Design a dynamic model switching mechanism to switch between the pipeline model and the real-time computing model according to the different characteristics of the task.
5. The general configuration method of sketch based on data processing unit according to claim 4, characterized in that: In step (2-1), the task allocation and scheduling mechanism is to continuously monitor the real-time load and task queue status of each SoC core, dynamically adjust task allocation, and automatically identify the cores with lighter loads when the task load of a group of cores exceeds a certain threshold, and migrate newly arrived tasks or part of the existing tasks to these cores to alleviate the overload state.
6. The general configuration method of sketch based on data processing unit according to claim 4, characterized in that: In step (2-3), the specific process of the dynamic model switching mechanism includes: first, by real-time monitoring of the CPU usage, data packet frequency and response time indicators of the task, determine whether the model needs to be switched; if switching is required, suspend new task allocation and save the current task status and data; then, reallocate resources to adapt to the target model, and execute model switching to move the task to the new computing model; finally, resume task processing and continue monitoring to ensure that performance indicators meet expectations.
7. The general configuration method of sketch based on data processing unit according to claim 4, characterized in that: Step (3) is specifically as follows: (3-1) Resource input: The available resources of SoC core, DRAM, L2 cache, L3 cache, PCIe bandwidth and network card bandwidth are used as constraints and input into the Bayesian optimization algorithm; (3-2) Resource constraint management: allows users to set the maximum usage of each type of resource according to task requirements; (3-3) Dynamic resource adjustment: During the actual operation, the resource requirements of the data processing unit may change. A dynamic resource adjustment mechanism is designed to adjust resource allocation in real time according to the actual load of the task.
8. The general sketch configuration method based on a data processing unit according to claim 7, characterized in that: In step (3-3), the dynamic resource adjustment mechanism promptly identifies changes in resource requirements by monitoring the CPU load, memory usage, and processing speed of the task in real time. When it is detected that the computing demand of the task has increased and the CPU or memory is close to saturation, the number of SoC cores or DRAM capacity that needs to be increased is determined according to the preset strategy rules and executed immediately. The execution process does not require interrupting the task. By mobilizing idle SoC cores or reallocating memory resources, resources can take effect immediately. After completion, the task performance indicators continue to be monitored and analyzed.
9. The general sketch configuration method based on a data processing unit according to claim 1, characterized in that: In step (5), the parameter values include: the number of available SoC cores, the allocated capacity of DRAM, the L2 cache usage ratio, the L3 cache usage ratio, the PCIe bandwidth usage ratio and the network card bandwidth transmission rate.
10. A sketch general configuration system based on a data processing unit, characterized in that: include: Resource parameter identification module: used to monitor the hardware resources of the data processing unit, identify available resources, and identify all primitives related to available resources in the sketch program code of the data processing unit to determine configurable resource parameters; Process model selection module: used to configure the pipeline model and real-time computing model on the data processing unit and dynamically switch between the two models; Resource constraint input module: used to take configurable resource parameters as input and constraint conditions to make real-time adjustments to resource usage; Optimization target configuration module: used to set optimization targets, including maximizing accuracy and throughput and minimizing resource usage; Parameter configuration recommendation module: It is used to recommend multiple parameter values using the Bayesian optimization algorithm, enter these parameter values into the Sketch program to run it, and measure the accuracy, throughput and resource usage of Sketch through testing to generate the optimal parameter configuration solution.
Citation Information
Patent Citations
Universal sketch configuration method based on programmable switch
CN115484157A
Sketch real-time network measurement method based on programmable hardware DPU, electronic equipment and medium
CN118467151A
Flow scheduling method and system for multi-core SDN (Software Defined Network) switch
CN118509373A
Secure and scalable model splicing of digital engineering models for software-code-defined digital threads
WO2024186709A1