Universal key value storage hotspot detection method and system based on data processing unit

By adopting DPU-based hotspot detection methods in large-scale distributed key-value storage systems, using DPU hardware resources and multi-core architecture, efficient hotspot detection and management are achieved, and the hotspot detection cost and low efficiency in the existing technology are solved. The problem of improving the performance and scalability of the system.

CN119473530AInactive Publication Date: 2025-02-18QUAN CHENG LABORATORY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411416980.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-02-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has high cost and low efficiency in large-scale distributed key-value storage systems, making it difficult to effectively manage hotspot key values, resulting in system load imbalance and increased response delay.

Method used

Using a universal key-value storage hotspot detection method based on data processing unit (DPU), hotspot encoding, filtering, decoding and query are realized through the SoC core, DRAM memory, L2/L3 cache, PCIe interface and network card of DPU, and using the Sketch algorithm and Multi-core architecture performs efficient hot spot detection.

Benefits of technology

Efficient hot spot detection is achieved through DPU, reducing the CPU burden of the central server, reducing system resource usage, improving system scalability and throughput, and reducing hot spot management costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473530A_ABST
    Figure CN119473530A_ABST
Patent Text Reader

Abstract

The invention relates to a universal key value storage hot spot detection method and system based on a data processing unit, and belongs to the technical field of hot spot detection in a key value storage system.The method comprises the steps that hot spot coding is conducted, specifically, a received key value request is coded; hotspot filtering: screening the requests through a preset threshold value, and filtering out non-hotspot key values; hot spot decoding: decoding the screened hot spot key values; and hot spot query: querying and processing the hot spot key value to complete a hot spot detection task. Through the multi-core architecture of the DPU and the Sketch algorithm, the hot spots can be quickly and accurately detected in a high-load environment. Compared with a traditional central server scheme, the DPU does not need to replace existing equipment on a large scale, and occupation of system resources is reduced. The DPU can dynamically schedule resources, is suitable for distributed systems of different scales, and improves the expandability of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of hotspot detection in key-value storage systems, and in particular to a general key-value storage hotspot detection method based on a data processing unit (DPU), which is suitable for optimizing hotspot detection and system performance through a DPU in distributed storage and telemetry data collection scenarios. Background Art

[0002] In modern large-scale distributed key-value storage systems, hotspots are a common and serious performance challenge. Hotspot keys refer to a small number of key-value items that are frequently accessed, which may cause system load imbalance, increased response latency, or even cause system crashes. For example, breaking news may attract 90% of visits concentrated on 1% of key-value items. Therefore, the detection and management of these hotspots is critical to ensure system performance and service quality.

[0003] At present, hotspot monitoring mainly relies on central servers. If implemented using programmable switches, the cost is relatively high, and in order to realize its functions, the existing network equipment needs to be replaced. This will bring significant cost and time overhead for large-scale distributed systems. In contrast, the DPU (data processing unit)-based solution does not need to replace the switches of the existing system, which can effectively reduce costs. At the same time, through the powerful computing power of the DPU itself, it can reduce the CPU burden of the central server and improve the overall computing performance of the system.

[0004] DPU is an independent hardware accelerator located between the host and the external network. It communicates with the host through PCIe and with the outside through the network card. Its hardware resources include SoC core, DRAM, L2 / L3 cache, PCIe bandwidth and network card bandwidth. These resources can efficiently perform various computing tasks, including hotspot detection, data parsing and state operations. Unlike traditional switches or central servers, DPU can allocate resources and optimize tasks in a more flexible way. Especially in the management of stateful and stateless operations, DPU can effectively reduce memory access latency and improve parsing efficiency.

[0005] Therefore, the DPU-based hotspot detection system can not only reduce the cost of system deployment, but also minimize resource usage while improving detection efficiency, thereby improving system scalability and throughput. This provides a more economical and efficient solution for hotspot detection in distributed systems. Summary of the invention

[0006] In view of the shortcomings of the prior art, the present invention proposes a universal key-value storage hotspot detection method based on a data processing unit. The present invention aims to achieve efficient hotspot detection through DPU, reduce the CPU burden of the central server, and enhance the computing power of the system.

[0007] The present invention also proposes a universal key-value storage hotspot detection system based on a data processing unit.

[0008] The technical solution of the present invention is:

[0009] A general key-value storage hotspot detection method based on a data processing unit, comprising:

[0010] The data processing unit includes SoC core, DRAM memory, L2 / L3 cache, PCIe interface, and network card; the SoC core is responsible for executing the main computing tasks of the data processing unit; the DRAM memory is used to store intermediate data in the process of hotspot encoding and hotspot decoding, as well as temporary data required for executing computing tasks; the L2 / L3 cache is used to accelerate data access and storage; the PCIe interface is used to communicate with the central server to ensure fast data transmission between the host and the data processing unit; the network card connects to the external network to receive and transmit data;

[0011] Hotspot encoding: Encode the received key-value request;

[0012] Hotspot filtering: Filter requests by preset thresholds to filter out non-hotspot key values;

[0013] Hotspot decoding: decode the filtered hotspot key values;

[0014] Hotspot query: Query and process hotspot key values ​​to complete hotspot detection tasks.

[0015] According to the preferred embodiment of the present invention, hotspot coding includes:

[0016] The data processing unit uses the SoC core to encode the relevant attributes of the key-value request, including the key value, request type, server address, link load, timestamp, request source IP address, target IP address, and request size, and stores the encoded information obtained after the encoding process in the cache.

[0017] Further preferably, hotspot coding includes:

[0018] Adopt layered coding technology to encode the relevant attributes of key-value requests and generate hotspot codes; specifically, it includes:

[0019] The first layer of encoding: encodes the key value and request type to ensure that each key value request has a unique identifier; the second layer of encoding: encodes the server address; the third layer of encoding: encodes the link load status to reflect the server load status.

[0020] Further preferably, in hotspot encoding, the data processing unit uses a cache including an L2 / L3 cache to accelerate encoding and processing of data, and dynamically schedules resources.

[0021] Preferably, hotspot filtering according to the present invention comprises:

[0022] Hotspot filtering operations are performed through the DPU; possible hotspot key values ​​are screened out through the preset access frequency threshold, and non-hotspot key values ​​are filtered out; specifically, the DPU uses the Sketch algorithm deployed on the data plane to perform partial key value queries on each encoded key value request, and calculates the access frequency of these key value requests in each time window. Key values ​​with access frequencies exceeding the threshold will be marked as hotspot candidates, and these hotspot candidates will be saved in the cache for further processing.

[0023] Further preferably, hotspot filtering includes:

[0024] (1) Sketch algorithm deployment and execution: The SoC core of the data processing unit is responsible for calculating multiple hash functions and mapping each code to the corresponding storage bucket. Each access updates the count value of the corresponding storage bucket. The Sketch algorithm counts the access frequency of key-value requests based on the count value.

[0025] (2) Time window statistics and access frequency calculation: The DPU counts all incoming hotspot codes in each time window. The Sketch algorithm is executed on the DPU at fixed time intervals, and the duration of each time window is adjusted according to the load and traffic pattern.

[0026] At the end of each time window, the DPU calculates the access frequency of each code based on the count value counted by the Sketch algorithm. When the access frequency of a code in the time window exceeds the preset threshold, the code is marked as a hotspot candidate.

[0027] Preferably, according to the present invention, hotspot decoding includes:

[0028] After hotspot filtering, the key values ​​marked as hotspot candidates are decoded; the data processing unit decodes the hotspot codes in parallel, extracts the server address, link status, workload type and server load information from the hotspot codes, and the decoded hotspot information is stored in the cache.

[0029] Further preferably, hotspot decoding includes:

[0030] The data processing unit distributes the decoding tasks to multiple SoC cores for parallel decoding processing; each SoC core is responsible for the decoding processing of a subtask in the hotspot candidate;

[0031] The data processing unit is managed through DRAM memory and the bandwidth is dynamically allocated through the PCIe interface;

[0032] After the data processing unit decodes the physical location and link information of a server, the data will be transmitted back to the host through the PCIe interface.

[0033] Further preferably, the data processing unit processes all codes in the hotspot information, i.e., the hotspot candidate items, in stages through a top-down decoding algorithm; including:

[0034] The data processing unit decodes the physical location of a server among the hotspot candidates and uses the parallel processing capabilities of the SoC core to identify the server load situation; if the link of a server is overloaded, the data processing unit prioritizes decoding the hotspot key value information related to the link on the server, and further analyzes the specific workload type and link status that caused the overload.

[0035] Further preferably, during the hotspot decoding process, data is preloaded and accessed through the L2 / L3 cache of the DPU.

[0036] Further preferably, before hot spot decoding, the hot spot candidates are temporarily stored in the L2 / L3 cache.

[0037] A general key-value storage hotspot detection system based on a data processing unit, including:

[0038] The hotspot encoding module is configured to: encode the received key-value request;

[0039] The hotspot filtering module is configured to: filter the requests by a preset threshold value and filter out non-hotspot key values;

[0040] The hotspot decoding module is configured to: decode the filtered hotspot key value;

[0041] The hotspot query module is configured to query and process the hotspot key values ​​to complete the hotspot detection task.

[0042] The beneficial effects of the present invention are:

[0043] 1. Through the multi-core architecture of DPU and Sketch algorithm, the present invention can quickly and accurately detect hot spots in a high-load environment.

[0044] 2. Compared with traditional central server solutions, DPU does not require large-scale replacement of existing equipment, reducing system resource usage.

[0045] 3. DPU can dynamically schedule resources to adapt to distributed systems of different sizes, thus improving the scalability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a structural block diagram of a data processing unit;

[0047] Figure 2 This is a schematic diagram of the pipeline-based sketch execution model;

[0048] Figure 3 This is a schematic diagram of the RTC-based sketch execution model;

[0049] Figure 4 This is a schematic diagram of the hotspot detection architecture based on DPU universal key-value storage; DETAILED DESCRIPTION

[0050] The present invention will be further defined below in conjunction with the accompanying drawings and embodiments, but is not limited thereto.

[0051] Example 1

[0052] A general key-value storage hotspot detection method based on a data processing unit, comprising:

[0053] like Figure 1 As shown, the data processing unit includes a SoC core, DRAM memory, L2 / L3 cache (secondary / third level cache), PCIe interface, and network card; the SoC core is responsible for executing the main computing tasks of the data processing unit, such as hotspot detection and data processing. DRAM memory is used to store intermediate data in the process of hotspot encoding and decoding, as well as temporary data required to perform computing tasks; L2 / L3 cache is used to accelerate data access and storage, and reduce the latency of reading data from DRAM. The PCIe interface is used to communicate with the central server to ensure fast data transmission between the host and the data processing unit; the network card is connected to the external network to receive and transmit data; the data processing unit is connected to the central server through the PCIe interface, and is connected to the external network through the network card, which can efficiently process hotspot requests of distributed systems. As shown Figure 4 As shown in the figure, this method communicates with the central server and the external network through the network card and PCIe interface of the data processing unit to collect telemetry data, and performs hotspot detection tasks through hardware resources such as SoC core, DRAM memory, L2 / L3 cache, etc. The system adopts a pipeline model (PL) and a real-time computing model (RTC), which are dynamically switched according to different task requirements to ensure rapid detection and processing of hotspots.

[0054] Hotspot encoding: Encode the received key-value request for subsequent processing.

[0055] Hotspot filtering: Filter requests by preset thresholds to filter out non-hotspot key values;

[0056] Hotspot decoding: Decode the filtered hotspot key values ​​so that the system can process them quickly;

[0057] Hotspot query: Query and process hotspot key values ​​to complete hotspot detection tasks.

[0058] The present invention can minimize resource consumption and improve the scalability of the system while maintaining high detection accuracy and throughput.

[0059] Example 2

[0060] According to a general key-value storage hotspot detection method based on a data processing unit described in embodiment 1,

[0061] Hotspot coding; including:

[0062] After receiving the key-value storage request sent by the external network or host, the encoding process is first performed. The purpose of encoding is to prepare for subsequent filtering, decoding and query operations to ensure that the request data can be quickly identified and processed. The data processing unit uses the SoC core to encode the relevant attributes of the key-value request, which include key value, request type, server address, link load, timestamp, request source IP address, target IP address, and request size, and stores the encoded information obtained after encoding in the cache. So that the system can quickly access this encoded information.

[0063] Hotspot coding; including:

[0064] As a core component, the data processing unit directly handles key-value storage requests from the host or external network. In order to effectively manage these requests, a layered coding technology is used to encode the relevant attributes of the key-value request and generate a hotspot code; specifically, the layered coding refers to encoding the various attributes of the key-value request in multiple levels according to a certain priority, and the specific steps are as follows: the first layer of coding: encoding the key value and request type (read / write) to ensure that each key-value request has a unique identifier; the second layer of coding: encoding the server address to facilitate the location of the requested server. The third layer of coding: encoding the link load status to reflect the load status of the server. For example, for the request (key1 write server31), the first layer of coding generates a unique identifier for the key value key1 and the operation type write, the second layer of coding generates a unique physical address identifier for server31, and the third layer of coding represents the link load status. This layered coding can hierarchically manage the key value, request type and location, which is more convenient for subsequent hotspot detection and query. For each key-value request (such as key, load, addr), the DPU performs layered coding. The encoded hotspot code contains the server physical address, request type (read or write), and link or load information.

[0065] In hotspot encoding, the data processing unit uses cache, including L2 / L3 cache, to accelerate data encoding and processing, and dynamically schedules resources. Specifically, it means: (1) The data processing unit dynamically allocates L2 / L3 cache space according to the concurrency and computing requirements of the current request to ensure the cache hit rate under high concurrency. (2) Task priority scheduling: The data processing unit schedules different requests according to the priority of the request, and high-priority requests can obtain computing resources and bandwidth first. (3) Resource adaptive adjustment: The data processing unit adjusts the allocation of DRAM and cache in real time by monitoring the system load and link status to avoid bottlenecks. Ensure that the encoding operation is completed quickly in high-concurrency scenarios. Suppose there is a key-value request "(key1,write,server31)", which means that the key1 of a write operation is forwarded to server31. The encoding result will be the unique identifier assigned to these fields. This identifier will be used as the input for subsequent steps.

[0066] Hotspot filtering; including:

[0067] After the encoding is completed, the hotspot filtering operation is performed through the DPU. The purpose of filtering is to filter out possible hotspot key values ​​through the preset access frequency threshold and filter out non-hotspot key values. Specifically, the DPU uses the Sketch algorithm deployed on the data plane to perform partial key value queries on each encoded key value request and calculate the access frequency of these key value requests in each time window. Key values ​​with access frequencies exceeding the threshold will be marked as hotspot candidates, and these hotspot candidates will be saved in the cache for further processing.

[0068] Hotspot filtering; including:

[0069] After the hotspot coding is completed, the hotspot coding filtering operation is performed through the DPU. The DPU performs filtering tasks in the data plane and deploys the Sketch algorithm, which is an efficient and low-memory probabilistic data structure. The Sketch algorithm counts the access frequency of key-value requests without relying on large-scale storage and filters out hotspot candidates.

[0070] (1) Sketch algorithm deployment and execution: The DPU uses a multi-core SoC architecture to perform partial key query on all incoming codes in the data plane; through the Sketch algorithm, a hash function is used to map each key value to different buckets, and the count value of each bucket is maintained; each hot code is processed by multiple hash functions to reduce the hash conflict problem when a single key value is frequently accessed. Specifically, the SoC core of the data processing unit is responsible for calculating multiple hash functions and mapping each code to the corresponding bucket. Each access updates the count value of the corresponding bucket. The Sketch algorithm counts the access frequency of key value requests based on the count value; specifically, it includes:

[0071] Calculation of hash functions: The data processing unit uses multiple hash functions (such as MurmurHash) to map each key value to a different bucket;

[0072] Mapping process: Generate multiple hash values ​​by hashing the key value and map these hash values ​​into fixed-size buckets;

[0073] Count value update: Every time a key value request enters the data processing unit, the count value of the corresponding bucket is updated. If multiple hash functions are mapped to the same bucket, the maximum count value is taken.

