Node flow adjusting method, device and equipment
By introducing monitoring timer and event reporting mechanisms in the multi-controller storage system, node traffic is monitored and adjusted in real time, the problem that node controllers cannot flexibly adjust traffic is solved, and cluster-level traffic management and business processing capabilities are improved.
Patent Information
- Application Number
- CN202411211737.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-08-30
AI Technical Summary
In the existing multi-controller storage system, node controllers cannot flexibly adjust the traffic of each node, resulting in traffic control being limited to each node, and it is impossible to achieve effective traffic management of the entire storage cluster system, especially when multiple nodes simultaneously process input and output. Especially obvious at the time.
By establishing a monitoring timer and event reporting mechanism between the node controller and the cluster main controller, the traffic information of the node is monitored and reported in real time, and the traffic control value is calculated and feedback to adjust the actual traffic of the node controller to achieve cluster-level Flow control.
The traffic management of the entire storage cluster system is realized, the system's adaptability and service processing capabilities are improved, the traffic of each node can be flexibly adjusted, and the support for the upper-level business data volume is enhanced.
Smart Images

Figure CN119094445A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data flow control, and in particular to a node flow adjustment method, device and equipment. Background Art
[0002] Storage systems are widely used in today's big data information age and have become an indispensable part of maintaining the operation of society and life. In order to meet the processing requirements of different scenarios, it is necessary to control the flow of network nodes to ensure the security and stability of network equipment operation, thereby improving the business processing capabilities of the equipment. At present, multi-controller storage systems are widely used systems. Their input and output processes are completed on each node controller, and the cluster master controller cannot perceive the flow information on each node. The lack of control of the input and output flow by the cluster master controller will result in flow control being limited to each node and independent of each other. If multiple nodes process input and output at the same time, flow control of the entire storage cluster system cannot be achieved. Only by adjusting the flow of the corresponding node through the node controller, it is impossible to flexibly adjust the flow of each node, and even has a large dependence on the amount of upper-layer business data. Summary of the invention
[0003] In order to solve the problem that the node controller cannot flexibly adjust the traffic of each node when adjusting the traffic, the present application provides the following technical solutions:
[0004] In a first aspect, a node traffic adjustment method is provided, which is applied to any node controller, comprising:
[0005] Start the monitoring timer to monitor the monitored object;
[0006] In response to the monitoring timer detecting that a reporting event occurs in the monitored object, the reporting event is sent to the cluster master controller, so that the cluster master controller issues an inspection notification according to the reporting event;
[0007] Receive inspection notifications sent by the cluster master controller and start the event reporting timer;
[0008] The event to be reported and the effective flow of the node controller are sent to the cluster master controller through the event reporting timer, so that the cluster master controller can calculate the flow control value of the corresponding node controller, wherein the event to be reported includes: the reporting event that occurs after the monitored object receives the inspection notification, and the flow control value is the allocation ratio of any node controller to the total flow of its cluster;
[0009] Receive the flow control value of the node controller, and adjust the actual flow of the node controller according to the flow control value.
[0010] Furthermore, the event to be reported and the effective flow of the node controller are sent to the cluster master controller through the event reporting timer, so that the cluster master controller can calculate the flow control value of the corresponding node controller, including:
[0011] At any reporting time, obtain the effective flow of the node controller from the last reporting time to the current reporting time, where the first reporting time is the time when the inspection notification is received, and the time interval between adjacent reporting times is the reporting period;
[0012] From the events to be reported, a number of reported events are obtained according to the order of occurrence time of the reported events;
[0013] Packing the effective flow of the node controller and several reporting events from the last reporting time to the current reporting time into a single reporting data, wherein the capacity of the single reporting data is not greater than the preset capacity;
[0014] Send single reporting data to the cluster master controller.
[0015] Furthermore, obtaining the effective flow of the node controller from the last reporting time to the current reporting time includes:
[0016] The flow of the monitored object is obtained at each sampling period, wherein the sampling period is the time interval for obtaining the flow of the monitored object;
[0017] Eliminate the traffic of the monitored object that occurs within the steady-state period after the monitoring timer is started;
[0018] Determine whether the number of non-zero traffic of the monitored object collected within a reporting period is greater than a preset non-zero number;
[0019] In response to the number of non-zero traffic of the monitored object collected within a reporting period being greater than the preset non-zero number, according to:
[0020]
[0021] Calculate the average traffic volume of the monitored object within the reporting period, where: is the average traffic volume of the monitored object in the reporting period, T R is the duration of the reporting cycle, V i is the flow value of the monitored object sampled at the sampling time, i is a natural number, indicating the sampling times arranged in chronological order within the reporting period, and n is the total number of flow values of the monitored object collected within the reporting period;
[0022] The average flow rate of the monitored object is taken as the effective flow rate of the node controller.
[0023] Further, receiving the flow control value of the node controller, and adjusting the actual flow of the node controller according to the flow control value, includes:
[0024] Receive the traffic control value of the node controller;
[0025] Determine the actual flow of the node controller according to the flow control value of the node controller;
[0026] The actual flow of the node controller is input into the flow limiter of the node controller to adjust the actual flow of the node controller.
[0027] Further, according to the flow control value of the node controller, determining the actual flow of the node controller includes:
[0028] Get the total traffic of the cluster where the node controller is located;
[0029] The product of the total traffic of the cluster where the node controller is located and the traffic control value is taken as the actual traffic of the node controller.
[0030] In a second aspect, a node traffic adjustment method is provided, which is applied to a cluster main controller, comprising:
[0031] Starting a patrol timer according to a reporting event sent by any node controller, and sending a patrol notification to any node controller, wherein the reporting event is obtained by monitoring the monitored object by the monitoring timer of any node controller;
[0032] Based on the reporting events sent by any node controller and the effective flow of the node controller, the flow control value of the node controller is determined, and the flow control value is fed back to the node controller, wherein the effective flow is the average flow of the monitored object monitored by the node controller within the reporting period corresponding to the sent reporting event.
[0033] Further, according to the reporting event sent by any node controller and the effective flow of the node controller, the flow control value of the node controller is determined, and the flow control value is fed back to the node controller, including:
[0034] Summarize the valid traffic sent by any node controller;
[0035] Based on the effective traffic sent by all node controllers, the effective traffic of all node controllers is repeatedly halved at the same time until a result less than or equal to a preset value appears in the halving operation result;
[0036] The flow ratio of each node controller is calculated according to the final halving operation result as the flow control value of the corresponding node controller.
[0037] In a third aspect, a node traffic adjustment method is provided, including:
[0038] A100: Start the monitoring timer to monitor the monitored object;
[0039] A200: In response to the monitoring timer detecting that a reporting event occurs in the monitored object, the reporting event is sent to the cluster master controller, so that the cluster master controller issues an inspection notification according to the reporting event;
[0040] B100: starting a patrol timer according to a reporting event sent by any node controller, and sending a patrol notification to any node controller, wherein the reporting event is obtained by monitoring the monitored object by the monitoring timer of any node controller;
[0041] A300: receives the inspection notification sent by the cluster master controller and starts the event reporting timer;
[0042] A400: Send the event to be reported and the effective flow of the node controller to the cluster master controller through the event reporting timer, so that the cluster master controller can calculate the flow control value of the corresponding node controller, where the event to be reported includes: the reporting event that occurs after the monitored object receives the inspection notification, and the flow control value is the allocation ratio of any node controller to the total flow of its cluster;
[0043] The event to be reported and the effective flow of the node controller are sent to the cluster master controller through the event reporting timer, so that the cluster master controller can calculate the flow control value of the corresponding node controller, which specifically includes:
[0044] A410: at any reporting time, obtaining the effective flow of the node controller from the last reporting time to the current reporting time, wherein the first reporting time is the time when the inspection notification is received, and the time interval between adjacent reporting times is the reporting period;
[0045] The effective flow of the node controller between the last reporting time and the current reporting time is obtained, specifically including:
[0046] A411: Obtain the traffic of the monitored object at each sampling period, where the sampling period is the time interval for obtaining the traffic of the monitored object;
[0047] A412: Remove the traffic of the monitored object that occurs within the steady-state period after the monitoring timer is started;
[0048] A413: Determine whether the number of non-zero traffic of the monitored object collected within a reporting period is greater than the preset non-zero number;
[0049] A414: In response to the number of non-zero traffic of the monitored object collected within a reporting period being greater than a preset non-zero number, according to:
[0050]
[0051] Calculate the average traffic volume of the monitored object within the reporting period, where: is the average traffic volume of the monitored object in the reporting period, T R is the duration of the reporting cycle, V i is the flow value of the monitored object sampled at the sampling time, i is a natural number, indicating the sampling times arranged in chronological order within the reporting period, and n is the total number of flow values of the monitored object collected within the reporting period;
[0052] A415: The average flow rate of the monitored object is used as the effective flow rate of the node controller.
[0053] A420: From the events to be reported, obtain a number of reported events according to the order of occurrence time of the reported events;
[0054] A430: Pack the effective traffic of the node controller from the last reporting time to the current reporting time and several reporting events into a single reporting data, wherein the capacity of the single reporting data is not greater than the preset capacity;
[0055] A440: Sends single reporting data to the cluster master controller.
[0056] B200: Determine the flow control value of the node controller based on the reporting event sent by any node controller and the effective flow of the node controller, and feed back the flow control value to the node controller, wherein the effective flow is the average flow of the monitored object monitored by the node controller within the reporting period corresponding to the sent reporting event.
[0057] Wherein, according to the reporting event sent by any node controller and the effective flow of the node controller, the flow control value of the node controller is determined, and the flow control value is fed back to the node controller, specifically including:
[0058] B210: Summarizes the valid traffic sent by any node controller;
[0059] B220: Based on the effective traffic sent by all node controllers, the effective traffic of all node controllers is repeatedly halved until a result of the halving operation is less than or equal to a preset value;
[0060] B230: Calculate the flow ratio of each node controller according to the final halving operation result as the flow control value of the corresponding node controller.
[0061] A500: receives the flow control value of the node controller, and adjusts the actual flow of the node controller according to the flow control value.
[0062] The step of receiving the flow control value of the node controller and adjusting the actual flow of the node controller according to the flow control value includes:
[0063] A510: receiving the flow control value of the node controller;
[0064] A520: determining the actual flow of the node controller according to the flow control value of the node controller;
[0065] A520: determining the actual flow of the node controller according to the flow control value of the node controller, including:
[0066] A521: Get the total traffic of the cluster where the node controller is located;
[0067] A522: The product of the total traffic of the cluster where the node controller is located and the traffic control value is taken as the actual traffic of the node controller.
[0068] A530: Input the actual flow of the node controller into the flow limiter of the node controller to adjust the actual flow of the node controller.
[0069] In a fourth aspect, a node traffic adjustment device is provided, which is applied to any node controller, including:
[0070] A monitoring start module is used to start the monitoring timer to monitor the monitored object;
[0071] An event reporting module, for sending a reporting event to a cluster master controller in response to a monitoring timer detecting a reporting event of a monitored object, so that the cluster master controller can issue an inspection notification according to the reporting event;
[0072] An event start module is used to receive the inspection notification sent by the cluster master controller and start the event reporting timer;
[0073] The data sending module is used to send the events to be reported and the effective flow of the node controller to the cluster main controller through the event reporting timer, so that the cluster main controller can calculate the flow control value of the corresponding node controller, wherein the events to be reported include: the reporting events that occur in the monitored object after receiving the inspection notification, and the flow control value is the allocation ratio of any node controller to the total flow of its cluster;
[0074] The flow setting module is used to receive the flow control value of the node controller and adjust the actual flow of the node controller according to the flow control value.
[0075] In a fifth aspect, a node traffic adjustment device is provided, which is applied to a cluster main controller, including:
[0076] A notification issuing module is used to start a patrol timer according to a reporting event sent by any node controller, and send a patrol notification to any node controller, wherein the reporting event is obtained by monitoring the monitored object by the monitoring timer of any node controller;
[0077] The control feedback module is used to determine the flow control value of the node controller based on the reporting event sent by any node controller and the effective flow of the node controller, and feed back the flow control value to the node controller, wherein the effective flow is the average flow of the monitored object monitored by the node controller within the reporting period corresponding to the reporting event sent.
[0078] In the sixth aspect, a node traffic adjustment device is provided, comprising a memory, a processor, and a node traffic adjustment program stored in the memory and executable on the processor. When the processor executes the node traffic adjustment program, the node traffic adjustment method described in the first aspect, the second aspect, or the third aspect is implemented.
[0079] In the seventh aspect, a computer-readable storage medium is provided, on which a node traffic adjustment program is stored. When the node traffic adjustment program is executed by a processor, the node traffic adjustment method recorded in the first aspect, the second aspect, or the third aspect is implemented.
[0080] In an eighth aspect, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the node traffic adjustment method recorded in the first aspect, the second aspect, or the third aspect.
[0081] The beneficial effect of the technical solution provided by the embodiment of the present application is: by implementing a node traffic adjustment method, device and equipment disclosed in the embodiment of the present application, a cluster-level traffic control function can be achieved, thereby improving the product adaptability of the storage system. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0083] Figure 1 It is a schematic diagram of a node flow adjustment method applied to a node controller provided in an embodiment of the present application;
[0084] Figure 2It is a schematic diagram of a node traffic adjustment method applied to a cluster main controller provided in an embodiment of the present application;
[0085] Figure 3 It is a schematic diagram of a node traffic adjustment method provided in an embodiment of the present application;
[0086] Figure 4 It is a schematic diagram of a node flow adjustment device applied to a node controller provided in an embodiment of the present application;
[0087] Figure 5 It is a schematic diagram of a node flow adjustment device applied to a cluster main controller provided in an embodiment of the present application;
[0088] Figure 6 This is a schematic diagram of a node traffic adjustment device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0089] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the implementation mode of this application will be clearly and completely described below in conjunction with the drawings in the implementation mode of this application. Obviously, the described implementation mode is only a part of the embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0090] Unless otherwise defined, the technical terms or scientific terms used in the present disclosure shall have the usual meanings understood by persons with ordinary skills in the field to which the present disclosure belongs. The words "first", "second" and similar words used in the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one", "one" or "the" do not indicate a quantity limitation, but indicate that there is at least one. The numbers in the drawings of the specification only indicate the distinction between various functional components or modules, and do not indicate the logical relationship between components or modules. Words such as "include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Words such as "connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0091] Hereinafter, various embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. It should be noted that in the accompanying drawings, the same reference numerals are given to components having substantially the same or similar structures and functions, and repeated descriptions thereof will be omitted.
[0092] In order to solve the problem that the node controller cannot flexibly adjust the flow of each node when adjusting the flow, the present application provides the following technical solutions.
[0093] In some embodiments, Figure 1 As shown, a node traffic adjustment method is applied to any node controller, comprising:
[0094] A100: Start the monitoring timer to monitor the monitored object.
[0095] A node controller is a controller that manages traffic for devices at a certain node in the network.
[0096] The node controllers in the same network form a controller cluster. Among them, a node controller is set as the cluster master controller to handle the cluster main flow control business. The cluster main flow control business at least includes the following: sending inspection notifications and determining the regulation flow of any node controller. The cluster master controller cluster adopts a redundant setting. After the current cluster master controller fails, a preset node controller will replace it as the cluster master controller. The order of replacing the node controllers that constitute the controller cluster, the cluster master controller, and the node controller that replaces the cluster master controller after the current master controller fails can be preset when creating the controller cluster.
[0097] The monitoring timer is a timer set in the node controller, which is used to perform monitoring actions on the monitored object with a sampling period. The monitoring timer collects data from the monitored object at each sampling period. The sampling period of the monitoring timer can be preset, for example: 1 second. The monitored object, that is, the device at a node in the network referred to above, includes at least one of the following: a virtual disk, a virtual disk group, and a host. Usually, one node controller corresponds to one monitored object. The data collected by the monitoring timer from the monitored object at each sampling period includes at least one of the following: the performance parameters of the monitored object and the events of the monitored object. The performance parameters of the monitored object include at least one of the following: the number of reads and writes per second of the monitored object, and the bandwidth of the monitored object. Among them, the number of reads and writes per second represents the sum of the number of reads and writes per second of the monitored object; the bandwidth of the monitored object is related to the number of reads and writes per second of the monitored object and the size of the upper-layer business data of the monitored object. Usually, according to: BW=O ps ×V, determine the bandwidth, where BW represents the bandwidth of the monitored object, O psIndicates the number of reads and writes per second of the monitored object, and V indicates the size of the upper-layer business data of the monitored object. The monitored object events include at least: creation events, start events, stop events, inspection events, and idle events.
[0098] Usually, the monitoring timer is started by a command. For example, the monitoring timer is started by the Perf performance analysis command, and schematically, the monitoring timer is started by the mkthrottle-iops 10000-object 1 command. The present application does not limit the specific command for starting the monitoring timer.
[0099] A200: In response to the monitoring timer detecting that a reporting event occurs in the monitored object, the reporting event is sent to the cluster master controller, so that the cluster master controller issues an inspection notification according to the reporting event.
[0100] Reporting incidents include the following:
[0101] Create event: refers to the user setting the traffic of the monitored object through commands. When the user controls the traffic of the monitored object through commands, the event is marked as a create event and the event reporting timer is started.
[0102] Startup event: refers to the traffic of the monitored object changing from 0 to non-0. When the traffic of the monitored object changes from 0 to non-0, the event is marked as a startup event and the event reporting timer is started.
[0103] Stop event: refers to the traffic of the monitored object changing from non-0 to 0. When the traffic of the monitored object changes from non-0 to 0, the event is marked as a stop event and the event reporting timer is started.
[0104] A300: Receives the inspection notification sent by the cluster master controller and starts the event reporting timer.
[0105] The event reporting timer is used to monitor the start time, stop event and idle event of the monitored object events recorded above.
[0106] Since the monitored object may report events at different times during the operation cycle of an event reporting timer, if the event reporting timer is already in the started state and the monitored object reports an event again, the event reporting timer will not be started again.
[0107] An event reporting timer operation cycle starts with the start of the event reporting timer and ends with the identification of the idle event mark. The rule for marking idle events is as follows: when the node controller has processed all events and no new events occur, the idle event is marked.
[0108] A400: Send the event to be reported and the effective flow of the node controller to the cluster master controller through the event reporting timer, so that the cluster master controller can calculate the flow control value of the corresponding node controller, where the event to be reported includes: the reporting event that occurs after the monitored object receives the inspection notification, and the flow control value is the allocation ratio of any node controller to the total flow of its cluster;
[0109] A500: receives the flow control value of the node controller, and adjusts the actual flow of the node controller according to the flow control value.
[0110] Specifically, A400: sends the event to be reported and the effective flow of the node controller to the cluster master controller through the event reporting timer, so that the cluster master controller can calculate the flow control value of the corresponding node controller, including:
[0111] A410: at any reporting time, obtaining the effective flow of the node controller from the last reporting time to the current reporting time, wherein the first reporting time is the time when the inspection notification is received, and the time interval between adjacent reporting times is the reporting period;
[0112] A420: From the events to be reported, obtain a number of reported events according to the order of occurrence time of the reported events;
[0113] A430: Pack the effective traffic of the node controller from the last reporting time to the current reporting time and several reporting events into a single reporting data, wherein the capacity of the single reporting data is not greater than the preset capacity;
[0114] A440: Sends single reporting data to the cluster master controller.
[0115] Indicatively, the event reporting timer triggers reporting every 5 seconds. The node controller number, the effective flow of the node controller and several reporting events are packaged and sent to the cluster master controller.
[0116] The capacity of the packaged data packet can be determined by presetting, for example: 512KB. In this way, the frequency of sending data to the cluster master controller and the size of the data sent per word are limited to avoid affecting the cluster master controller to process other events.
[0117] Specifically, obtaining the effective flow of the node controller from the last reporting time to the current reporting time includes:
[0118] A411: Obtain the traffic of the monitored object at each sampling period, where the sampling period is the time interval for obtaining the traffic of the monitored object;
[0119] A412: Remove the traffic of the monitored object that occurs within the steady-state period after the monitoring timer is started;
[0120] A413: Determine whether the number of non-zero traffic of the monitored object collected within a reporting period is greater than the preset non-zero number;
[0121] A414: In response to the number of non-zero traffic of the monitored object collected within a reporting period being greater than a preset non-zero number, according to:
[0122]
[0123] Calculate the average traffic volume of the monitored object within the reporting period, where: is the average traffic volume of the monitored object in the reporting period, T R is the duration of the reporting cycle, V i is the flow value of the monitored object sampled at the sampling time, i is a natural number, indicating the sampling times arranged in chronological order within the reporting period, and n is the total number of flow values of the monitored object collected within the reporting period;
[0124] A415: The average flow rate of the monitored object is used as the effective flow rate of the node controller.
[0125] The start time of the flow collection period is after the start time of the monitoring timer and is separated from the start time of the monitoring timer by a first period. The first period can be obtained by presetting, for example, the first period is set to 3 seconds.
[0126] The duration of the traffic collection period can be obtained by presetting, for example, the duration of the traffic collection period is set to 5 seconds.
[0127] The preset period is the time interval for acquiring the flow of the monitored object. Preferably, the preset period is the same as the sampling period of the monitoring timer, for example: 1 second.
[0128] The flow rate of the monitored object is collected from the first period after the monitoring timer is started, which can effectively prevent flow fluctuations and the influence of the monitoring timer on the flow rate of the monitored object when it is started. A relatively stable flow rate value of the monitored object can be obtained.
[0129] Traffic removal is to ensure that the monitored traffic is steady-state traffic and avoid the impact of traffic jitter.
[0130] A non-zero number is preset to indicate the traffic activity of the monitored object. A high traffic activity indicates that the monitored object is active during the traffic collection period, and the calculated traffic effective value can truly reflect the traffic load of the monitored object. Accordingly, limiting the flow of the monitored object according to the traffic load can more truly reflect the data throughput capacity of the monitored object.
[0131] Specifically, A500: receiving the flow control value of the node controller, and adjusting the actual flow of the node controller according to the flow control value, including:
[0132] A510: receiving the flow control value of the node controller;
[0133] A520: determining the actual flow of the node controller according to the flow control value of the node controller;
[0134] A530: Input the actual flow of the node controller into the flow limiter of the node controller to adjust the actual flow of the node controller.
[0135] Specifically, A520: determining the actual flow of the node controller according to the flow control value of the node controller, including:
[0136] A521: Get the total traffic of the cluster where the node controller is located;
[0137] A522: The product of the total traffic of the cluster where the node controller is located and the traffic control value is used as the actual traffic of the node controller.
[0138] The total cluster flow can be determined by an external command. After the total cluster flow is updated, the actual flow of each node controller is recalculated.
[0139] In other embodiments, Figure 2 As shown, a node traffic adjustment method is applied to a cluster main controller, comprising:
[0140] B100: Start the inspection timer according to the reporting event sent by any node controller, and send an inspection notification to any node controller, wherein the reporting event is obtained by monitoring the monitored object by the monitoring timer of any node controller.
[0141] Indicatively, the inspection timer performs three inspections. The first inspection is 30 seconds after the inspection timer is started. The next two inspections are 60 seconds apart from the previous inspection. After the three inspections are completed, the inspection timer is turned off. If a reporting event occurs during any of the three inspections, the inspection timer will perform three inspections again. The inspection notification is sent when the inspection timer is started.
[0142] B200: Determine the flow control value of the node controller based on the reporting event sent by any node controller and the effective flow of the node controller, and feed back the flow control value to the node controller, wherein the effective flow is the average flow of the monitored object monitored by the node controller within the reporting period corresponding to the sent reporting event.
[0143] Specifically, B200: determining a flow control value of any node controller according to a reporting event sent by the node controller and the effective flow of the node controller, and feeding back the flow control value to the node controller, including:
[0144] B210: Summarizes the valid traffic sent by any node controller;
[0145] B220: Based on the effective traffic sent by all node controllers, the effective traffic of all node controllers is repeatedly halved until a result of the halving operation is less than or equal to a preset value;
[0146] B230: Calculate the flow ratio of each node controller according to the final halving operation result as the flow control value of the corresponding node controller.
[0147] Schematically, the cluster master controller obtains the effective flow of the three node controllers A, B, and C respectively: the effective flow of the A node controller V A =100, the effective flow of the B node controller is V B =90, the effective flow of the C node controller is V C =80. The preset value is 20. It should be noted that the value is a schematic representation of the processing process and does not represent the actual situation, so the specific flow rate is not limited by the unit.
[0148] The result of the first halving is: V A1 =50, V B1 =45, V C1 =40;
[0149] The result of the second halving is: V A2 =25, V B2 =22.5, V C2 =20.
[0150] Since V C2 =20, which is equal to the preset value. Then V A2 =25, V B2 =22.5, V C2 =20Calculate the traffic ratio of each node controller.
[0151] In other embodiments, Figure 3As shown, a node traffic adjustment method includes:
[0152] A100: Start the monitoring timer to monitor the monitored object;
[0153] A200: In response to the monitoring timer detecting that a reporting event occurs in the monitored object, the reporting event is sent to the cluster master controller, so that the cluster master controller issues an inspection notification according to the reporting event;
[0154] B100: starting a patrol timer according to a reporting event sent by any node controller, and sending a patrol notification to any node controller, wherein the reporting event is obtained by monitoring the monitored object by the monitoring timer of any node controller;
[0155] A300: receives the inspection notification sent by the cluster master controller and starts the event reporting timer;
[0156] A400: Send the event to be reported and the effective flow of the node controller to the cluster master controller through the event reporting timer, so that the cluster master controller can calculate the flow control value of the corresponding node controller, where the event to be reported includes: the reporting event that occurs after the monitored object receives the inspection notification, and the flow control value is the allocation ratio of any node controller to the total flow of its cluster;
[0157] The event to be reported and the effective flow of the node controller are sent to the cluster master controller through the event reporting timer, so that the cluster master controller can calculate the flow control value of the corresponding node controller, which specifically includes:
[0158] A410: at any reporting time, obtaining the effective flow of the node controller from the last reporting time to the current reporting time, wherein the first reporting time is the time when the inspection notification is received, and the time interval between adjacent reporting times is the reporting period;
[0159] The effective flow of the node controller between the last reporting time and the current reporting time is obtained, specifically including:
[0160] A411: Obtain the traffic of the monitored object at each sampling period, where the sampling period is the time interval for obtaining the traffic of the monitored object;
[0161] A412: Remove the traffic of the monitored object that occurs within the steady-state period after the monitoring timer is started;
[0162] A413: Determine whether the number of non-zero traffic of the monitored object collected within a reporting period is greater than the preset non-zero number;
[0163] A414: In response to the number of non-zero traffic of the monitored object collected within a reporting period being greater than a preset non-zero number, according to:
[0164]
[0165] Calculate the average traffic volume of the monitored object within the reporting period, where: is the average traffic volume of the monitored object in the reporting period, T R is the duration of the reporting cycle, V i is the flow value of the monitored object sampled at the sampling time, i is a natural number, indicating the sampling times arranged in chronological order within the reporting period, and n is the total number of flow values of the monitored object collected within the reporting period;
[0166] A415: The average flow rate of the monitored object is used as the effective flow rate of the node controller.
[0167] A420: From the events to be reported, obtain a number of reported events according to the order of occurrence time of the reported events;
[0168] A430: Pack the effective traffic of the node controller from the last reporting time to the current reporting time and several reporting events into a single reporting data, wherein the capacity of the single reporting data is not greater than the preset capacity;
[0169] A440: Sends single reporting data to the cluster master controller.
[0170] B200: Determine the flow control value of the node controller based on the reporting event sent by any node controller and the effective flow of the node controller, and feed back the flow control value to the node controller, wherein the effective flow is the average flow of the monitored object monitored by the node controller within the reporting period corresponding to the sent reporting event.
[0171] Wherein, according to the reporting event sent by any node controller and the effective flow of the node controller, the flow control value of the node controller is determined, and the flow control value is fed back to the node controller, specifically including:
[0172] B210: Summarizes the valid traffic sent by any node controller;
[0173] B220: Based on the effective traffic sent by all node controllers, the effective traffic of all node controllers is repeatedly halved until a result of the halving operation is less than or equal to a preset value;
[0174] B230: Calculate the flow ratio of each node controller according to the final halving operation result as the flow control value of the corresponding node controller.
[0175] A500: receives the flow control value of the node controller, and adjusts the actual flow of the node controller according to the flow control value.
[0176] The step of receiving the flow control value of the node controller and adjusting the actual flow of the node controller according to the flow control value includes:
[0177] A510: receiving the flow control value of the node controller;
[0178] A520: determining the actual flow of the node controller according to the flow control value of the node controller;
[0179] A520: determining the actual flow of the node controller according to the flow control value of the node controller, including:
[0180] A521: Get the total traffic of the cluster where the node controller is located;
[0181] A522: The product of the total traffic of the cluster where the node controller is located and the traffic control value is used as the actual traffic of the node controller.
[0182] A530: Input the actual flow of the node controller into the flow limiter of the node controller to adjust the actual flow of the node controller.
[0183] It should be understood that although Figure 1 , Figure 2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 , Figure 2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0184] In other embodiments, Figure 4 As shown, a node traffic adjustment device is applied to any node controller, comprising:
[0185] A monitoring start module is used to start the monitoring timer to monitor the monitored object;
[0186] An event reporting module, for sending a reporting event to a cluster master controller in response to a monitoring timer detecting a reporting event of a monitored object, so that the cluster master controller can issue an inspection notification according to the reporting event;
[0187] An event start module is used to receive the inspection notification sent by the cluster master controller and start the event reporting timer;
[0188] The data sending module is used to send the events to be reported and the effective flow of the node controller to the cluster main controller through the event reporting timer, so that the cluster main controller can calculate the flow control value of the corresponding node controller, wherein the events to be reported include: the reporting events that occur in the monitored object after receiving the inspection notification, and the flow control value is the allocation ratio of any node controller to the total flow of its cluster;
[0189] The flow setting module is used to receive the flow control value of the node controller and adjust the actual flow of the node controller according to the flow control value.
[0190] In other embodiments, Figure 5 As shown, a node traffic adjustment device is applied to a cluster main controller, comprising:
[0191] A notification issuing module is used to start a patrol timer according to a reporting event sent by any node controller, and send a patrol notification to any node controller, wherein the reporting event is obtained by monitoring the monitored object by the monitoring timer of any node controller;
[0192] The control feedback module is used to determine the flow control value of the node controller based on the reporting event sent by any node controller and the effective flow of the node controller, and feed back the flow control value to the node controller, wherein the effective flow is the average flow of the monitored object monitored by the node controller within the reporting period corresponding to the reporting event sent.
[0193] For the specific limitations of the node traffic adjustment device described above, please refer to the limitations of the node traffic adjustment method described above, which will not be repeated here. Each module in the above-mentioned node traffic adjustment device can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0194] In other embodiments, Figure 6As shown, a node traffic adjustment device includes a memory, a processor, and a node traffic adjustment program stored in the memory and executable on the processor. When the processor executes the node traffic adjustment program, the node traffic adjustment method described above is implemented, which will not be repeated here.
[0195] In other embodiments, a computer-readable storage medium stores a node traffic adjustment program, and when the node traffic adjustment program is executed by a processor, the node traffic adjustment method described above is implemented, which will not be repeated here.
[0196] In some other embodiments, a computer program product includes a computer program, and when the computer program is executed by a processor, the node traffic adjustment method described above is implemented, which will not be described in detail here.
[0197] By implementing a node traffic adjustment method, device and equipment disclosed in the embodiments of the present application, cluster-level traffic control functions can be realized, and the product adaptability of the storage system can be improved. In turn, the storage system can be applied to more industries, greatly expanding the fields that the storage system can cope with and broadening the application areas of the product.
[0198] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0199] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program loaded on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a memory, or installed from a ROM. When the computer program is executed by an external processor, the above-mentioned functions defined in the method of the embodiment of the present application are executed.
[0200] It should be noted that the computer-readable medium of the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In an embodiment of the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0201] The computer-readable medium may be included in the server; or it may exist independently without being installed in the server. The computer-readable medium carries one or more programs. When the one or more programs are executed by the server, the server: in response to detecting that the peripheral mode of the terminal is not activated, obtains the frame rate of the application on the terminal; when the frame rate meets the screen-off condition, determines whether the user is obtaining the screen information of the terminal; in response to the judgment result that the user is not obtaining the screen information of the terminal, controls the screen to enter the immediate dimming mode.
[0202] Computer program code for performing the operation of the embodiments of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0203] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0204] The technical solution provided by the present application is described in detail above. The principle and implementation method of the present application are described in detail using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present application.
[0205] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A node traffic adjustment method, characterized in that: Applicable to any node controller, including: Start the monitoring timer to monitor the monitored object; In response to the monitoring timer detecting that a reporting event occurs in the monitored object, the reporting event is sent to the cluster master controller, so that the cluster master controller issues an inspection notification according to the reporting event; Receive the inspection notification sent by the cluster master controller and start the event reporting timer; Send the event to be reported and the effective flow of the node controller to the cluster master controller through the event reporting timer, so that the cluster master controller can calculate the flow control value of the corresponding node controller, wherein the event to be reported includes: the reporting event of the monitored object after receiving the inspection notification, and the flow control value is the allocation ratio of any node controller to the total flow of its cluster; A flow control value of the node controller is received, and an actual flow of the node controller is adjusted according to the flow control value.
2. The node traffic adjustment method according to claim 1, characterized in that: Sending the event to be reported and the effective flow of the node controller to the cluster main controller through the event reporting timer, so that the cluster main controller can calculate the flow control value of the corresponding node controller, including: At any reporting time, obtain the effective flow of the node controller from the last reporting time to the current reporting time, wherein the first reporting time is the time when the inspection notification is received, and the time interval between adjacent reporting times is the reporting period; From the events to be reported, a number of reported events are obtained according to the order of occurrence time of the reported events; Packing the effective flow of the node controller from the last reporting time to the current reporting time and the plurality of reporting events into a single reporting data, wherein the capacity of the single reporting data is not greater than a preset capacity; The single reporting data is sent to the cluster master controller.
3. The node traffic adjustment method according to claim 2, characterized in that: The obtaining of the effective flow of the node controller from the last reporting time to the current reporting time includes: At each sampling period, the flow of the monitored object is obtained, wherein the sampling period is the time interval for obtaining the flow of the monitored object; Eliminate the traffic of the monitored object that occurs within a steady-state period after the monitoring timer is started; Determine whether the number of non-zero traffic of the monitored object collected within the one reporting period is greater than a preset non-zero number; In response to the number of non-zero traffic of the monitored object collected within the one reporting period being greater than the preset non-zero number, according to: Calculate the average flow rate of the monitored object within the reporting period, where: is the average flow rate of the monitored object in the reporting period, T R is the duration of the reporting cycle, V i is the flow value of the monitored object sampled at the sampling time, i is a natural number, indicating the sampling times arranged in chronological order within the reporting period, and n is the total number of flow values of the monitored object collected within the reporting period; The average flow rate of the monitored object is used as the effective flow rate of the node controller.
4. The node traffic adjustment method according to claim 1, characterized in that: The receiving the flow control value of the node controller and adjusting the actual flow of the node controller according to the flow control value includes: Receive the traffic control value of the node controller; Determine the actual flow of the node controller according to the flow control value of the node controller; The actual flow of the node controller is input into the flow limiter of the node controller to adjust the actual flow of the node controller.
5. The node traffic adjustment method according to claim 4, characterized in that: The determining the actual flow of the node controller according to the flow control value of the node controller includes: Get the total traffic of the cluster where the node controller is located; The product of the total flow of the cluster where the node controller is located and the flow control value is used as the actual flow of the node controller.
6. A node traffic adjustment method, characterized in that: Applicable to cluster master controller, including: Starting a patrol timer according to a reporting event sent by any node controller, and sending a patrol notification to the any node controller, wherein the reporting event is obtained by monitoring a monitored object by a monitoring timer of any node controller; Based on the reporting events sent by any node controller and the effective flow of the node controller, the flow control value of the node controller is determined, and the flow control value is fed back to the node controller, wherein the effective flow is the average flow of the monitored object monitored by the node controller within the reporting period corresponding to the sent reporting event.
7. The node traffic adjustment method according to claim 6, characterized in that: The method of determining a flow control value of a node controller according to a reporting event sent by any node controller and an effective flow of the node controller, and feeding back the flow control value to the node controller, comprises: Summarize the valid traffic sent by any node controller; Based on the effective traffic sent by all node controllers, the effective traffic of all node controllers is repeatedly halved at the same time until a result less than or equal to a preset value appears in the halving operation result; The flow ratio of each node controller is calculated according to the final halving operation result as the flow control value of the corresponding node controller.
8. A node flow adjustment device, characterized in that: Applicable to any node controller, including: A monitoring start module is used to start the monitoring timer to monitor the monitored object; An event reporting module, configured to send the reporting event to the cluster master controller in response to the monitoring timer detecting that the monitored object has a reporting event, so that the cluster master controller can issue an inspection notification according to the reporting event; An event start module, used to receive the inspection notification sent by the cluster master controller and start the event reporting timer; A data sending module, used for sending the event to be reported and the effective flow of the node controller to the cluster main controller through the event reporting timer, so that the cluster main controller can calculate the flow control value of the corresponding node controller, wherein the event to be reported includes: the reporting event occurring in the monitored object after receiving the inspection notification, and the flow control value is the allocation ratio of any node controller to the total flow of its cluster; The flow setting module is used to receive the flow control value of the node controller and adjust the actual flow of the node controller according to the flow control value.
9. A node flow adjustment device, characterized in that: Applicable to cluster master controller, including: A notification issuing module, used to start a patrol timer according to a reporting event sent by any node controller, and send a patrol notification to any node controller, wherein the reporting event is obtained by monitoring a monitored object by a monitoring timer of any node controller; A control feedback module is used to determine the flow control value of the node controller based on the reporting event sent by any node controller and the effective flow of the node controller, and to feed back the flow control value to the node controller, wherein the effective flow is the average flow of the monitored object monitored by the node controller within the reporting period corresponding to the reporting event sent.
10. A node traffic adjustment device, characterized in that: The invention comprises a memory, a processor and a node traffic adjustment program stored in the memory and executable on the processor. When the processor executes the node traffic adjustment program, the node traffic adjustment method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Dynamic adaptive flow limiting method and electronic equipment
CN107295572A
Cluster flow control method and system
CN110198274A
Flow control method, network device and communication system
CN113645666A
Flow control method and device, electronic equipment and storage medium
CN114124820A
Big data cluster data flow regulation and control method
CN114490111A
