CN111858061B - Distributed programmable switch resource capacity expansion method - Google Patents

Distributed programmable switch resource capacity expansion method Download PDF

Info

Publication number
CN111858061B
CN111858061B CN202010728948.4A CN202010728948A CN111858061B CN 111858061 B CN111858061 B CN 111858061B CN 202010728948 A CN202010728948 A CN 202010728948A CN 111858061 B CN111858061 B CN 111858061B
Authority
CN
China
Prior art keywords
program
user
programmable switch
distributed programmable
rule
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010728948.4A
Other languages
Chinese (zh)
Other versions
CN111858061A (en
Inventor
张栋
刘宏岩
陈翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuzhou University
Original Assignee
Fuzhou University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuzhou University filed Critical Fuzhou University
Priority to CN202010728948.4A priority Critical patent/CN111858061B/en
Publication of CN111858061A publication Critical patent/CN111858061A/en
Application granted granted Critical
Publication of CN111858061B publication Critical patent/CN111858061B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/45Arrangements for providing or supporting expansion

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a distributed programmable switch resource capacity expansion method. The method for constructing the network node by the application program is simple, flexible to realize and high in efficiency.

Description

Distributed programmable switch resource capacity expansion method
Technical Field
The invention relates to the field of programmable network equipment, in particular to a distributed programmable switch resource capacity expansion method.
Background
Currently common programmable devices are divided into hardware and software. The software devices are typically virtual switches running on servers, such as OpenvSwitch, bmv 2. The CPU can run network function programs realized based on various programming languages, and has high flexibility. The disadvantage is that the computational power of the CPU is limited. The hardware devices are often referred to as programmable switches. The method has the advantages that the method has strong computing capacity, and can realize the data packet processing of linear rate to reach the Tbps level. The disadvantage is that the memory resources of the hardware are limited and the required accuracy cannot be achieved for large network functions. To improve performance, researchers have attempted to employ network functions implemented using programmable switches of ASIC chips in combination with P4 by offloading network functions to hardware. The switch of the ASIC chip provides excellent performance but is not programmable, and the ASIC in combination with P4 compensates for this deficiency. More and more network functions are offloaded to the programmable switch through the P4 language compiler in the form of P4 programs to meet the requirements of the programmable switch on performance. However, the memory resources of programmable switch chips (such as TCAM and SRAM) are limited. Experiments show that the operation efficiency and accuracy of some complex network functions are often lost when resources are limited. In this context, how to break the limited resource limitations of programmable switches is critical in order to improve network quality of service and efficiency.
Disclosure of Invention
The invention aims to provide a distributed programmable switch resource capacity expansion method which can effectively solve the problem of insufficient resources of a single programmable switch
In order to achieve the above purpose, the technical scheme of the invention is as follows: a distributed programmable switch resource capacity expansion method comprises the following steps:
step S1, a user writes a required data plane program according to a compiling instruction, and aggregates resources of a specified distributed programmable switch through the compiling instruction to abstract the resources into OBS;
step S2, dividing a data plane program written by a user through a program placer according to a compiling instruction used by the user, wherein the divided code segments are deployed on the distributed programmable switch selected by the user in the step S1 respectively;
step S3, scanning data packet processing logic PPL contained in a data plane program written by a user through a program placer, and inserting a module into a code segment obtained by dividing according to the scanned PPL to maintain original data packet processing logic so as to ensure that the data plane program written by the user can correctly realize original functions after being divided;
step S4, compiling the final code segment through a program placer, generating a configuration file and deploying the configuration file on the distributed programmable switch selected in the step S1 by a user;
and S5, after successful deployment, the user realizes two operations of rule issuing and statistical information collecting through the runtime manager.
In one embodiment of the present invention, in step S5, for rule issuing, since the program is distributed and deployed to a plurality of distributed programmable switches, one rule needs to be installed on a plurality of switches at the same time, and in order to maintain the correctness of rule installation, the runtime manager generates additional rules; for statistical information collection, the runtime manager may aggregate information on the distributed programmable switch and provide it to the user.
In one embodiment of the invention, the method adopts P4 language, and adds a compiling instruction @ pragma sw [ ID ] based on the P4 language, allowing a user to distribute components of a data plane program to any bottom layer distributed programmable switch; the @ pragma sw [ ID ] is used to specify the association of a program component with the underlying distributed programmable switch, and the instruction, which precedes the definition of the component, indicates that the component is to be placed on the underlying distributed programmable switch with an identifier of [ ID ].
In an embodiment of the present invention, in the step S2, the process of dividing the data plane program written by the user by the program placer is: the program placer searches the compiling instructions of the call in the data plane program written by the user, creates an empty code segment for each found distributed programmable switch ID, and fills MAT code and the slice of the ribbon elements which need to be deployed to the current distributed programmable switch ID into the code segment.
In an embodiment of the present invention, in step S3, the program placer may identify the affected PPLs in the data plane program, and insert modules into the code segments obtained by dividing to ensure normal execution of the data plane program, where the affected PPLs are divided into two types: (1) Since different MATs may be deployed on different switches after program division, MAT dependencies defined in an input program may be disturbed, and a program placer should be maintained and corrected; (2) If a stateful element is partitioned into multiple slices after the data plane program is partitioned, a connection should be maintained between the slices to ensure communication between the stateful element slices.
In one embodiment of the invention, at rule installation, the runtime manager generates additional rules to maintain correct execution of the rules; for each rulerRuntime manager identificationrCorresponding MATMrThe runtime manager will locateMrAt the bottom layer of the distributed programmable switch, andrules are setrMounted to the distributed programmable switch and, in addition, ifMrThe runtime manager will generate an additional rule and install this rule to the target distributed programmable switch to maintain the MAT dependency, and periodically collect statistics from the strip-like elements in the different distributed programmable switches during statistics collection, and then feed back to the user after summarizing the statistics collected from each of the slices.
Compared with the prior art, the invention has the following beneficial effects: the invention provides a distributed programmable switch resource capacity expansion method, which solves the problem of insufficient resources of the existing single programmable switch by aggregating a plurality of distributed programmable switch resources, effectively improves the execution efficiency of application programs, and has the advantages of simplicity, flexible realization and strong practicability.
Drawings
Fig. 1 is a schematic diagram of a distributed programmable switch resource capacity expansion method.
Fig. 2 is a flow chart of a method for expanding the capacity of a distributed programmable switch resource.
Detailed Description
The technical scheme of the invention is specifically described below with reference to the accompanying drawings.
The invention provides a distributed programmable switch resource capacity expansion method, which comprises the following steps:
step S1, a user writes a required data plane program according to a compiling instruction, and aggregates resources of a specified distributed programmable switch through the compiling instruction to abstract the resources into OBS;
step S2, dividing a data plane program written by a user through a program placer according to a compiling instruction used by the user, wherein the divided code segments are deployed on the distributed programmable switch selected by the user in the step S1 respectively;
step S3, scanning data packet processing logic PPL contained in a data plane program written by a user through a program placer, and inserting a module into a code segment obtained by dividing according to the scanned PPL to maintain original data packet processing logic so as to ensure that the data plane program written by the user can correctly realize original functions after being divided;
step S4, compiling the final code segment through a program placer, generating a configuration file and deploying the configuration file on the distributed programmable switch selected in the step S1 by a user;
step S5, after successful deployment, a user realizes two operations of rule issuing and statistical information collecting through a runtime manager: for rule issuing, because programs are distributed and deployed to a plurality of distributed programmable switches, one rule needs to be installed on a plurality of switches at the same time, and in order to maintain the correctness of rule installation, a run-time manager generates additional rules; for statistical information collection, the runtime manager may aggregate information on the distributed programmable switch and provide it to the user.
The following is a specific implementation procedure of the present invention.
Referring to fig. 1 and fig. 2, the method for expanding the resource of the distributed programmable switch of the present invention aggregates the physical resources of a plurality of bottom distributed programmable switches, and abstracts the distributed switches into OBS (One Big Switch) for providing to users. The resource requirements of most application programs are met, and the resource constraint brought by a single programmable switch is broken. While ensuring proper execution of the application and masking the user from the complex underlying details. The method comprises the following steps:
1. the user writes the data plane program based on the compiling instruction provided by the system, and the appointed physical switch resources are aggregated through the compiling instruction and abstracted into the OBS. The compilation instructions allow a user to distribute components of the data plane program to any one of the underlying programmable switches. The @ pragma sw [ ID ] is used to specify the association of a program component (MAT or ribbon counter) with the underlying switch. The instruction is located before the component definition, indicating that the component is to be placed on the underlying switch with an identifier of [ ID ].
2. The system divides programs written by the user according to compiling instructions used by the user. The program dividing process is as follows: the placer searches the input program for the called compiled instructions (which often correspond to one or more switch IDs). For each switch ID found, the placer creates an empty code segment for it and populates the code segment with MAT code and ribbon element slices that need to be deployed to the current switch ID.
3. The program placer in the system scans all packet processing logic (PPLs, PPL, packet Process Logic) contained in the user program. According to the scanned data packet processing logic, a module is inserted into the code segment obtained by division to maintain the original data packet processing logic so as to ensure that the user program can correctly realize the original function after being divided; the program placer will identify the affected PPLs in the program and restore them using the plug-in module. Affected PPLs fall into two specific categories: (1) Since different MATs may be deployed on different switches after program division, MAT dependencies (i.e., execution order) defined in the input program may be disturbed, and the program placer should be maintained and revised. (2) If a stateful element is partitioned into multiple slices after the program is partitioned, a connection should be maintained between the slices to ensure communication between the stateful element slices. If there is a dependency relationship between MAT a and MAT C (MAT a is placed on switch 1 and MAT C is placed on switch 2). To maintain this dependency, the sequencer inserts a module "send_to_switch2" to direct MAT A-matched packets to MAT C for continued processing; if the ribbon element is split into two slices, slice 1 and slice 2. Slice 1 holds the first four columns with state elements and slice 2 holds the last four columns. To complete the updating operation of the tape state element, the program placer adds a "Sender" module to slice 1 and a "Receiver" module to slice 2. "Sender" determines whether the index of the accessed element exceeds 3. If so, the index value is transferred to the Receiver to update slice 2, otherwise, slice 1 is updated directly.
4. After the above steps are completed, the code segment of each distributed switch is already generated. The program placer in the system compiles the final code segment, generates a configuration file and deploys the configuration file to the corresponding physical switch
5. After successful deployment, the user can use a runtime manager in the system to implement both rule issuing and statistics gathering operations. For rule distribution, since programs are distributed and deployed to multiple physical switches, a rule may need to be installed on multiple switches at the same time. While the runtime manager generates additional rules in order to maintain the correctness of the rule installation. For each rulerRuntime manager identificationrCorresponding MATMr. The runtime manager will locateMrAt the underlying exchange and rulerTo which the exchange is mounted. In addition, ifMrUnder the influence of the MAT dependencies, the runtime manager will generate an additional rule and install this rule to the target switch to maintain the MAT dependencies. For statistics collection, the runtime manager periodically collects statistics from the slice of the stateful elements located in the different switches. The runtime manager aggregates the statistics collected from each slice and feeds it back to the user. In this way, the runtime manager can use the collected statistics to quickly correspond to the user's access to the ribbon elements without exposing the underlying details.
The above is a preferred embodiment of the present invention, and all changes made according to the technical solution of the present invention belong to the protection scope of the present invention when the generated functional effects do not exceed the scope of the technical solution of the present invention.

Claims (3)

1. The distributed programmable switch resource capacity expansion method is characterized by comprising the following steps:
step S1, a user writes a required data plane program according to a compiling instruction, and aggregates resources of a specified distributed programmable switch through the compiling instruction to abstract the resources into OBS;
step S2, dividing a data plane program written by a user through a program placer according to a compiling instruction used by the user, wherein the divided code segments are deployed on the distributed programmable switch selected by the user in the step S1 respectively;
step S3, scanning data packet processing logic PPL contained in a data plane program written by a user through a program placer, and inserting a module into a code segment obtained by dividing according to the scanned PPL to maintain original data packet processing logic so as to ensure that the data plane program written by the user can correctly realize original functions after being divided;
step S4, compiling the final code segment through a program placer, generating a configuration file and deploying the configuration file on the distributed programmable switch selected in the step S1 by a user;
s5, after successful deployment, a user realizes two operations of rule issuing and statistical information collecting through a run-time manager;
in step S5, for rule issuing, since the program is distributed and deployed to a plurality of distributed programmable switches, one rule needs to be installed on a plurality of switches at the same time, and in order to maintain the correctness of rule installation, the runtime manager generates additional rules; for statistical information collection, the runtime manager gathers information on the distributed programmable switch and provides the gathered information to the user;
in the step S2, the process of dividing the data plane program written by the user by the program placer is as follows: the program placer searches the compiling instruction of the call in the data plane program written by the user, creates an empty code segment for each found distributed programmable switch ID, and fills MAT code and the slice of the ribbon element which need to be deployed to the current distributed programmable switch ID into the code segment;
in the step S3, the program placer may identify the affected PPL in the data plane program, and insert the module into the code segment obtained by dividing to ensure normal execution of the data plane program, where the affected PPL is divided into two types: (1) The program placer maintains and corrects the MAT dependency defined in the input program; (2) If a stateful element is partitioned into multiple slices after the data plane program is partitioned, a connection should be maintained between the slices to ensure communication between the stateful element slices.
2. The method for expanding the capacity of the distributed programmable switch resources according to claim 1, wherein the method adopts a P4 language, and a compiling instruction @ pragma sw [ ID ] is newly added on the basis of the P4 language, so that a user is allowed to distribute components of a data plane program to any one bottom layer of the distributed programmable switch; the @ pragma sw [ ID ] is used to specify the association of a program component with the underlying distributed programmable switch, and the instruction, which precedes the definition of the component, indicates that the component is to be placed on the underlying distributed programmable switch with an identifier of [ ID ].
3. The method of claim 1, wherein the runtime manager generates additional rules to maintain correct execution of the rules at the time of rule installation; for each rulerRuntime manager identificationrCorresponding MATMrThe runtime manager will locateMrThe underlying distributed programmable switch and rulerMounted to the distributed programmable switch and, in addition, ifMrThe runtime manager will generate an additional rule and install this rule to the target distributed programmable switch to maintain the MAT dependency, and periodically collect statistics from the strip-like elements in the different distributed programmable switches during statistics collection, and then feed back to the user after summarizing the statistics collected from each of the slices.
CN202010728948.4A 2020-07-27 2020-07-27 Distributed programmable switch resource capacity expansion method Active CN111858061B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010728948.4A CN111858061B (en) 2020-07-27 2020-07-27 Distributed programmable switch resource capacity expansion method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010728948.4A CN111858061B (en) 2020-07-27 2020-07-27 Distributed programmable switch resource capacity expansion method

Publications (2)

Publication Number Publication Date
CN111858061A CN111858061A (en) 2020-10-30
CN111858061B true CN111858061B (en) 2024-03-29

Family

ID=72947071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010728948.4A Active CN111858061B (en) 2020-07-27 2020-07-27 Distributed programmable switch resource capacity expansion method

Country Status (1)

Country Link
CN (1) CN111858061B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008142631A1 (en) * 2007-05-22 2008-11-27 Philips Intellectual Property & Standards Gmbh Compiler and compiling method for a networked control system comprising a plurality of devices
CN107229504A (en) * 2017-05-12 2017-10-03 广州接入信息科技有限公司 Program distribution operation method, apparatus and system
CN108595258A (en) * 2018-05-02 2018-09-28 北京航空航天大学 A kind of GPGPU register files dynamic expansion method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9110706B2 (en) * 2009-02-09 2015-08-18 Microsoft Technology Licensing, Llc General purpose distributed data parallel computing using a high level language
US8516457B2 (en) * 2011-06-28 2013-08-20 International Business Machines Corporation Method, system and program storage device that provide for automatic programming language grammar partitioning

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008142631A1 (en) * 2007-05-22 2008-11-27 Philips Intellectual Property & Standards Gmbh Compiler and compiling method for a networked control system comprising a plurality of devices
CN107229504A (en) * 2017-05-12 2017-10-03 广州接入信息科技有限公司 Program distribution operation method, apparatus and system
CN108595258A (en) * 2018-05-02 2018-09-28 北京航空航天大学 A kind of GPGPU register files dynamic expansion method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
体系结构内可编程数据平面方法;马久跃;余子濠;包云岗;孙凝晖;;计算机研究与发展(第01期);全文 *

Also Published As

Publication number Publication date
CN111858061A (en) 2020-10-30

Similar Documents

Publication Publication Date Title
US10572329B2 (en) Methods and systems to identify anomalous behaving components of a distributed computing system
US11405300B2 (en) Methods and systems to adjust resources and monitoring configuration of objects in a distributed computing system
US10659316B1 (en) State machine controlled dynamic distributed computing
Markovskiy et al. Analysis of quasi-static scheduling techniques in a virtualized reconfigurable machine
Bagrodia et al. Performance evaluation of conservative algorithms in parallel simulation languages
Cappello et al. MPI versus MPI+ OpenMP on the IBM SP for the NAS Benchmarks
US8627322B2 (en) System and method of active risk management to reduce job de-scheduling probability in computer clusters
US11294758B2 (en) Automated methods and systems to classify and troubleshoot problems in information technology systems and services
Neary et al. Advanced eager scheduling for Java-based adaptively parallel computing
US20140019961A1 (en) System and Method for Automated Assignment of Virtual Machines and Physical Machines to Hosts
CN102037677B (en) Computer readable medium, northbound interface uniform platform and starting method thereof
CN1506816A (en) Virtual machine for network processor
CN111858061B (en) Distributed programmable switch resource capacity expansion method
Pop et al. Scheduling and mapping in an incremental design methodology for distributed real-time embedded systems
Zhao et al. Sync-on-the-fly: A parallel framework for gradient descent algorithms on transient resources
CN110290206A (en) A kind of distributed computing system and method for cafe environment
US7930489B2 (en) Techniques for optimizing configuration partitioning
Yuan et al. Algorithms for supporting compiled communication
CN114546631A (en) Task scheduling method, control method, core, electronic device and readable medium
CA2026553A1 (en) Parallel processing system
Nadeem et al. Task scheduling strategies for dynamic reconfigurable processors in distributed systems
Mo et al. Heet: Accelerating Elastic Training in Heterogeneous Deep Learning Clusters
Wu et al. Mixed mode matrix multiplication
Chiola et al. Performance comparable design of efficient synchronization protocols for distributed simulation
Zhang et al. HAP: SPMD DNN Training on Heterogeneous GPU Clusters with Automated Program Synthesis

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant