A resource-efficient in-network computing system

By combining task decomposition, mixed integer programming, and the Gurobi optimizer, the problem of low resource utilization efficiency in intranet computing systems is solved, enabling efficient management of resources between and within switches, and improving system performance and flexibility.

CN119316299BActive Publication Date: 2025-10-24ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411437843.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-10-24
Estimated Expiration
2044-10-15

AI Technical Summary

Technical Problem

In existing technologies, network-based computing systems suffer from inefficient resource utilization and excessive resource overhead, especially in the management of task replicas between and within switches.

Method used

The task analyzer decomposes the network computing tasks into multiple operations, uses a mixed-integer programming optimizer to minimize the number of task replicas between switches, and a task placer ensures correct execution. A directed acyclic graph and a Gurobi solver are used to optimize the task offloading scheme.

Benefits of technology

It achieves efficient utilization of network computing system resources, reduces resource overhead between and within switches, improves performance, and maintains the flexibility and practicality of the offloading scheme.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119316299B_ABST
    Figure CN119316299B_ABST
Patent Text Reader

Abstract

The application discloses a resource high-efficiency utilization in-network computing system, which comprises a task analyzer, a network in computing optimizer and a task placer. The task analyzer is used for automatically summarizing the attributes of each task, including the components and their dependency relationship, so as to obtain the analysis result of the task analyzer output. The network in computing optimizer is used for accepting the network topology and the in-network computing intention and the analysis result of the task analyzer output as the input thereof, taking the number of task copies between switches as the optimization target, and optimizing the task by using the mixed integer programming, so as to obtain the optimal unloading scheme. The task placer is used for enforcing the optimal unloading scheme and ensuring the execution correctness of each task. The in-network computing problem is converted into an optimization problem, so that the task copy copies generated in the existing in-network computing can be reduced, and the resource utilization rate of the in-network computing is increased. Compared with the prior art, the application has faster computing speed and lower overhead. The application is simple and convenient to operate and has strong practicability.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of resource deployment utilization and in-network computing technology, and particularly relates to a resource efficient utilization in-network computing system. BACKGROUND

[0002] In-network computing (INC) is a new paradigm that offloads computing tasks from software to the data plane of the network, which brings very important advantages to offloaded tasks, including full-line throughput, microsecond latency, power efficiency and data reduction. In-network computing focuses on tasks such as key-value storage, measurement, machine learning aggregation, compression, consensus and coordination. The advantages of in-network computing come from multi-pipeline data plane switches, which enable offloaded tasks to have strong processing power in the ASIC chip pipeline.

[0003] Mixed integer programming (MIP) is a mathematical optimization model, which is different from linear programming (LP). In mixed integer programming, some variables must be integers, and the goal is to find the optimal value of the variables so that the objective function reaches the maximum or minimum value, while satisfying a set of linear inequality or equality constraint conditions.

[0004] Sketch is a fast and low-overhead network measurement technology based on probability algorithms. It uses fixed-size data structures and hash algorithms to compress network traffic information and retain key features, reducing storage and computing overhead while maintaining high measurement accuracy, thereby quickly capturing network traffic features and providing real-time measurement results. SUMMARY

[0005] The present application aims at the deficiencies of the prior art, and provides a resource efficient utilization in-network computing system. The present application minimizes the task copy copies generated in in-network computing through MIP, realizing resource efficient utilization of the data plane.

[0006] The purpose of the present application is achieved by the following technical scheme: a resource efficient utilization in-network computing system, comprising:

[0007] A task analyzer is configured to automatically summarize the attributes of each in-network computing task, including components and their dependency relationships, to obtain an analysis result output by the task analyzer; wherein the components are obtained by decomposing the task into a plurality of operations, and the components include the plurality of operations after task decomposition.

[0008] an in-network computing optimizer, configured to accept the network topology and in-network computing intents and the analysis results output by the task analyzer as its inputs, to minimize the number of task replicas among switches as an optimization objective, to optimize the in-network computing tasks by using mixed integer programming, to determine how to place the in-network computing tasks on the data plane switches, and to obtain an optimal offloading scheme; and

[0009] a task placer, configured to enforce the optimal offloading scheme output by the in-network computing optimizer and to ensure the execution correctness of each in-network computing task.

[0010] Further, the task analyzer is implemented by the following steps:

[0011] S1.1, the task analyzer accepts in-network computing tasks as its inputs, to automatically parse and analyze the highly heterogeneous in-network computing tasks in a unified manner, to convert the tasks into a directed acyclic graph; wherein the directed acyclic graph is a directed acyclic graph of a plurality of operations corresponding to the task;

[0012] S1.2, based on the directed acyclic graph, the task analyzer analyzes the execution dependency and resource consumption of each task to obtain an intermediate representation analysis result of the directed acyclic graph as the analysis result output by the task analyzer.

[0013] Further, the in-network computing optimizer is implemented by the following steps:

[0014] S2.1, the in-network computing optimizer accepts the network topology and in-network computing intents and the analysis results output by the task analyzer as its inputs;

[0015] S2.2, set the optimization objective of the in-network computing optimizer, maximize resource efficiency by minimizing the number of task replicas among switches;

[0016] S2.3, set the constraint condition for the optimization objective of the in-network computing optimizer;

[0017] S2.4, set the priority for the optimization objective of the in-network computing optimizer, and use Gurobi to solve under its constraint condition to generate Pareto optimal points to determine how to place the in-network computing tasks on the data plane switches, and to obtain an optimal offloading scheme.

[0018] Further, the network topology is represented using an undirected graph G=(V, E), wherein V represents a set of switches, E represents a set of physical links, the set of switches V includes switch ports and N v switch pipelines, each switch port corresponds to a specific switch pipeline, represents the switch pipeline to which the switch port p belongs, and each switch pipeline There are k matching action stages, including PHV, TCAM, SRAM, ALUs, VLIWs and hash bits throughout the k stages;

[0019] The in-network computing intention is specifically a set of user interest flows {f} that each in-network computing task aims to process, each flow f is routed through a set of switches according to its routing rules, so as to transform f into a routing path containing all switch pipelines traversed by f, denoted as

[0020] The analysis result output by the task analyzer is stored in a set of in-network computing tasks {T i}, including the intermediate representation analysis result of a directed acyclic graph; wherein, T i ={M j} represents the i-th in-network computing task, M j is the j-th matching action table in the in-network computing task T i , M j ={P(M j ), A(M j ), R(M j )} and the resource consumption of M j is recorded in and , represents the PHV resource consumption of M j , represents the TCAM resource consumption of M j , represents the SRAM resource consumption of M j , represents the ALUs resource consumption of M j , represents the VLIWs resource consumption of M j , represents the hash resource consumption of M j , and the edges between the matching action tables in the directed acyclic graph are recorded in the Boolean variable D(M i , M j ).

[0021] Further, the optimization target of the in-network computing optimizer specifically includes:

[0022]

[0023] wherein, x(M, v) represents whether the matching action table M is placed on the switch v; represents whether the matching action table M is placed on the switch pipeline P; ISC phv (M i , M j) represents the matching action table M corresponding to PHV i and M j The number of inter-switch task copies, ISC act (M i ,M j ) represents the matching action table M corresponding to ALUs, VLIWs and hash i and M j The number of inter-switch task copies, ISC reg (M i ,M j ) represents the matching action table M corresponding to TCAM and SRAM i and M j The number of task copies between switches is obtained by the following formula:

[0024]

[0025] Among them, P(M i ) represents M i The set of data packet header fields and metadata fields used; x(M i ,v) represents M i Is it placed on switch v? If M i Placed on switch v, then x(M i ,v)=1;x(M i ,v)·x(M j ,v)=0 is to ensure that M i and M j Not on the same switch v.

[0026] Furthermore, the constraints specifically include:

[0027] S2.3.1. To ensure that the in-network computing task T can be successfully offloaded to the switch, the in-network computing optimizer first performs node deployment. Specifically, the matching action table of each in-network computing task T is deployed on at least one switch and one switch pipeline, expressed as:

[0028]

[0029] Then edge deployment is performed, specifically: each edge is recorded in D(M i ,M j ), if M i and M j Placed on the same switch, D(M i ,M j )=1, and M i In M j For each in-network computing task, M ithe last pipeline stage of M j , denoted as:

[0030]

[0031] where ρ end (M i ) denotes the number of the last pipeline stage of M i , ρ begin (M j ) denotes the number of the first pipeline stage of M j , D(M i , M j ) denotes the execution dependency between M j and M i ;

[0032] Secondly, set the resource limit, specifically: for each switch pipeline , the total resource consumption of all matching action tables offloaded to the switch pipeline should be less than or equal to the total capacity of the switch pipeline, denoted as:

[0033]

[0034] wherein, denotes the resource consumption of M , denotes the total resource capacity of the switch pipeline;