[0074] Access frequency statistics: The access frequency of the key value is calculated by periodically summarizing the count values ​​of each bucket.

[0075] For example, the key value request "key1" is mapped to bucket A and bucket B through two hash functions. The count value of bucket A is 5, and the count value of bucket B is 7. The system finally counts the frequency of "key1" as 7. For multiple identical key value requests "(key1,write,server31)", "key1" is mapped to multiple different buckets through the hash function, and the count value of the bucket is increased. As the number of requests increases, the system can quickly determine whether "key1" has become a hot spot.

[0076] (2) Time window statistics and access frequency calculation: The DPU counts all incoming hotspot codes within each time window; the Sketch algorithm is executed on the DPU at fixed time intervals, and the duration of each time window is adjusted according to the load and traffic pattern; the time window size is dynamically adjusted according to the system's traffic pattern and load conditions: During high traffic periods: shorten the time window (for example, 1 second) to detect hotspots in a timely manner. During low traffic periods: appropriately extend the time window (for example, 5 seconds) to reduce resource consumption. For example, when the system traffic increases, the DPU will automatically adjust the time window to 1 second and count the hotspot request frequency per second; when the traffic decreases, the DPU will adjust the time window to 5 seconds to reduce the calculation frequency.

[0077] Through time window management, the DPU can effectively handle high-concurrency requests and reduce memory usage. At the end of each time window, the DPU calculates the access frequency of each code based on the count value of the Sketch algorithm. The access frequency is an important indicator for the system to determine hot spots. When the access frequency of a code in the time window exceeds the preset threshold, the code is marked as a hot spot candidate.

[0078] Specifically, the SoC core of the DPU executes the Sketch algorithm in parallel and dynamically updates the count value in the Sketch structure based on the number of accesses to the key-value requests. For each time window, the system summarizes the access frequencies of all encodings and filters out hotspot candidates based on the preset threshold at the end of the time window. The screening process for hotspot candidates does not rely on a large amount of memory, so the DPU can perform efficient filtering operations under resource-constrained conditions. For example, if the number of accesses to multiple key-value requests "(key1,write,server31)" exceeds the threshold set by the system within the time window, the DPU will mark "key1" as a hotspot candidate and record this result in the Sketch data structure.

[0079] Hotspot decoding; including:

[0080] After hotspot filtering, the key values ​​marked as hotspot candidates are decoded; the data processing unit uses its multi-core architecture to decode the hotspot code in parallel, extracts the server address, link status, workload type and server load information from the hotspot code, and the decoded hotspot information is stored in the cache, providing fast access support for subsequent query operations.

[0081] Hotspot decoding; including:

[0082] The data processing unit distributes the decoding tasks to multiple SoC cores for parallel decoding through its multi-core SoC architecture; each SoC core is responsible for decoding a subtask in the hotspot candidate; for example, one SoC core may be responsible for decoding the physical location of the server, another core processes the link status, and other cores process the workload type and associated key values ​​in parallel. This parallel decoding mode can significantly improve the decoding speed and reduce the computing load of a single core.

[0083] The data processing unit is efficiently managed through DRAM memory and dynamically allocates bandwidth through the PCIe interface. The data processing unit uses specific algorithms (for example, based on traffic statistics and load balancing algorithms) to decode the link status and evaluate the link utilization and congestion. The workload type is parsed by analyzing the metadata of the request, and common types include read / write operations and computationally intensive tasks. The link bandwidth utilization U = T (used) / T (total), where T (used) is the used bandwidth and T (total) is the total bandwidth of the link. The data processing unit determines whether there is an overload by calculating the link status. During the decoding process, it is ensured that hotspot information can interact between the host and the external network with the optimal transmission path.

[0084] When the data processing unit decodes the physical location and link information of a server, the data will be quickly transmitted back to the host through the PCIe interface, thereby reducing the CPU load of the host. The independent processing capability of the DPU avoids the large amount of resource occupation of the central server in traditional solutions.

[0085] The data processing unit processes the hotspot information, i.e., all the codes in the hotspot candidates, in stages through a top-down decoding algorithm; including:

