CN117278489A - Dynamic adjustment method, system, terminal and storage medium for port queue capacity - Google Patents
Dynamic adjustment method, system, terminal and storage medium for port queue capacity Download PDFInfo
- Publication number
- CN117278489A CN117278489A CN202311278581.0A CN202311278581A CN117278489A CN 117278489 A CN117278489 A CN 117278489A CN 202311278581 A CN202311278581 A CN 202311278581A CN 117278489 A CN117278489 A CN 117278489A
- Authority
- CN
- China
- Prior art keywords
- priority
- target
- queue
- port
- port queue
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 66
- 230000002159 abnormal effect Effects 0.000 claims abstract description 62
- 208000027744 congestion Diseases 0.000 claims abstract description 29
- 238000012544 monitoring process Methods 0.000 claims abstract description 24
- 238000012216 screening Methods 0.000 claims abstract description 24
- 230000008569 process Effects 0.000 claims abstract description 21
- 238000004590 computer program Methods 0.000 claims description 6
- 238000012545 processing Methods 0.000 abstract description 21
- 238000004891 communication Methods 0.000 abstract description 12
- 230000006870 function Effects 0.000 description 8
- 230000007246 mechanism Effects 0.000 description 5
- 238000007726 management method Methods 0.000 description 4
- 238000013468 resource allocation Methods 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 241001522296 Erithacus rubecula Species 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000004807 localization Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000012384 transportation and delivery Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/62—Queue scheduling characterised by scheduling criteria
- H04L47/625—Queue scheduling characterised by scheduling criteria for service slots or service orders
- H04L47/6275—Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/11—Identifying congestion
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention relates to the technical field of network resource management, in particular to a method, a system, a terminal and a storage medium for dynamically adjusting port queue capacity, which comprise the following steps: monitoring all port queues and screening out abnormal port queues with congestion risk, wherein the port queues have priority levels and are used for caching and forwarding data packets corresponding to the priority levels; obtaining the target priority level of the abnormal port queue, and screening out a target port queue with the priority level lower than the target priority level; the priority of the target port queue is changed to the target priority, so that the target port queue and the abnormal port queue jointly process the data packet corresponding to the target priority. The invention can optimize the communication performance of the system, ensures the real-time processing of high-priority data, and has important value for application scenes and systems requiring efficient communication and priority processing.
Description
Technical Field
The invention belongs to the technical field of network resource management, and particularly relates to a method, a system, a terminal and a storage medium for dynamically adjusting port queue capacity.
Background
In the prior art, a network switch can only configure a fixed DSCP and a port queue, after a data packet enters the network switch, the data packet can correspond to different service levels or flow categories according to different DSCP values, when network congestion occurs, a high-priority data packet has a higher service level, but the cache capacity is fixed, once a large number of high-priority data packets are gushed into the port, when the switch cannot digest and process the data packet in real time, the phenomenon that the data packet is discarded due to the fact that the corresponding queue cache capacity is used up is likely to occur.
Disclosure of Invention
The invention provides a method, a system, a terminal and a storage medium for dynamically adjusting port queue capacity to solve the technical problems.
In a first aspect, the present invention provides a method for dynamically adjusting a port queue capacity, including:
monitoring all port queues and screening out abnormal port queues with congestion risk, wherein the port queues have priority levels and are used for caching and forwarding data packets corresponding to the priority levels;
obtaining the target priority level of the abnormal port queue, and screening out a target port queue with the priority level lower than the target priority level;
The priority of the target port queue is changed to the target priority, so that the target port queue and the abnormal port queue jointly process the data packet corresponding to the target priority.
In an alternative embodiment, monitoring all port queues and screening out abnormal port queues with congestion risk includes:
periodically acquiring the available cache capacity of a port queue with high priority of a network switch;
comparing the available cache capacity with a preset capacity threshold, and outputting a port queue with the available cache capacity lower than the capacity threshold as an abnormal port queue;
and generating congestion risk prompt information for the abnormal port queue.
In an optional embodiment, obtaining the target priority level of the abnormal port queue, and screening the target port queue with the priority level lower than the target priority level includes:
sequentially arranging all priority levels, and taking the next level of the target priority level as a search object;
and screening out the port queues with the priority level consistent with the search object as target port queues.
In an alternative embodiment, by changing the priority of the target port queue to the target priority level, the target port queue and the abnormal port queue jointly process the data packet corresponding to the target priority level, including:
Traversing all port queues to obtain corresponding priority levels, and storing port queue information and corresponding priority levels in pairs to a level list;
inquiring the corresponding target priority level from the level list based on the information of the abnormal port queue;
inquiring target port queue information corresponding to the next level of the target priority level from the level list;
and positioning the target port queue based on the target port queue information, and changing the priority of the target port queue to the target priority.
In an alternative embodiment, by changing the priority of the target port queue to the target priority level, the target port queue and the abnormal port queue jointly process the data packet corresponding to the target priority level, including:
the corresponding relation between the differential service code points and the priority and port queues is stored in an initial configuration list in advance;
inquiring a target differential service code point corresponding to an abnormal port queue from the initial configuration list;
generating a backup file of the initial configuration list, and setting the backup file as an application configuration list;
taking a port queue corresponding to the next level of the target priority level as a target port queue, and generating a special identifier for the target port queue in an initial configuration list;
In the application configuration list, changing the differential service code point of the target port queue into a target differential service code point;
and updating the differential service code point in the IP address of the target port queue to be a target differential service code point based on the application configuration list.
In an alternative embodiment, the method comprises:
monitoring congestion risk relief of the abnormal port queue;
inquiring an original differential service code point corresponding to a target port queue with a special mark from an initial configuration list;
restoring the differential service code points in the IP address of the target port queue to the original differential service code points;
deleting the special mark of the target port queue in the initial configuration list, and deleting the application configuration list.
In an alternative embodiment, the method further comprises:
setting a scheduling period, a priority weight, a flow weight and a capacity threshold;
the method comprises the steps of periodically collecting available buffer capacity of a port queue, and marking the port queue with the available buffer capacity exceeding a capacity threshold as an idle queue;
if the priority of the idle queue is high priority, adding the idle queue into a scheduling list of the next period, and if the priority of the idle queue is not high priority, not adding the idle queue into the scheduling list of the next period, wherein the idle queue is empty in the next scheduling period;
When executing the scheduling, acquiring a scheduling list of the current scheduling;
acquiring the priority and the queue length of a port queue in the scheduling list;
matching the priority weight and the flow weight for the port queue based on the corresponding relation between the priority and the priority weight and the corresponding relation between the queue length and the flow weight;
network resources are allocated to the port queues based on the preset conventional allocable resource amount of single scheduling, and the priority weight and the traffic weight of the port queues.
In a second aspect, the present invention provides a system for dynamically adjusting port queue capacity, including:
the queue monitoring module is used for monitoring all port queues and screening out abnormal port queues with congestion risk, wherein the port queues have priority levels and are used for caching and forwarding data packets corresponding to the priority levels;
the target positioning module is used for acquiring the target priority level of the abnormal port queue and screening out a target port queue with the priority level lower than the target priority level;
and the capacity adjustment module is used for enabling the target port queue and the abnormal port queue to jointly process the data packet corresponding to the target priority level by changing the priority of the target port queue to the target priority level.
In an alternative embodiment, the queue monitoring module includes:
the buffer monitoring unit is used for periodically acquiring the available buffer capacity of the port queue with high priority level of the network switch;
the capacity comparison unit is used for comparing the available cache capacity with a preset capacity threshold value and outputting a port queue with the available cache capacity lower than the capacity threshold value as an abnormal port queue;
and the risk prompt unit is used for generating congestion risk prompt information for the abnormal port queue.
In an alternative embodiment, the object localization module includes:
the ranking unit is used for ranking all priority ranks in sequence, and taking the next rank of the target priority rank as a search object;
and the target limiting unit is used for screening out the port queues with the priority level consistent with the searching object as target port queues.
In an alternative embodiment, the capacity adjustment module includes:
the port traversing unit is used for traversing all the port queues to obtain corresponding priority levels, and storing port queue information and the corresponding priority levels in pairs to a level list;
a first query unit, configured to query a corresponding target priority level from the level list based on information of the abnormal port queue;
A second query unit, configured to query, from the class list, target port queue information corresponding to a next class of a target priority class;
and the level changing unit is used for positioning the target port queue based on the target port queue information and changing the priority of the target port queue into the target priority level.
In an alternative embodiment, the capacity adjustment module includes:
the initial configuration unit is used for storing the corresponding relation between the differential service code points and the priority and port queues to an initial configuration list in advance;
the information inquiry unit is used for inquiring the target differential service code point corresponding to the abnormal port queue from the initial configuration list;
the application configuration unit is used for generating a backup file of the initial configuration list and setting the backup file as an application configuration list;
the identifier generating unit is used for taking a port queue corresponding to the next level of the target priority level as a target port queue and generating a special identifier for the target port queue in the initial configuration list;
the information changing unit is used for changing the differential service code point of the target port queue into a target differential service code point in the application configuration list;
And the IP updating unit is used for updating the differential service code point in the IP address of the target port queue into a target differential service code point based on the application configuration list.
In an alternative embodiment, the system further comprises:
the risk monitoring module is used for monitoring congestion risk relief of the abnormal port queue;
the initial inquiring unit is used for inquiring the original differential service code points corresponding to the target port queues with the special marks from the initial configuration list;
an IP restoring unit, configured to restore the differential service code point in the IP address of the target port queue to the original differential service code point;
and the data deleting unit is used for deleting the special identifier of the target port queue in the initial configuration list and deleting the application configuration list.
In an alternative embodiment, the system further comprises:
the parameter setting module is used for setting a scheduling period, a priority weight, a flow weight and a capacity threshold;
the idle marking module is used for periodically collecting the available buffer capacity of the port queue and marking the port queue with the available buffer capacity exceeding a capacity threshold as an idle queue;
the list processing module is used for adding the idle queue into the scheduling list of the next period if the priority of the idle queue is high priority, and not adding the idle queue into the scheduling list of the next period if the priority of the idle queue is not high priority, wherein the idle queue is in the idle state in the next scheduling period;
The list acquisition module is used for acquiring a scheduling list of the current scheduling when the scheduling is executed;
the queue information acquisition module is used for acquiring the priority and the queue length of the port queue in the scheduling list;
the weight matching module is used for matching the priority weight and the flow weight for the port queue based on the corresponding relation between the priority and the priority weight and the corresponding relation between the queue length and the flow weight;
the resource allocation module is used for allocating network resources for the port queue based on the preset conventional allocable resource quantity of single scheduling, the priority weight and the flow weight of the port queue.
In a third aspect, a terminal is provided, including:
a processor, a memory, wherein,
the memory is used for storing a computer program,
the processor is configured to call and run the computer program from the memory, so that the terminal performs the method of the terminal as described above.
In a fourth aspect, there is provided a computer storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the method of the above aspects.
The method, the system, the terminal and the storage medium for dynamically adjusting the capacity of the port queue have the advantages that in a congestion environment, the port queue is dynamically divided by considering the high-priority requirement of data, the high-priority data packet cache is improved, and the method, the system, the terminal and the storage medium are assisted by a scheduling strategy. The method can optimize the communication performance of the system, ensures the real-time processing of high-priority data, and has important value for application scenes and systems requiring efficient communication and priority processing.
According to the method, the available cache capacity of the port queue with the high priority level is obtained regularly, the port queue with the available cache capacity lower than the capacity threshold is further output as the abnormal port queue, and corresponding risk prompt information is generated.
According to the invention, by setting the round-robin mechanism, for idle queues with lower priority, round-robin is scheduled next time, so that network resources are saved, and further by setting priority weights and flow weights, network resources are allocated to port queues in a scheduling list based on the two weights during scheduling, so that the priority treatment of high-priority queues is ensured.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic flow chart of a method of one embodiment of the invention.
Fig. 2 is another schematic flow chart of a method of one embodiment of the invention.
FIG. 3 is a schematic block diagram of a system of one embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solution of the present invention better understood by those skilled in the art, the technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
The following explains key terms appearing in the present invention.
DSCP (Differentiated Services Code Point) represents a differentiated services code point, a field in the IP header that is used to distinguish and classify network traffic to provide quality of service (QoS). The DSCP value is used to differentiate and prioritize different types of traffic according to traffic demand. It is used by routers and network devices to determine how to process data packets transmitted over the network. By assigning specific DSCP values to the data packets, network administrators can control the forwarding behavior, queuing, and scheduling mechanisms of routers, ensuring critical traffic. The DSCP value range is 0 to 63, where 0 is a default value. Different DSCP values correspond to different service classes or traffic classes.
Common DSCP corresponds to configuration of port queues:
QoS (Quality of Service) is a network technology for optimizing and guaranteeing the quality of service of different types of network traffic. It aims to ensure that problems of delay, packet loss and bandwidth usage in network transmissions are controlled, thereby providing more reliable and consistent services.
Queue is a Queue data structure that manages data items on a first-in first-out (FIFO First Input First Output) basis. In computer networks, queues are used to buffer and schedule the transmission of data packets. When packets arrive at a network device, they are placed in a queue for processing or forwarding. Queues have attributes such as capacity, priority, and scheduling algorithms. The capacity determines the maximum number of packets that the queue can accommodate, and if the capacity is exceeded, packets may be lost. The priority attribute allows the packets to be processed in different priority orders. The scheduling algorithm determines the order of processing when there are multiple packets in the queue. Through queues, the network can control traffic, reduce packet loss and congestion, and provide quality of service adjustment and optimization. Queue management and scheduling algorithm design for network devices is critical to network performance and efficiency.
WRR (Weighted Round Robin) is a commonly used traffic scheduling algorithm for queue management and scheduling mechanisms in network devices. The goal is to schedule different flows according to the weight assigned in advance to achieve fairness and quality of service optimization. The core concept of WRR algorithms is to allocate processing resources according to weight values. Each queue or data stream is assigned a weight indicating the processing opportunity it should acquire during the scheduling process. Higher weighted queues will get more processing time or bandwidth to process their packets faster. The scheduling process of the WRR algorithm is round robin. The scheduler selects each queue in order and decides the number of packets to process based on its weight. The high weight queues will be prioritized during each polling period and get more resource allocation. While the low weight queues still have an opportunity to be processed, but are relatively few. By using WRR algorithm, a network administrator can configure weight values according to the traffic demands and priorities to implement traffic scheduling of different service levels. For example, for critical applications or high priority traffic, higher weight values may be assigned, ensuring that they get faster response times and larger bandwidth shares. For normal traffic or low priority traffic, a lower weight value may be assigned to avoid occupying excessive resources.
Congestion Congestion refers to the occurrence of Congestion or Congestion in a network or communication system. When traffic in the network exceeds the processing power or available bandwidth of the system, the transmission of data packets may be blocked or delayed, resulting in reduced network performance. Network congestion may be caused by a number of reasons, such as insufficient processing power of the network device, limited link bandwidth, a large number of concurrent connections, unreasonable network topology design, etc. When traffic exceeds the capacity of the network, packets may be queued for processing in the queue, and excessive queuing may result in increased delay, increased packet loss rate, and reduced application performance. There are several approaches to solving network congestion, in which QoS mechanisms, by enforcing Quality of Service (QoS) policies, classify and prioritize network traffic, ensuring the prioritized delivery of critical traffic.
The method for dynamically adjusting the capacity of the port queue provided by the embodiment of the invention is executed by the computer equipment, and correspondingly, the system for dynamically adjusting the capacity of the port queue runs in the computer equipment.
FIG. 1 is a schematic flow chart of a method of one embodiment of the invention. The execution body of fig. 1 may be a dynamic adjustment system for port queue capacity. The order of the steps in the flow chart may be changed and some may be omitted according to different needs.
As shown in fig. 1, the method includes:
step 110, monitoring all port queues and screening out abnormal port queues with congestion risk, wherein the port queues have priority levels and are used for caching and forwarding data packets corresponding to the priority levels;
step 120, obtaining a target priority level of the abnormal port queue, and screening out a target port queue with a priority level lower than the target priority level;
in step 130, the priority of the target port queue is changed to the target priority, so that the target port queue and the abnormal port queue process the data packet corresponding to the target priority together.
Wherein the higher priority queues, the more important the data processed.
In order to facilitate understanding of the present invention, the method for dynamically adjusting the capacity of a port queue provided by the present invention is further described below by using the principle of the method for dynamically adjusting the capacity of a port queue according to the present invention, and combining the process of dynamically adjusting the capacity of a port queue in the embodiment.
Specifically, the method for dynamically adjusting the capacity of the port queue comprises the following steps:
s1, monitoring all port queues and screening out abnormal port queues with congestion risk, wherein the port queues have priority levels and are used for caching and forwarding data packets corresponding to the priority levels.
Periodically acquiring the available cache capacity of a port queue with high priority of a network switch; comparing the available cache capacity with a preset capacity threshold, and outputting a port queue with the available cache capacity lower than the capacity threshold as an abnormal port queue; and generating congestion risk prompt information for the abnormal port queue.
Specifically, the network switch includes a plurality of ports, and each port has a queue, i.e., a port queue. According to the importance of the service data processed by the port queue, the service data is prioritized, and the higher the priority is, the more important the processed data is. Therefore, when allocating network resources to port queues, it is necessary to tilt to port queues of high priority level to ensure priority processing of important data.
S2, obtaining the target priority level of the abnormal port queue, and screening out the target port queue with the priority level lower than the target priority level.
In one embodiment, the next level of the target priority level is obtained as the priority level that needs to be searched. For example, the priorities have four levels, priority 1 > priority 2 > priority 3 > priority 4, priority 1 is the highest level, and when the priority of the abnormal port queue is priority 2, priority 3 is used as the second priority level, namely, the port queue corresponding to priority 3 is solicited.
When congestion risk exists in the high-priority queue, the next-priority queue is automatically divided into the high-priority data packet to be placed, the queue which is originally divided into the high-priority queue and the later queue is shifted backwards, the division sequence is sequentially downward from the high-priority queue, and the data table is not discarded until all the queues are full.
The method for specifically searching the target port queue comprises the following steps: traversing all port queues to obtain corresponding priority levels, and storing port queue information and corresponding priority levels in pairs to a level list; inquiring the corresponding target priority level from the level list based on the information of the abnormal port queue; inquiring target port queue information corresponding to the next level of the target priority level from the level list; and positioning the target port queue based on the target port queue information, and changing the priority of the target port queue to the target priority.
The target priority level and the next level of the target priority level are quickly positioned by setting the level list, the target port queue is quickly positioned, and the capacity of the abnormal port queue is expanded by changing the priority of the target port queue. The same resource scheduling strategy is adopted for dynamically dividing the queues used for the high-priority data so as to ensure that processing resources are distributed fairly and avoid long-time waiting of the high-priority data placed in the divided queues.
S3, changing the priority of the target port queue to the target priority, so that the target port queue and the abnormal port queue jointly process the data packet corresponding to the target priority.
The corresponding relation between the differential service code points and the priority and port queues is stored in an initial configuration list in advance; inquiring a target differential service code point corresponding to an abnormal port queue from the initial configuration list; generating a backup file of the initial configuration list, and setting the backup file as an application configuration list; taking a port queue corresponding to the next level of the target priority level as a target port queue, and generating a special identifier for the target port queue in an initial configuration list; in the application configuration list, changing the differential service code point of the target port queue into a target differential service code point; and updating the differential service code point in the IP address of the target port queue to be a target differential service code point based on the application configuration list.
By setting the two-version configuration list, the corresponding relation between the differential service code points and the priority and port queues is stored in the configuration list, so that the target port queues are rapidly positioned and the differential service code points are rapidly searched, and further, the differential service code points in the IP addresses of the target port queues are synchronously updated by changing the differential service code points of the target port queues into the target differential service code points of the abnormal port queues, so that the capacity expansion of the abnormal port queues with high priority is realized.
In one embodiment, the data packets are divided into high-priority data packet caches, when the high-priority data packets are processed, the data packets are sequentially restored from the lowest priority queue until the configuration of the queue is restored, and the data packets with other priorities are started to be received.
Specifically, congestion risk relief of the abnormal port queue is monitored; inquiring an original differential service code point corresponding to a target port queue with a special mark from an initial configuration list; restoring the differential service code points in the IP address of the target port queue to the original differential service code points; deleting the special mark of the target port queue in the initial configuration list, and deleting the application configuration list.
After risk elimination, the recovery target is located by generating an identification for the adjusted port queue, e.g., the special identification includes the original priority. In this way, the low priority port queues are restored to the original configuration after the congestion risk is relieved, and then the process files are deleted.
Referring to fig. 2, a specific example flow of queue adjustment is as follows:
(1) Definition:
QH is the high priority queue, highest queue index; QL is the high priority queue, lowest queue index; n is the maximum number of queues.
Scheduling mode WRR (taking this round robin mode as an example)
(2) Initializing:
initializing QH and QL to N
(3) The adjustment flow is as follows:
confirm QL queue full?
If yes, confirm QL index is 0? Yes, return to wait time;
if not, subtracting 1 from the QL index; (QL minus 1) to 0 queues shifted down by 1 queue; setting a QL queue to collect high-priority data packets; setting QH to QL queue scheduling modes; returning to wait time;
no, confirm QH is QL? Yes, return to wait time; if not, adding 1 to the QL index; (QL minus 1) up to the 0 queue by 1 queue; returning to wait time.
S3, resource allocation management.
Setting a scheduling period T, a priority weight Q1, a flow weight Q2 and a capacity threshold K;
the method comprises the steps of periodically collecting available buffer capacity of a port queue, enabling a collection period to be consistent with a scheduling period, and marking the port queue with the available buffer capacity exceeding a capacity threshold as an idle queue;
setting an emptying mechanism, namely adding the idle queue into a scheduling list of the next period if the priority of the idle queue is high priority, and not adding the idle queue into the scheduling list of the next period if the priority of the idle queue is not high priority, wherein the idle queue is in a round-robin state in the next scheduling period; namely, for some idle queues with low priority, the idle queues are scheduled and emptied next time so as to save resources;
When executing the scheduling, acquiring a scheduling list of the current scheduling; acquiring the priority and the queue length of a port queue in the scheduling list; matching the priority weight and the flow weight for the port queue based on the corresponding relation between the priority and the priority weight and the corresponding relation between the queue length and the flow weight; network resources are allocated to the port queues based on the preset conventional allocable resource amount of single scheduling, and the priority weight and the traffic weight of the port queues.
For example, if the conventional allocatable resource amount of the single scheduling is P, when allocating to the target port queue in the scheduling list, the actually allocated resource amount p=q1×q2×p. Wherein the resource comprises bandwidth.
In some embodiments, the dynamic adjustment system for port queue capacity may include a plurality of functional modules composed of computer program segments. The computer program of each program segment in the dynamic adjustment system for port queue capacity may be stored in a memory of a computer device and executed by at least one processor to perform the functions of dynamic adjustment of port queue capacity (see fig. 1 for details).
In this embodiment, the dynamic adjustment system for port queue capacity may be divided into a plurality of functional modules according to the functions performed by the dynamic adjustment system, as shown in fig. 3. The functional modules of system 300 may include: a queue monitoring module 310, a target positioning module 320, a capacity adjustment module 330. The module referred to in the present invention refers to a series of computer program segments capable of being executed by at least one processor and of performing a fixed function, stored in a memory. In the present embodiment, the functions of the respective modules will be described in detail in the following embodiments.
The queue monitoring module is used for monitoring all port queues and screening out abnormal port queues with congestion risk, wherein the port queues have priority levels and are used for caching and forwarding data packets corresponding to the priority levels;
the target positioning module is used for acquiring the target priority level of the abnormal port queue and screening out a target port queue with the priority level lower than the target priority level;
and the capacity adjustment module is used for enabling the target port queue and the abnormal port queue to jointly process the data packet corresponding to the target priority level by changing the priority of the target port queue to the target priority level.
Optionally, as an embodiment of the present invention, the queue monitoring module includes:
the buffer monitoring unit is used for periodically acquiring the available buffer capacity of the port queue with high priority level of the network switch;
the capacity comparison unit is used for comparing the available cache capacity with a preset capacity threshold value and outputting a port queue with the available cache capacity lower than the capacity threshold value as an abnormal port queue;
and the risk prompt unit is used for generating congestion risk prompt information for the abnormal port queue.
Optionally, as an embodiment of the present invention, the object positioning module includes:
The ranking unit is used for ranking all priority ranks in sequence, and taking the next rank of the target priority rank as a search object;
and the target limiting unit is used for screening out the port queues with the priority level consistent with the searching object as target port queues.
Alternatively, as an embodiment of the present invention, the capacity adjustment module includes:
the port traversing unit is used for traversing all the port queues to obtain corresponding priority levels, and storing port queue information and the corresponding priority levels in pairs to a level list;
a first query unit, configured to query a corresponding target priority level from the level list based on information of the abnormal port queue;
a second query unit, configured to query, from the class list, target port queue information corresponding to a next class of a target priority class;
and the level changing unit is used for positioning the target port queue based on the target port queue information and changing the priority of the target port queue into the target priority level.
Alternatively, as an embodiment of the present invention, the capacity adjustment module includes:
the initial configuration unit is used for storing the corresponding relation between the differential service code points and the priority and port queues to an initial configuration list in advance;
The information inquiry unit is used for inquiring the target differential service code point corresponding to the abnormal port queue from the initial configuration list;
the application configuration unit is used for generating a backup file of the initial configuration list and setting the backup file as an application configuration list;
the identifier generating unit is used for taking a port queue corresponding to the next level of the target priority level as a target port queue and generating a special identifier for the target port queue in the initial configuration list;
the information changing unit is used for changing the differential service code point of the target port queue into a target differential service code point in the application configuration list;
and the IP updating unit is used for updating the differential service code point in the IP address of the target port queue into a target differential service code point based on the application configuration list.
Optionally, as an embodiment of the present invention, the system further includes:
the risk monitoring module is used for monitoring congestion risk relief of the abnormal port queue;
the initial inquiring unit is used for inquiring the original differential service code points corresponding to the target port queues with the special marks from the initial configuration list;
an IP restoring unit, configured to restore the differential service code point in the IP address of the target port queue to the original differential service code point;
And the data deleting unit is used for deleting the special identifier of the target port queue in the initial configuration list and deleting the application configuration list.
Optionally, as an embodiment of the present invention, the system further includes:
the parameter setting module is used for setting a scheduling period, a priority weight, a flow weight and a capacity threshold;
the idle marking module is used for periodically collecting the available buffer capacity of the port queue and marking the port queue with the available buffer capacity exceeding a capacity threshold as an idle queue;
the list processing module is used for adding the idle queue into the scheduling list of the next period if the priority of the idle queue is high priority, and not adding the idle queue into the scheduling list of the next period if the priority of the idle queue is not high priority, wherein the idle queue is in the idle state in the next scheduling period;
the list acquisition module is used for acquiring a scheduling list of the current scheduling when the scheduling is executed;
the queue information acquisition module is used for acquiring the priority and the queue length of the port queue in the scheduling list;
the weight matching module is used for matching the priority weight and the flow weight for the port queue based on the corresponding relation between the priority and the priority weight and the corresponding relation between the queue length and the flow weight;
The resource allocation module is used for allocating network resources for the port queue based on the preset conventional allocable resource quantity of single scheduling, the priority weight and the flow weight of the port queue.
Fig. 4 is a schematic structural diagram of a terminal 400 according to an embodiment of the present invention, where the terminal 400 may be used to execute the method for dynamically adjusting the port queue capacity according to the embodiment of the present invention.
The terminal 400 may include: processor 410, memory 420, and communication unit 430. The components may communicate via one or more buses, and it will be appreciated by those skilled in the art that the configuration of the server as shown in the drawings is not limiting of the invention, as it may be a bus-like structure, a star-like structure, or include more or fewer components than shown, or may be a combination of certain components or a different arrangement of components.
The memory 420 may be used to store instructions for execution by the processor 410, and the memory 420 may be implemented by any type of volatile or nonvolatile memory terminal or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk. The execution of the instructions in memory 420, when executed by processor 410, enables terminal 400 to perform some or all of the steps in the method embodiments described below.
The processor 410 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by running or executing software programs and/or modules stored in the memory 420, and invoking data stored in the memory. The processor may be comprised of an integrated circuit (Integrated Circuit, simply referred to as an IC), for example, a single packaged IC, or may be comprised of a plurality of packaged ICs connected to the same function or different functions. For example, the processor 410 may include only a central processing unit (Central Processing Unit, simply CPU). In the embodiment of the invention, the CPU can be a single operation core or can comprise multiple operation cores.
And a communication unit 430 for establishing a communication channel so that the storage terminal can communicate with other terminals. Receiving user data sent by other terminals or sending the user data to other terminals.
The present invention also provides a computer storage medium in which a program may be stored, which program may include some or all of the steps in the embodiments provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (random access memory, RAM), or the like.
Therefore, in the congestion environment, the port queues are dynamically divided according to the high-priority requirement of the data, the high-priority data packet cache is improved, and the data packet cache is assisted by a scheduling strategy. The method can optimize the communication performance of the system, ensures the real-time processing of high-priority data, has important value for application scenes and systems requiring efficient communication and priority processing, and the technical effects achieved by the embodiment can be seen from the description above and are not repeated here.
It will be apparent to those skilled in the art that the techniques of embodiments of the present invention may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solution in the embodiments of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium such as a U-disc, a mobile hard disc, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk or an optical disk, etc. various media capable of storing program codes, including several instructions for causing a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the method described in the embodiments of the present invention.
The same or similar parts between the various embodiments in this specification are referred to each other. In particular, for the terminal embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference should be made to the description in the method embodiment for relevant points.
In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods may be implemented in other ways. For example, the system embodiments described above are merely illustrative, e.g., the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with respect to each other may be through some interface, indirect coupling or communication connection of systems or modules, electrical, mechanical, or other form.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
Although the present invention has been described in detail by way of preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Various equivalent modifications and substitutions may be made in the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and it is intended that all such modifications and substitutions be within the scope of the present invention/be within the scope of the present invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. A method for dynamically adjusting the capacity of a port queue, comprising:
monitoring all port queues and screening out abnormal port queues with congestion risk, wherein the port queues have priority levels and are used for caching and forwarding data packets corresponding to the priority levels;
Obtaining the target priority level of the abnormal port queue, and screening out a target port queue with the priority level lower than the target priority level;
the priority of the target port queue is changed to the target priority, so that the target port queue and the abnormal port queue jointly process the data packet corresponding to the target priority.
2. The method of claim 1, wherein monitoring all port queues and screening out abnormal port queues that are at risk of congestion comprises:
periodically acquiring the available cache capacity of a port queue with high priority of a network switch;
comparing the available cache capacity with a preset capacity threshold, and outputting a port queue with the available cache capacity lower than the capacity threshold as an abnormal port queue;
and generating congestion risk prompt information for the abnormal port queue.
3. The method of claim 1, wherein obtaining the target priority of the abnormal port queue, and screening out the target port queue having a priority lower than the target priority comprises:
sequentially arranging all priority levels, and taking the next level of the target priority level as a search object;
And screening out the port queues with the priority level consistent with the search object as target port queues.
4. A method according to claim 1 or 3, wherein causing the destination port queue and the abnormal port queue to collectively process the data packet corresponding to the destination priority level by changing the priority of the destination port queue to the destination priority level, comprises:
traversing all port queues to obtain corresponding priority levels, and storing port queue information and corresponding priority levels in pairs to a level list;
inquiring the corresponding target priority level from the level list based on the information of the abnormal port queue;
inquiring target port queue information corresponding to the next level of the target priority level from the level list;
and positioning the target port queue based on the target port queue information, and changing the priority of the target port queue to the target priority.
5. The method of claim 1, wherein causing the destination port queue and the abnormal port queue to collectively process the data packet corresponding to the destination priority level by changing the priority of the destination port queue to the destination priority level, comprises:
the corresponding relation between the differential service code points and the priority and port queues is stored in an initial configuration list in advance;
Inquiring a target differential service code point corresponding to an abnormal port queue from the initial configuration list;
generating a backup file of the initial configuration list, and setting the backup file as an application configuration list;
taking a port queue corresponding to the next level of the target priority level as a target port queue, and generating a special identifier for the target port queue in an initial configuration list;
in the application configuration list, changing the differential service code point of the target port queue into a target differential service code point;
and updating the differential service code point in the IP address of the target port queue to be a target differential service code point based on the application configuration list.
6. The method according to claim 5, characterized in that the method comprises:
monitoring congestion risk relief of the abnormal port queue;
inquiring an original differential service code point corresponding to a target port queue with a special mark from an initial configuration list;
restoring the differential service code points in the IP address of the target port queue to the original differential service code points;
deleting the special mark of the target port queue in the initial configuration list, and deleting the application configuration list.
7. The method according to claim 1, wherein the method further comprises:
setting a scheduling period, a priority weight, a flow weight and a capacity threshold;
the method comprises the steps of periodically collecting available buffer capacity of a port queue, and marking the port queue with the available buffer capacity exceeding a capacity threshold as an idle queue;
if the priority of the idle queue is high priority, adding the idle queue into a scheduling list of the next period, and if the priority of the idle queue is not high priority, not adding the idle queue into the scheduling list of the next period, wherein the idle queue is empty in the next scheduling period;
when executing the scheduling, acquiring a scheduling list of the current scheduling;
acquiring the priority and the queue length of a port queue in the scheduling list;
matching the priority weight and the flow weight for the port queue based on the corresponding relation between the priority and the priority weight and the corresponding relation between the queue length and the flow weight;
network resources are allocated to the port queues based on the preset conventional allocable resource amount of single scheduling, and the priority weight and the traffic weight of the port queues.
8. A system for dynamically adjusting port queue capacity, comprising:
The queue monitoring module is used for monitoring all port queues and screening out abnormal port queues with congestion risk, wherein the port queues have priority levels and are used for caching and forwarding data packets corresponding to the priority levels;
the target positioning module is used for acquiring the target priority level of the abnormal port queue and screening out a target port queue with the priority level lower than the target priority level;
and the capacity adjustment module is used for enabling the target port queue and the abnormal port queue to jointly process the data packet corresponding to the target priority level by changing the priority of the target port queue to the target priority level.
9. A terminal, comprising:
the memory is used for storing a dynamic adjustment program of the port queue capacity;
a processor, configured to implement the steps of the method for dynamically adjusting the capacity of a port queue according to any one of claims 1 to 7 when executing the program for dynamically adjusting the capacity of the port queue.
10. A computer readable storage medium storing a computer program, wherein a dynamic adjustment program for port queue capacity is stored on the readable storage medium, and the dynamic adjustment program for port queue capacity, when executed by a processor, implements the steps of the method for dynamic adjustment of port queue capacity according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311278581.0A CN117278489A (en) | 2023-09-28 | 2023-09-28 | Dynamic adjustment method, system, terminal and storage medium for port queue capacity |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311278581.0A CN117278489A (en) | 2023-09-28 | 2023-09-28 | Dynamic adjustment method, system, terminal and storage medium for port queue capacity |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117278489A true CN117278489A (en) | 2023-12-22 |
Family
ID=89202355
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311278581.0A Pending CN117278489A (en) | 2023-09-28 | 2023-09-28 | Dynamic adjustment method, system, terminal and storage medium for port queue capacity |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117278489A (en) |
-
2023
- 2023-09-28 CN CN202311278581.0A patent/CN117278489A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9106577B2 (en) | Systems and methods for dropping data using a drop profile | |
US9100314B2 (en) | Dequeuing and congestion control systems and methods for single stream multicast | |
US6914882B2 (en) | Method and apparatus for improved queuing | |
US8599868B2 (en) | Systems and methods for determining the bandwidth used by a queue | |
KR100933917B1 (en) | Bandwidth guarantee and overload protection method in network switch | |
US8036117B1 (en) | Dequeuing and congestion control systems and methods | |
KR100429904B1 (en) | Router providing differentiated quality-of-service and fast internet protocol packet classification method for the same | |
US7613199B1 (en) | Systems and methods for permitting queues to oversubscribe | |
US7619969B2 (en) | Hardware self-sorting scheduling queue | |
US8072998B2 (en) | Systems and methods for congestion control using random early drop at head of buffer | |
CN109547341B (en) | Load sharing method and system for link aggregation | |
EP2670085B1 (en) | System for performing Data Cut-Through | |
CN116582493A (en) | Data center network link selection method and device and electronic equipment | |
CN117793583A (en) | Message forwarding method and device, electronic equipment and computer readable storage medium | |
CN116318554A (en) | Network transmission method and device | |
CN117278489A (en) | Dynamic adjustment method, system, terminal and storage medium for port queue capacity | |
US6904056B2 (en) | Method and apparatus for improved scheduling technique | |
US8094558B2 (en) | Packet transfer apparatus for storage system | |
JP4104756B2 (en) | Method and system for scheduling data packets in a telecommunications network | |
CN118748660A (en) | Execution method and device of data transmission request, storage medium and electronic equipment |
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 |