[0035] Finally, add the limit of the number of stages of each switch pipeline, that is, the maximum number of stages of a matching action table should be less than or equal to the limit k, denoted as:

[0036]

[0037] wherein, ρ end (M) denotes the number of the last pipeline stage of the matching action table M, and k denotes the number of matching action stages of each switch pipeline;

[0038] S2.3.2, add the following constraint condition to maintain the in-network computing intent, specifically: in each routing path f, the matching action table of the task T targeted at the flow f should be placed on the switch pipeline of the routing path f, denoted as:

[0039]

[0040] S2.3.3, add the following constraint condition to avoid the internal task copy of the switch, specifically: for a matching action table M in a network computing task T, if any user interest flow does not pass through a switch pipeline Then the definition of the Irrespective of M, is expressed as:

[0041]

[0042] Further, the task placer achieves by the following steps:

[0043] S3.1, obtaining a plurality of task segments based on the optimal offloading scheme output by the in-network computing optimizer Wherein represents the task segment of the in-network computing task T offloaded to the switch v, which includes all the matching action tables offloaded to the switch v, and is expressed as

[0044] S3.2, for each directed acyclic graph of in-network computing task, it is divided into a plurality of small graphs, each small graph corresponds to a task segment and all matching action tables contained in the task segment, and the divided edges are recorded using the set Φ;

[0045] S3.3, for each edge in the set Φ, the execution dependency relationship of the upstream matching action table to the downstream matching action table is reconstructed, specifically: when the upstream matching action table and the downstream matching action table are placed on different switches, for any edge, M j The task segment after the task segment containing M i must be executed to determine whether M j and M i have an execution dependency relationship, and then the execution dependency relationship of M i to M j is reconstructed;

[0046] S3.4, for each task segment, the task placer calls the switch compiler on the software development environment of the target switch to compile the task segment and the system requirement protocol; after compilation, the matching action table in the task segment and the system requirement protocol are converted into switch configuration to complete the execution correctness of the optimal offloading scheme.

[0047] The beneficial effects of the present application are that the present application can automatically analyze various in-network computing task inputs, make optimal offloading decisions according to the analysis results, reduce the resource overhead between and inside the switches by offloading Sketch, NF and other tasks to the data plane switches; the present application has higher performance and lower overhead; the method described in the present application is simple and convenient, flexible to implement, and has strong practicality. BRIEF DESCRIPTION OF DRAWINGS

[0048] Figure 1 is a schematic view of the resource efficient in-network computing system of the present application;

[0049] Figure 2 is an example diagram of a resource-efficient in-network computing system of the present application; DETAILED DESCRIPTION

[0050] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, like reference numerals refer to like elements, unless the context clearly dictates otherwise. The following exemplary embodiments described herein are not meant to be limiting of all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the appended claims. It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.

[0051] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0052] It will be understood that, although the terms first, second, third, etc. can be used herein to describe various information, these terms are not intended to denote a temporal or chronological order. Rather, these terms are used only to distinguish one from another. For example, a first information can be termed a second information, and similarly, a second information can also be termed a first information, without departing from the scope of the present application. As used herein, the word "if' can be construed to mean "when" or "in response to determining" depending on the context. Furthermore, the term "comprising" or "including" or any other variant is intended to cover both nonexclusive and exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements is not necessarily limited to those elements, but can include other elements not expressly listed or inherent to such process, method, article, or apparatus.

[0053] The present application will be described in detail below with reference to the attached drawings. The features of the embodiments and implementation described below can be combined with each other, as far as there is no conflict.

[0054] The resource-efficient in-network computing system of the present application has a framework as shown in Figure 1As shown, the Sketch, NF, etc. tasks can be automatically offloaded to the in-network computing elements for execution. The in-network computing system includes a task analyzer, an in-network computing optimizer, and a task placer. Among them, the mathematical symbols used in the present application and their meanings are shown in Table 1.

[0055] Table 1: Mathematical symbols used in the present application and their meanings

[0056]

[0057]

[0058] In this embodiment, the task analyzer is used to automatically summarize the properties of each in-network computing task, including the components and their dependencies, to obtain the analysis results output by the task analyzer. Among them, the components are obtained by decomposing the task into multiple operations, and the components include the multiple operations after task decomposition.

[0059] It should be understood that the decomposition of a task into multiple operation components includes: ① filtering, ② decoding, ③ finding the maximum / minimum value, ④ judging whether the data exists, ⑤ merging, ⑥ flow statistics, etc. These multiple operations are the components corresponding to the task.