[0086] The data processing unit decodes the physical location of a server among the hotspot candidates and uses the parallel processing capabilities of the SoC core to identify the server load situation; if a server's link is overloaded, the data processing unit prioritizes decoding the hotspot key value information related to the link on the server, and further analyzes the specific workload type and link status that caused the overload. The DPU prioritizes the use of L2 / L3 cache during the decoding process to reduce access to DRAM. Dynamic bandwidth allocation: By monitoring the bandwidth requirements of decoding tasks, the DPU dynamically allocates PCIe bandwidth to ensure that high-priority decoding tasks receive sufficient bandwidth support and improve transmission efficiency. At each step of decoding, the DPU ensures efficient flow of data on the decoding path through effective management of cache and bandwidth.

[0087] For example, suppose the DPU detects that the link of server "server31" is overloaded during the decoding process. The DPU first decodes the physical location of the server, confirms the overload status, and quickly extracts the hot key value related to the server, and further decodes the link status and the specific workload that caused the overload. Each step of decoding is optimized through the DPU's multi-core parallel processing and cache acceleration technology to reduce unnecessary decoding overhead.

[0088] During hotspot decoding, data is preloaded and efficiently accessed through the DPU's L2 / L3 cache, which improves the speed of decoding operations.

[0089] Before hotspot decoding, hotspot candidates are temporarily stored in the L2 / L3 cache. This ensures that when the SoC core performs decoding operations, there is no need to frequently access external DRAM, thereby reducing memory access latency. The DPU cache can handle a large number of key-value requests and related decoding tasks in a short period of time, making decoding tasks more real-time.

[0090] Figure 2 The pipeline execution process of the PL model is shown, and each task is processed in multiple stages in sequence. Each stage has an independent execution queue, and tasks are passed to the next stage after completion of one stage. Each stage in the pipeline can work in parallel to ensure efficient system processing. The pipeline model (PL) is mainly used to process large quantities of decomposable tasks. This model is suitable for batch processing of a large number of key-value requests and can maintain system efficiency under high throughput. Its processing method is similar to the production line in a factory, breaking down tasks into multiple stages and processing each stage in parallel. The working mechanism of the PL model is as follows:

[0091] Step 1: Task decomposition: Each key-value request is decomposed into multiple subtasks. Typically, these subtasks include operations such as hotspot encoding, filtering, decoding, and querying.

[0092] Step 2: Stage processing: Each subtask is executed in parallel in different pipeline stages. For example, the encoding stage is executed first to encode the relevant attributes of the request; the next stage is the filtering stage, which uses the Sketch algorithm to filter out hotspot candidates; the next stage is the decoding stage, which decodes and extracts the specific information of the hotspot, and finally enters the query stage.

[0093] Step 3: Parallel operation: Multiple SoC cores in the DPU are responsible for executing different pipeline stages. These cores process different stages of different requests in parallel, for example, one core is responsible for hotspot encoding and another core is responsible for decoding. Due to the parallel processing of the pipeline, the PL model can process a large number of requests at the same time, which is particularly suitable for high-concurrency large-scale key-value storage systems.

[0094] Figure 3 The single-core / multi-core binding execution mechanism of the RTC model is demonstrated. For each high-priority task, the system assigns it directly to a specific SoC core, and the core will independently execute the entire task process to ensure minimal latency. The real-time computing model (RTC) is mainly used to process tasks that require fast response and low latency. This model is often used in mission-critical scenarios, such as urgent hotspot detection or high-priority user requests. Unlike the pipeline model, the RTC model directly processes tasks by binding single or multi-cores, avoiding the delay caused by multi-stage processing. The working mechanism of the RTC model:

[0095] Step 1: Task priority assignment: When the system detects that some tasks have high priority (for example, hotspot detection requests or scheduling tasks under resource constraints), the system will mark the task as a real-time computing task.

[0096] Step 2: Single-core binding execution: To ensure the real-time performance of the task, the DPU binds the task to one or more dedicated SoC cores for processing. These cores no longer handle other pipeline tasks, but independently complete the entire task flow, including all steps such as hotspot encoding, filtering, decoding, and querying.