[0060] Further, the task analyzer is implemented by the following steps:

[0061] S1.1, the task analyzer accepts the in-network computing task as its input, automatically parses and analyzes the highly heterogeneous in-network computing task in a unified manner, and converts the task into a directed acyclic graph (DAG), which can essentially eliminate cycles and avoid loops to reduce the performance of the switch. Among them, the directed acyclic graph is the directed acyclic graph of the multiple operations corresponding to the task.

[0062] It should be understood that the highly heterogeneous in-network computing task is diversified, and a unified manner needs to be used to automatically parse and analyze these in-network computing tasks to convert the task into a directed acyclic graph. For example, after the task analyzer automatically parses and analyzes a certain task, the task is decomposed into three operations of filtering, finding the maximum value, and merging, wherein there is a dependency relationship between the filtering operation and the merging operation, there is a dependency relationship between the merging operation and the finding the maximum value operation, and there is no dependency relationship between the filtering operation and the finding the maximum value operation; Finally, the task can be converted into a directed acyclic graph "filtering→ merging→ finding the maximum value", wherein → represents that the operations have an execution dependency relationship, that is, the merging operation needs to be completed before the filtering operation.

[0063] S1.2, based on the directed acyclic graph, the task analyzer analyzes the execution dependency and resource consumption of each task to obtain the intermediate representation (IR) analysis result of the directed acyclic graph as the analysis result output by the task analyzer.

[0064] It should be understood that the directed acyclic graph is composed of nodes and edges, and one operation after task decomposition is one node, and the resource consumption of the corresponding operation can be stored in one node. If there is a dependency relationship between two operations, there is an edge between the two nodes, so based on the directed acyclic graph, the execution dependency and resource consumption of the task can be obtained. Among them, the resource consumption is limited by the switch resource, and each operation needs to consume the switch resource. In the three operations of the above example task, if one switch resource is enough to accommodate three operations, then multiple switches do not need to transmit data for this task. But if a switch can only accommodate two, then another operation needs to be placed on another switch, and a certain amount of data needs to be transmitted between the switches, and the system described in the application can minimize the amount of data transmission.

[0065] In this embodiment, the in-network computing optimizer is used to accept the network topology and in-network computing intent and the analysis result output by the task analyzer as its input, to minimize the number of task copies between switches as the optimization target, to optimize the in-network computing task by using mixed integer programming, to determine how to place the in-network computing task on the data plane switch, and to obtain the optimal offloading scheme.

[0066] Specifically, the in-network computing optimizer optimizes the in-network computing task by using mixed integer programming, and based on the analysis result of the task analyzer, the in-network computing can be regarded as an optimization problem. The in-network computing optimizer takes the analysis result output by the task analyzer as its input, and receives the network topology and in-network computing intent as its input, determines how to place the in-network computing task on the data plane switch, and its optimization target is to minimize the number of task copies between switches, and imposes relevant constraints, which can ensure that the total resource used by all in-network computing tasks does not exceed the resource upper limit of the in-network element, and avoids task copies within the switch as much as possible. Finally, the optimal offloading scheme is obtained, which is the output of the in-network computing optimizer.

[0067] Further, the in-network computing optimizer is implemented by the following steps:

[0068] S2.1, the in-network computing optimizer accepts the network topology and in-network computing intent and the analysis result output by the task analyzer as its input.

[0069] where the network topology is represented by an undirected graph G = (V, E), where V represents a set of switches, and E represents a set of physical links, the set of switches V includes N v switches and N i switch pipelines, each switch port corresponds to a specific switch pipeline, represents the switch pipeline to which the switch port p belongs, each switch pipeline has k match-action stages, including PHV (Physical Hypervisor), TCAM (Ternary Content-Addressable Memory), SRAM (Static Random-Access Memory), ALUs (Arithmetic Logic Units), VLIWs (Very Long Instruction Word) and Hash bits throughout the k stages.

[0070] The in-network computing intent is specifically a set of user interest flows {f} that each in-network computing task aims to process, each flow f passes through a set of switches according to its routing rules, therefore, f can be transformed into a routing path containing all the switch pipelines it traverses, denoted as

[0071] The analysis result output by the task analyzer is stored in the set of in-network computing tasks {T i}, which contains the directed acyclic graph intermediate representation analysis result; where T i = {M j} represents the i-th in-network computing task, M j is the j-th match-action table (Match-Action Table, MAT) in the in-network computing task T i , M j = {P(M j ), A(M j ), R(M j )}, the resource consumption of M j is recorded in and , represents the PHV resource consumption of M j , represents the TCAM resource consumption of M j , represents the SRAM resource consumption of M j , represents the ALUs resource consumption of M j , represents the VLIWs resource consumption of M j , represents the Hash resource consumption of M j , the edges between MATs in the directed acyclic graph are recorded in the Boolean variable D(M i , M j ), if Mj Depends on the execution of M i , then D(M i , M j ) = 1, which indicates that there is an execution dependency between M j and M i .

[0072] It should be understood that one MAT corresponds to one operation. The analysis result output by the task analyzer described above is stored in the node of the directed acyclic graph generated by the task analyzer.

[0073] S2.2, set the optimization target of the in-network computing optimizer, maximize resource efficiency by minimizing the number of task replicas between switches.

[0074] Specifically, first, for each pair of matching action tables M i and M j , use ISC(M i , M j ) to represent the number of inter-switch task replicas of M i and M j , which is obtained by the following formula:

[0075]

[0076] wherein ISC phv (M i , M j ) represents the number of inter-switch task replicas of the matching action tables M i and M j corresponding to the PHV, ISC act (M i , M j ) represents the number of inter-switch task replicas of the matching action tables M i and M j corresponding to the ALUs, VLIWs and hash, ISC reg (M i , M j ) represents the number of inter-switch task replicas of the matching action tables M i and M j corresponding to the TCAM and SRAM; P(M i ) represents the set of packet header fields and metadata fields used by M i ; x(M i , v) represents whether M i is placed on switch v, if M i is placed on switch v, then x(M i , v) = 1; x(M i , v)·x(M jv) = 0 is to ensure that M i and M j are not on the same switch v.

[0077] It should be noted that when the match-action tables M i and M j are located on the same switch v, then ISC(M i , M j ) = 0; when the match-action tables M i and M j are located on different switches, i.e. , the intersection operation in the above formula is performed to obtain the corresponding ISC(M i , M j ).

[0078] Then, minimizing the number of inter-switch task replicas is equivalent to minimizing the ISC phv , ISC act , ISC reg of all pairs of match-action tables of the in-network computing tasks {T} of the in-network computing optimizer. Therefore, taking minimizing the number of inter-switch task replicas of the match-action tables M i and M j as the optimization objective of the in-network computing optimizer, it is represented as:

[0079]

[0080] At the same time, the switch also aims to minimize the number of switches or switch pipelines occupied to improve resource utilization, which is represented as:

[0081]

[0082] wherein x(M, v) represents whether the match-action table M is placed on the switch v, and if M is placed on the switch v, then x(M, v) = 1; represents whether the match-action table M is placed on the switch pipeline , and if M is placed on the switch pipeline , then

[0083] S2.3, set a constraint condition for the optimization objective of the in-network computing optimizer.

[0084] Further, the constraint condition specifically includes:

[0085] S2.3.1, to ensure that the in-network computing tasks T can be successfully offloaded to the switches, the in-network computing optimizer first performs node deployment, specifically: the match-action table of each in-network computing task T is deployed on at least one switch and one switch pipeline, which is represented as:

[0086]

[0087] Then, the edge deployment is performed, specifically: each edge is recorded in D(M i ,M j ), if M i and M j are placed on the same switch, then D(M i ,M j ) = 1, and M i is executed in front of M j ; for each in-network computing task, the last pipeline stage of M i should be in front of the first stage of M j , denoted as:

[0088]

[0089] where ρ end (M i ) denotes the number of the last pipeline stage of M i , ρ begin (M j ) denotes the number of the first pipeline stage of M j , and D(M i ,M j ) denotes the execution dependency between M j and M i .

[0090] Secondly, the resource limit is set, specifically: for each switch pipeline the total resource consumption of all matching action tables offloaded to the switch pipeline should be less than or equal to the total capacity of the switch pipeline, denoted as:

[0091]

[0092] where denotes the resource consumption of M, may be and denote the PHV resource consumption, TCAM resource consumption, SRAM resource consumption, ALUs resource consumption, VLIWs resource consumption and hash resource consumption of M, respectively; denotes the total resource capacity of the switch pipeline, may be and respectively represent the total capacity of PHV resource, TCAM resource, SRAM resource, ALUs resource, VLIWs resource and Hash resource of the switch pipeline. For example, when is the corresponding PHV resource limit constraint condition is represented as:

[0093]