[0097] Step 3: Real-time feedback: After the task is processed, the system immediately feeds back the result without waiting for the completion of other pipeline tasks. This approach ensures a fast response to critical tasks. Since the RTC model does not have the waiting time of multi-stage pipelines, the RTC model can greatly reduce the response delay of tasks. The RTC model ensures that high-priority tasks are not interfered with by other concurrent tasks, and the dedicated processing core ensures real-time performance.

[0098] The system's dynamic switching between the pipeline model (PL) and the real-time computing model (RTC) is determined by the priority and urgency of the task. The specific process is as follows:

[0099] 1) Task type determination:

[0100] When the system detects that the request has a lower priority (such as a batch-processed key-value storage request), the task will enter the PL model and be executed in stages through the pipeline mode.

[0101] When high-priority tasks (such as hotspot detection requests or real-time scheduling requests) are detected, the system triggers the RTC model to execute these tasks immediately.

[0102] 2) Resource scheduling and allocation:

[0103] PL model resource allocation: Under the pipeline model, the DPU dynamically allocates resources based on the load and task volume of each stage, and usually multiple SoC cores will participate in task processing.

[0104] RTC model resource allocation: Under the RTC model, the DPU will prioritize the allocation of single-core or multi-core processing resources to high-priority tasks, and queue or delay other low-priority tasks.

[0105] 3) Switching process:

[0106] a) When the priority of a task changes, or the system load reaches a certain threshold, the system automatically switches from the pipeline model to the real-time computing model. For example, when the frequency of a key-value store request increases abnormally, causing it to become a hotspot, the system will immediately switch it from the PL model to the RTC model and bind a single core or multiple cores for hotspot detection processing. Conversely, when the high-priority task is completed, the system will reallocate resources to the pipeline model and resume parallel processing.

[0107] b) Assume that when the system is processing a batch of key-value storage requests, the system uses the PL model by default. Each request goes through the pipeline stages of encoding, filtering, decoding, etc. Suddenly, a key value (such as key1) is frequently requested in a short period of time, and the system detects that the key value has become a hotspot. In order to respond to this change quickly, the system dynamically switches to the RTC model, binds key1-related requests to a specific SoC core, prioritizes key1 requests, and after completing hotspot detection, feeds the results back to the system.

[0108] Example 3

[0109] A general key-value storage hotspot detection system based on a data processing unit, including:

[0110] The hotspot encoding module is configured to: encode the received key-value request;

[0111] The hotspot filtering module is configured to: filter the requests by a preset threshold value and filter out non-hotspot key values;

[0112] The hotspot decoding module is configured to: decode the filtered hotspot key value;

[0113] The hotspot query module is configured to query and process the hotspot key values ​​to complete the hotspot detection task.

Claims

1. A general key-value storage hotspot detection method based on a data processing unit, characterized in that: include: The data processing unit includes SoC core, DRAM memory, L2 / L3 cache, PCIe interface, and network card; The SoC core is responsible for performing the main computing tasks of the data processing unit; DRAM memory is used to store intermediate data during hotspot encoding and decoding, as well as temporary data required to perform computing tasks; L2 / L3 cache is used to accelerate data access and storage; The PCIe interface is used to communicate with the central server to ensure fast data transmission between the host and the data processing unit; the network card is connected to the external network to receive and transmit data; Hotspot encoding: Encode the received key-value request; Hotspot filtering: Filter requests by preset thresholds to filter out non-hotspot key values; Hotspot decoding: decode the filtered hotspot key values; Hotspot query: Query and process hotspot key values ​​to complete hotspot detection tasks.

2. A method for detecting hot spots in a universal key-value storage system based on a data processing unit according to claim 1, characterized in that: Hotspot coding; including: The data processing unit uses the SoC core to encode the relevant attributes of the key-value request, including the key value, request type, server address, link load, timestamp, request source IP address, target IP address, and request size, and stores the encoded information obtained after the encoding process in the cache.

3. A method for detecting hot spots in a universal key-value storage system based on a data processing unit according to claim 2, characterized in that: Hotspot coding; including: Adopt layered coding technology to encode the relevant attributes of key-value requests and generate hotspot codes; specifically, it includes: The first layer of encoding: encodes the key value and request type to ensure that each key value request has a unique identifier; the second layer of encoding: encodes the server address; the third layer of encoding: encodes the link load status to reflect the server load status.