[0094] wherein, represents the PHV resource consumption of M, represents the total capacity of PHV resource of the switch pipeline, and the constraint avoids the saturation of PHV resource.

[0095] Finally, the limit of the number of stages of each switch pipeline is added, that is, the maximum number of stages of a matching action table should be less than or equal to the limit k, represented as:

[0096]

[0097] wherein, ρ end (M) represents the number of the last pipeline stage of the matching action table M, and k represents the number of matching action stages of each switch pipeline.

[0098] S2.3.2, the following constraint condition is added to maintain the in-network computing intent, specifically: since each in-network computing task needs to cover a series of its target flows {f}, and each flow f can be regarded as a series of routes: Therefore, in each route path f, the matching action table of the task T targeting the flow f should be placed on the switch pipeline of the route path f, represented as:

[0099]

[0100] Meanwhile, the in-network computing optimizer does not depend on a specific routing algorithm and can accept any routing decision.

[0101] S2.3.3, the following constraint condition is added to avoid the internal task duplication of the switch, specifically: for a matching action table M in an in-network computing task T, if any user interest flow does not pass through a switch pipeline then the is defined regardless of M, represented as:

[0102]

[0103] According to the current constraint condition, the purpose of the in-network computing optimizer is to prevent the in-network computing task from placing the matching action table on the irrelevant switch pipeline.

[0104] S2.4, prioritize the optimization objectives of the in-network computing optimizer and solve it using Gurobi under its constraints to produce Pareto optimal points to determine how the in-network computing tasks are placed on the data plane switches to get the optimal offloading scheme.

[0105] Specifically, the optimization objectives of the in-network computing optimizer are optimized simultaneously by the hierarchical objective method, i.e., the user sets priorities for these optimization objectives to guide Gurobi to solve the optimization objectives to produce Pareto optimal points, i.e., the in-network computing optimizer uses Gurobi and activates its branch-and-bound algorithm to accelerate the INC process by pruning the search space without losing optimality. Finally, it is determined how the in-network computing tasks are placed on the data plane switches to get the optimal offloading scheme.

[0106] In this embodiment, the task placer is used to enforce the optimal offloading scheme output by the in-network computing optimizer and ensure the execution correctness of each in-network computing task.

[0107] It should be noted that the task placer first integrates each task segment into the program to compile it to a specific switch. Then the task placer accepts a specific design protocol, such as the RINC protocol, to help the upstream task segment pass information to the downstream task segment to ensure the execution correctness of each in-network computing task.

[0108] Further, the task placer is implemented by the following steps:

[0109] S3.1, obtaining a plurality of task segments based on the optimal offloading scheme output by the in-network computing optimizer wherein represents the task segment offloading of the in-network computing task T to the switch v, which includes all the match action tables offloaded to the switch v, denoted as

[0110] It should be understood that the optimal offloading scheme output by the in-network computing optimizer is the task deployment strategy output by the in-network computing optimizer, i.e., a plurality of tasks, each task containing a plurality of operations, and each operation of each task is placed on which switch corresponds to the optimal offloading scheme output by the in-network computing optimizer. Wherein, the optimal offloading scheme output by the in-network computing optimizer forms a series of task segments Therefore, based on the optimal offloading scheme output by the in-network computing optimizer, a plurality of task segments can be obtained

[0111] S3.2, for the directed acyclic graph of each in-network computing task, it is divided into a plurality of small graphs, each small graph corresponds to a task segment and all the match action tables contained in the task segment, and the divided edges are recorded using the set Φ.

[0112] It is to be noted that when the directed acyclic graph of each in-network computing task is partitioned, some edges contain the execution dependency relationship of MATs, which is destroyed due to the partitioning of the directed acyclic graph, and thus needs to be recorded separately in a set Φ and reconstructed in the following steps.

[0113] S3.3, for each edge representation in the set Φ, reconstruct the execution dependency relationship from the upstream MAT to the downstream MAT, specifically, when the upstream MAT and the downstream MAT are placed on different switches, for any given edge, M j belongs to the task segment that must be executed after the task segment containing M i to determine whether M j and M i have an execution dependency relationship, and further reconstruct the execution dependency relationship from M i to M j .

[0114] Specifically, in order to reconstruct the edge between two switches, the task placer inserts a module in the system requirement protocol into the task segment. The protocol performs a two-step workflow to maintain the inter-switch edge. First, in the upstream task segment, i.e., the segment on the upstream switch, the protocol modifies the header and metadata on each packet. Second, in the downstream task segment, it reads the modified header and metadata from each packet and inputs it into the MATs. Among them, the system requirement protocol is located between the IP and the 4th layer header by using a specific 0xFF protocol type. It includes a limited number of 4-byte slots. These slots store the modified header and metadata fields. In particular, adding an additional protocol in each packet occupies a certain packet header space.

[0115] S3.4, for each task segment, the task placer invokes the switch compiler on the target switch's software development environment to compile the task segment and the system requirement protocol; after compilation, the MATs and the system requirement protocol in the task segment are converted into switch configurations to complete the execution correctness of the optimal offloading scheme.

[0116] Exemplarily, Figure 2 a real INC task is shown, which contains three NFs, labeled A, B, and C. Each NF performs a MAT based on the matching result to satisfy the target flow and perform the action. In Figure 2 (a), C depends on B because C needs to read a metadata field md.drop written by B.

[0117] The planning decision generated by the existing solution is in Figure 2(b) shows that it will cause inter-switch task replication. First, inter-switch task replication occurs because B and C are placed on two switches. Therefore, the metadata field, md.drop, that is invoked needs to be copied to all switches. This solution also causes intra-switch task replication because the target flow does not go through pipeline 2 and pipeline 3, so the existing solution copies the MATs to all switch pipelines, thus wasting resources.

[0118] The solution provided by the present application aims to Figure 2 (c) reduces task replication. The analyzer in the solution identifies that B and C share the same task component of metadata md.drop, and placing B and C on two different switches will cause an increase in inter-switch task replication. Therefore, the optimizer decides to place B and C on the same switch to avoid inter-switch task replication by the following formula:

[0119]

[0120] And because the target flow only goes through pipeline 1 and 4, the optimizer only decides to place the MATs on pipeline 1 and 4 by the following formula:

[0121]

[0122] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit it; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A resource-efficient in-network computing system, characterized by Comprise: a task analyzer for automatically outlining attributes of each in-network computing task, including components and their dependencies, to obtain an analysis result of the task analyzer output; wherein the components are obtained by decomposing the task into a plurality of operations, and the components include the plurality of operations after the task decomposition; an in-network computing optimizer for accepting the network topology and in-network computing intent and the analysis result of the task analyzer output as its input, taking minimizing the number of task replicas between switches as the optimization objective, and optimizing the in-network computing task by using mixed integer programming to determine how to place the in-network computing task on the data plane switch to obtain an optimal offloading scheme; and a task placer for enforcing the optimal offloading scheme output by the in-network computing optimizer and ensuring the execution correctness of each in-network computing task; wherein the in-network computing optimizer is implemented by the following steps: S2.1, the in-network computing optimizer accepts the network topology and in-network computing intent and the analysis result of the task analyzer output as its input; The network topology is represented using an undirected graph G = (V, E), where V represents a set of switches, and E represents a set of physical links, the set of switches V includes N v switch ports and N switch pipelines, each switch port corresponds to a specific switch pipeline, represents a switch pipeline to which a switch port p belongs, each switch pipeline has k matching action stages, including PHV, TCAM, SRAM, ALUs, VLIWs and hash bits throughout the k stages; The in-network computation intents are specifically a set of user interest streams {f} that each in-network computation task aims to process, each stream f is routed through a set of switches according to its routing rules to transform f into a routing path that contains all the switches pipeline that f traverses, denoted as The analysis result output by the task analyzer is stored in a set of intra-network computing tasks {T i} containing the intermediate representation analysis result of the directed acyclic graph; wherein, T i ={M j} represents the ith intra-network computing task, M j is the jth matching action table in the intra-network computing task T i , M j ={P(M j ), A(M j ), R(M j )} and the resource consumption of M j is recorded in and , represents the PHV resource consumption of M j , represents the TCAM resource consumption of M j , represents the SRAM resource consumption of M j , represents the ALUs resource consumption of M j , represents the VLIWs resource consumption of M j , represents the hash resource consumption of M j , and the edges between the matching action tables in the directed acyclic graph are recorded in the Boolean variable D(M i , M j ). S2.2, set the optimization objective of the in-network computing optimizer, maximize resource efficiency by minimizing the number of task replicas between switches; the optimization objective of the in-network computing optimizer specifically includes: where x(M, v) indicates whether the matching action table M is placed on the switch v; indicates whether the matching action table M is placed on the switch pipeline ; ISC phv (M i , M j ) indicates the number of inter-switch task copies of the matching action table M i and M j , ISC act (M i , M j ) indicates the number of inter-switch task copies of the matching action table M i and M j , ISC reg (M i , M j ) indicates the number of inter-switch task copies of the matching action table M i and M j , which is obtained by the following formula: Among them, P(M i ) represents M i The set of data packet header fields and metadata fields used; x(M i ,v) represents M i Is it placed on switch v? If M i Placed on switch v, then x(M i ,v)=1;x(M i ,v)·x(M j ,v)=0 is to ensure that M i and M j Not on the same switch v; S2.3, set the constraint condition for the optimization objective of the in-network computing optimizer; the constraint condition specifically includes: S2.3.1, to ensure that the in-network computing task T can be successfully offloaded to the switch, the in-network computing optimizer first performs node deployment, specifically: the match action table of each in-network computing task T is deployed on at least one switch and one switch pipeline, denoted as: Then the edge deployment is performed, specifically: each edge is recorded in D(M i , M j ), if M i and M j are placed on the same switch, then D(M i , M j ) = 1, and M i is executed in front of M j ; for each intranet computing task, the last pipeline stage of M i should be in front of the first stage of M j , denoted as: where p end (M i ) denotes the number of the last pipeline stage of M i , p begin (M j ) denotes the number of the first pipeline stage of M j , D(M i , M j ) denotes the execution dependency relationship between M j and M i ; Second, set resource limit, specifically: for each switch pipeline offloaded to the switch pipeline all matching action tables on the switch pipeline should be less than or equal to the total capacity of the switch pipeline, expressed as: wherein, denotes the resource consumption of M, denotes the total capacity of the switch pipeline; Finally, add the limit of the number of stages of each switch pipeline, that is, the maximum number of stages appearing in a match action table should be less than or equal to the limit k, denoted as: where pen d (M) denotes the number of the last pipeline stage of the match action table M, k denotes the number of match action stages of each switch pipeline; S2.3.2, add the following constraint condition to maintain the in-network computing intent, specifically: in each routing path f, the match action table of the task T targeting the flow f should be placed on the switch pipeline of the routing path f, denoted as: S2.3.3, Add the following constraint to avoid the exchange internal task copy, specifically: for a matching action table M in a network computing task T, if any user interest flow does not pass through a switch pipeline then define the independent of M, expressed as: S2.4, set the priority for the optimization objective of the in-network computing optimizer, and use Gurobi to solve under its constraint condition to produce Pareto optimal points to determine how to place the in-network computing task on the data plane switch to obtain the optimal offloading scheme.