4. A method for detecting hot spots in a universal key-value storage system based on a data processing unit according to claim 2, characterized in that: In hotspot encoding, the data processing unit uses cache including L2 / L3 cache to accelerate data encoding and processing, and dynamically schedules resources.

5. A method for detecting hot spots in a universal key-value storage system based on a data processing unit according to claim 1, characterized in that: Hotspot filtering; including: Hotspot filtering operations are performed through the DPU; possible hotspot key values ​​are screened out through the preset access frequency threshold, and non-hotspot key values ​​are filtered out; specifically, the DPU uses the Sketch algorithm deployed on the data plane to perform partial key value queries on each encoded key value request, and calculates the access frequency of these key value requests in each time window. Key values ​​with access frequencies exceeding the threshold will be marked as hotspot candidates, and these hotspot candidates will be saved in the cache for further processing.

6. A method for detecting hot spots in a universal key-value storage system based on a data processing unit according to claim 1, characterized in that: Hotspot filtering; including: (1) Sketch algorithm deployment and execution: The SoC core of the data processing unit is responsible for calculating multiple hash functions and mapping each code to the corresponding storage bucket. Each access updates the count value of the corresponding storage bucket. The Sketch algorithm counts the access frequency of key-value requests based on the count value. (2) Time window statistics and access frequency calculation: The DPU counts all incoming hotspot codes in each time window. The Sketch algorithm is executed on the DPU at fixed time intervals, and the duration of each time window is adjusted according to the load and traffic pattern. At the end of each time window, the DPU calculates the access frequency of each code based on the count value counted by the Sketch algorithm. When the access frequency of a code in the time window exceeds the preset threshold, the code is marked as a hotspot candidate.

7. A method for detecting hot spots in a universal key-value storage system based on a data processing unit according to claim 1, characterized in that: Hotspot decoding; including: After hotspot filtering, the key values ​​marked as hotspot candidates are decoded; the data processing unit decodes the hotspot codes in parallel, extracts the server address, link status, workload type and server load information from the hotspot codes, and the decoded hotspot information is stored in the cache.

8. A method for detecting hot spots in a universal key-value storage system based on a data processing unit according to claim 1, characterized in that: Hotspot decoding; including: The data processing unit distributes the decoding tasks to multiple SoC cores for parallel decoding processing; each SoC core is responsible for the decoding processing of a subtask in the hotspot candidate; The data processing unit is managed through DRAM memory and the bandwidth is dynamically allocated through the PCIe interface; After the data processing unit decodes the physical location and link information of a server, the data will be transmitted back to the host through the PCIe interface.

9. A general key-value storage hotspot detection method based on a data processing unit according to any one of claims 1 to 8, characterized in that: The data processing unit processes the hotspot information, i.e., all the codes in the hotspot candidates, in stages through a top-down decoding algorithm; including: The data processing unit decodes the physical location of a server in the hotspot candidate and uses the parallel processing capability of the SoC core to identify the server load. If a server's link is overloaded, the data processing unit will first decode the hotspot key value information related to the link on the server and further analyze the specific workload type and link status that caused the overload. Further preferably, during the hotspot decoding process, data is preloaded and accessed through the L2 / L3 cache of the DPU; further preferably, before the hotspot decoding, the hotspot candidates are temporarily stored in the L2 / L3 cache.

10. A general key-value storage hotspot detection system based on a data processing unit, characterized in that: include: The hotspot encoding module is configured to: encode the received key-value request; The hotspot filtering module is configured to: filter the requests by a preset threshold value and filter out non-hotspot key values; The hotspot decoding module is configured to: decode the filtered hotspot key value; The hotspot query module is configured to query and process the hotspot key values ​​to complete the hotspot detection task.

Citation Information

Patent Citations

  • System resource scheduling method and device and storage medium

    CN110149394A

  • Method for detecting hot academic research topics in distributed academic data warehouse

    CN112149416A

  • Key value storage hotspot monitoring system and method based on programmable switch

    CN118433075A

  • Apparatus and method for improving power-performance using a software analysis routine

    US20180173291A1