2. The resource-efficient in-network computing system of claim 1, wherein, The task analyzer is implemented by the following steps: S1.1, the task analyzer accepts the in-network computing task as its input to automatically parse and analyze highly heterogeneous in-network computing tasks in a unified manner to convert the task into a directed acyclic graph; wherein the directed acyclic graph is a directed acyclic graph of a plurality of operations corresponding to the task; S1.2, based on the directed acyclic graph, the task analyzer analyzes the execution dependencies and resource consumption of each task to obtain an intermediate representation analysis result of the directed acyclic graph as the analysis result of the task analyzer output.

3. The resource-efficient in-network computing system of claim 1, wherein, The task placer is implemented by the following steps: S3.1, obtaining a plurality of task segments based on an optimal offloading scheme output by an in-network computing optimizer wherein denotes the task segment of the in-network computing task T offloaded to switch v, which includes all the match-action tables offloaded to switch v, denoted as S3.2, for each directed acyclic graph of the in-network computing task, it is divided into multiple small graphs, each of which corresponds to a task segment and all matching action tables contained in the task segment, and the divided edges are recorded using the set Φ; S3.3, for each edge in the set Φ, reconstruct the execution dependency of its upstream match-action table to downstream match-action table, specifically, when the upstream match-action table and downstream match-action table are placed on different switches, for any edge, x(M i ,v)≠x(M j ,v)),M j belongs to the task segment that must be executed after the task segment containing M i to determine whether M j and M i have an execution dependency, and further reconstruct the execution dependency of M i to M j ; S3.4, for each task segment, the task placer invokes the switch compiler on the software development environment of the target switch to compile the task segment and the system requirement protocol; after the compilation, the matching action table and the system requirement protocol in the task segment are converted into the switch configuration to complete the execution correctness of the optimal offloading scheme.

Citation Information

Patent Citations

  • Transcript selector based on programmable network equipment

    CN108900509A

  • Internet of Things edge task unloading method and device

    CN113225377A