CN116302576A - Method and system for parallelizing elastically-telescopic stream application operator - Google Patents

Method and system for parallelizing elastically-telescopic stream application operator Download PDF

Info

Publication number
CN116302576A
CN116302576A CN202310594752.4A CN202310594752A CN116302576A CN 116302576 A CN116302576 A CN 116302576A CN 202310594752 A CN202310594752 A CN 202310594752A CN 116302576 A CN116302576 A CN 116302576A
Authority
CN
China
Prior art keywords
operator
data
stream
information
tasks
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.)
Granted
Application number
CN202310594752.4A
Other languages
Chinese (zh)
Other versions
CN116302576B (en
Inventor
孙大为
吴明辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China University of Geosciences Beijing
Original Assignee
China University of Geosciences Beijing
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China University of Geosciences Beijing filed Critical China University of Geosciences Beijing
Priority to CN202310594752.4A priority Critical patent/CN116302576B/en
Publication of CN116302576A publication Critical patent/CN116302576A/en
Application granted granted Critical
Publication of CN116302576B publication Critical patent/CN116302576B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5055Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering software capabilities, i.e. software resources associated or available to the machine
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a parallelization method and a parallelization system for an elastically telescopic stream application operator, which are applied to the technical field of big data and comprise the following steps: s101: inputting stream application data into an M/M/K mathematical model, acquiring system information, and storing the system information in a database, wherein the system information comprises calculation nodes in an operator cluster, CPU information of tasks, I/O information of the tasks and memory resource consumption information of the tasks, data transmission rate between the tasks in a topological structure and running state information of a distributed stream calculation system; s102: optimizing the number of instances of each operation in the topology according to the system information; s103: selecting a target node to deploy or recycle an example of an operator according to the system information and the number of examples; s104: the task is notified and the state of the backup is repartitioned. The method and the device can solve the problems that the parallelism ratio between operators in the stream application program can not be adjusted and the response time of the system is minimized when the stream application program occupies fixed computing resources.

Description

Method and system for parallelizing elastically-telescopic stream application operator
Technical Field
The invention belongs to the technical field of big data, and particularly relates to an elastically telescopic stream application operator parallelization method and system.
Background
The ability to process continuous data streams in an extensible and timely manner becomes critical to the internet of things, traffic monitoring, telecommunications, healthcare, and the like. These streaming applications require rapid analysis of a large number of sequential data streams in order to produce predictable and operational results in a high performance computing environment. However, the performance of a streaming computing system is highly dependent on various aspects, including computing resources, operator parallelism, memory settings, and buffer size. Among other things, automatically adjusting the parallelism of operators to optimize system performance has become a critical challenge. Thus, proper operator parallelism has a very important role in the performance of the system.
Real-time applications running on streaming computing systems are modeled as a Directed Acyclic Graph (DAG) to describe the dependencies between tasks. Each DAG is submitted to a cluster deploying the streaming computing system, and each task in the DAG is scheduled to run on a computing node in the cluster. If there is no manual kill or failure, the streaming application deployed in the cluster will always run. Thus, the operator parallelism in the DAGs submitted to the clusters is static and cannot accommodate fluctuating data flow rates. This has two negative effects:
(1) When the arrival rate of a data stream breaks through the bottleneck of the system to process data tuples, a large amount of data will be deposited in the system unrestrictedly, resulting in excessive system response time and further system crashes.
(2) When the arrival rate of the data stream is continuously low, the computing resources occupied by the operators in the stream application cannot be dynamically recovered, so that the system generates additional idle resource consumption. Therefore, it is necessary to allocate resources used by different operators in the streaming application by adjusting parallelism of the operators to minimize overhead. Improper parallelism configuration of operators can lead to low resource utilization and instability of the overall system.
To ensure that the data stream responds at a speed of the order of milliseconds, a flexible operator scaling mechanism is always required in the stream computing system. It is desirable to dynamically adjust the ratio of parallelism between operators in a streaming application to meet the goal of low latency. However, most of the most advanced works do not provide an appropriate operator extension that can know how to coordinate the resource duty cycle between operators in a streaming application, dynamically allocate and release according to the current data stream. The representative working DRS realizes a dynamic resource scheduling module to meet the constraint of real-time performance, and the strategy gradually increases the parallelism of operators in a stream application program in a stable data stream environment so as to minimize the response time of the system. However, they ignore the fact that in a real streaming computing environment, the data stream is unstable and variable, which results in dynamic changes in the computational resources required by operators in the streaming application. The latest streaming applications working for limited buffers implement a method of optimizing operator parallelism that can optimize operator parallelism by modeling the relationship between the number of operator instances and the average residence time of the data tuples. However, it adjusts the parallelism of operators by a greedy algorithm, thus creating more overhead, while also ignoring the fact that stateful operators may become a key to the system bottleneck.
Changing the parallelism of streaming applications can improve system performance, however, it also presents new challenges for task state management, making the auto-expansion mechanism more complex. Changes in the stream application may result in data dependency inconsistencies between the backups and states of the operators before and after auto-expansion. Thus, the state backup of the operator should be repartitioned according to the extended operator, which may create additional overhead.
Disclosure of Invention
The embodiment of the invention aims to solve the problems, and provides an elastically telescopic flow application operator parallelization method and system, which can solve the problems that the parallelization degree between operators in a flow application program can not be adjusted and the response time of a system is minimized when the flow application program occupies fixed computing resources.
In order to solve the technical problems, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a method for parallelizing an elastically telescopic stream application operator, including:
s101: inputting stream application data into an M/M/K mathematical model, acquiring system information, and storing the system information in a database, wherein the system information comprises calculation nodes in operator clusters, CPU information of tasks, I/O information of tasks and memory resource consumption information of tasks, data transmission rate between tasks in a topological structure and running state information of a distributed stream calculation system;
s102: optimizing the number of instances of each operation in the topology according to the system information;
s103: selecting a target node to deploy or recycle an operator instance according to the system information and the instance number;
s104: the task is notified and the state of the backup is repartitioned.
Optionally, the step S102 specifically includes:
s1021: acquiring a first operator in the operator cluster
Figure SMS_1
S1022: acquiring the input queue rate of the first operator and the rate of processing the data tuples by an operator;
s1023: and adjusting the number of instances of the first operator according to the input queue rate and the processing data tuple rate.
Optionally, the input queue rate of the first operator adopts a formula:
Figure SMS_2
wherein,,
Figure SMS_3
is the instance rate of the first operator.
Optionally, the step S102 further includes: preempting the computing node to extend the computing resources used by the streaming application.
Optionally, the stream application data includes a stateless operator and a stateful operator, and the S103 further includes:
in the case that the operator is a stateless operator, when changing the number of instances of the stateless operator, the redirected data stream does not affect the instance processing data tuples of the stateless operator;
in the case where the operator is a stateful operator, backing up the state and caching the data tuples when changing the number of instances of the stateful operator, the redirected data stream may cause the data tuples to miss the state of the stateful operator.
In a second aspect, an embodiment of the present invention provides an elastically telescopic stream application operator parallelization system, including:
the system information comprises calculation nodes in an operator cluster, CPU information of tasks, I/O information of the tasks and memory resource consumption information of the tasks, data transmission rate among the tasks in a topological structure and running state information of a distributed stream calculation system;
the topology analysis module is used for optimizing the number of instances of each operation in the topology structure according to the system information;
the resource analysis module is used for selecting a target node to deploy or recycle the operator instance according to the system information and the instance number;
and the state notification management module is used for notifying tasks and repartitioning the backup state.
Optionally, the topology analysis module specifically includes:
a first obtaining module, configured to obtain a first operator in the operator cluster
Figure SMS_4
A second obtaining module, configured to obtain an input queue rate of the first operator and a rate at which an operator processes a data tuple;
and the adjusting module is used for adjusting the number of instances of the first operator according to the input queue rate and the processing data tuple rate.
Optionally, the input queue rate of the first operator adopts a formula:
Figure SMS_5
wherein,,
Figure SMS_6
is the instance rate of the first operator.
Optionally, the topology analysis module is further configured to: preempting the computing node to extend the computing resources used by the streaming application.
Optionally, the stream application data includes stateless operators and stateful operators, and the resource analysis module is further configured to:
in the case that the operator is a stateless operator, when changing the number of instances of the stateless operator, the redirected data stream does not affect the instance processing data tuples of the stateless operator;
in the case where the operator is a stateful operator, backing up the state and caching the data tuples when changing the number of instances of the stateful operator, the redirected data stream may cause the data tuples to miss the state of the stateful operator.
In the embodiment of the invention, firstly, a data tuple queuing model based on an M/M/k system is constructed to optimize the parallelism of operators and realize the trade-off between the system delay and the resource consumption. Resource scaling is performed by using a bias distribution model to evaluate the resources consumed by the streaming application. Secondly, upstream backup of operator states and caching of data tuples at dynamic time intervals are realized to reduce the cost of state recovery. In addition, the backup time interval is dynamically changed according to the resource load of the node, so that the system overhead is reduced.
Drawings
FIG. 1 is a schematic flow chart of a method for parallelizing elastically telescopic stream application operators according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an elastically scalable stream application operator parallelization system according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a logic diagram of an operator provided by an embodiment of the present invention;
FIG. 4 is a schematic diagram of Es-Stream state management provided by an embodiment of the present invention;
the achievement of the object, functional features and advantages of the present invention will be further described with reference to the embodiments, referring to the accompanying drawings.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments 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 some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged, as appropriate, such that embodiments of the present invention may be implemented in sequences other than those illustrated or described herein, and that the objects identified by "first," "second," etc. are generally of a type, and are not limited to the number of objects, such as the first object may be one or more. It should be understood that, in various embodiments of the present disclosure, the size of the sequence number of each process does not mean that the execution sequence of each process should be determined by its functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.
It should be understood that in this disclosure, "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements that are expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in this disclosure, "plurality" means two or more. "and/or" is merely an association relationship describing an association object, and means that three relationships may exist, for example, and/or B may mean: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. "comprising A, B and C", "comprising A, B, C" means that all three of A, B, C comprise, "comprising A, B or C" means that one of the three comprises A, B, C, and "comprising A, B and/or C" means that any 1 or any 2 or 3 of the three comprises A, B, C.
It should be understood that in this disclosure, "B corresponding to a", "a corresponding to B", or "B corresponding to a" means that B is associated with a from which B may be determined. Determining B from a does not mean determining B from a alone, but may also determine B from a and/or other information. The matching of A and B is that the similarity of A and B is larger than or equal to a preset threshold value.
As used herein, "if" may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to detection" depending on the context.
Poor resource allocation between operators can affect system performance or waste computing resources. Attention is first paid to an operator. With two operators
Figure SMS_7
And->
Figure SMS_11
The number of examples is +.>
Figure SMS_13
And->
Figure SMS_8
. Hypothesis operator->
Figure SMS_10
And->
Figure SMS_12
The example rate of processing data clusters is +.>
Figure SMS_14
And->
Figure SMS_9
Then, operator
Figure SMS_15
The rate of the input queue of (c) may be calculated by the following formula.
Figure SMS_16
Operator
Figure SMS_17
The rate at which the data tuples are processed can be calculated by the following formula.
Figure SMS_18
Obviously, operators
Figure SMS_20
There must be enough instances to process the data to keep up with the input rate. If->
Figure SMS_23
Then operator->
Figure SMS_25
Will not keep pace with the input speed. Operator->
Figure SMS_21
Will be continuously longer, resulting in an increase in the dwell time of the data tuples in the operator, further resulting in an instance of the operator being continuously started down. Furthermore, if->
Figure SMS_24
Operator->
Figure SMS_26
May create additional idle time to wait for an instance of (a) to uploadThe input data of the operator results in a waste of computational resources. Thus, the operator can be adjusted +.>
Figure SMS_27
To balance ∈>
Figure SMS_19
And->
Figure SMS_22
The dwell time of the data tuples in the operator is minimized.
In a streaming application, an instance processes data tuples
Figure SMS_30
Intermediate results (named states) may be generated and are typically stored in memory at runtime. To improve the reliability of the system, intermediate results in memory are typically backed up to remote storage through a checkpointing mechanism. Example->
Figure SMS_32
At time->
Figure SMS_36
Direction operator->
Figure SMS_31
Downstream instance of (2)
Figure SMS_33
And->
Figure SMS_37
Four data tuples are transmitted +.>
Figure SMS_39
And->
Figure SMS_28
. Example->
Figure SMS_35
Receive data tuple->
Figure SMS_38
And
Figure SMS_40
and performing logic computation to generate states (k 1, v 1) and (k 2, v 2), where v1 is the instance +.>
Figure SMS_29
Treatment->
Figure SMS_34
Intermediate results of the calculation. The process of grouping data tuples can be described by the following formula:
Figure SMS_41
wherein the method comprises the steps of
Figure SMS_42
Representation operator->
Figure SMS_43
Is (are) example number->
Figure SMS_44
Representing processing data tuples->
Figure SMS_45
Examples of (2)
Figure SMS_46
. Furthermore, examples->
Figure SMS_47
Periodically, the status of (c) is backed up to the remote storage system.
At time, adding an instance of an operation results in the instance redirecting the data stream, which can be described by the following formula:
Figure SMS_48
wherein the method comprises the steps of
Figure SMS_49
Representing the number of instance changes.
Thus, if
Figure SMS_50
Then->
Figure SMS_53
. As shown, example->
Figure SMS_56
Receive data tuple->
Figure SMS_51
But data tuple->
Figure SMS_55
The state of (2) is at the time->
Figure SMS_57
Stored at instance->
Figure SMS_59
. Similarly, instance->
Figure SMS_52
Receive data tuple->
Figure SMS_54
But data tuple->
Figure SMS_58
The state of (2) is stored in instance->
Figure SMS_60
Is a kind of medium. Thus, after the data stream is redirected, the data tuples processed by the instance are inconsistent with the stored state.
In an unbounded data stream environment, tasks in the stream application inevitably fail, which makes it difficult to guarantee the reliability of data processing and resource expansion. Checkpointing mechanisms are commonly used to cope with faulty tasks. However, it also incurs some additional overhead:
(1) The calculation is repeated. If one task fails, the system will lose part of the state data and roll back to recalculate the lost state. The latest state of the system is
Figure SMS_61
. When a task in the streaming application fails, the whole system needs to roll back to the state +.>
Figure SMS_62
. In this process +.>
Figure SMS_63
The state of (2) will be lost and the data tuple will be never +.>
Figure SMS_64
And (5) re-inputting.
(2) Global rollback. Once one task in the streaming application fails, the entire topology needs to roll back to the previous state.
In summary, after a series of experiments have been constructed, it can be demonstrated that system delays can be affected by varying parallelism and fluctuating data flows of the streaming application. Additional resource consumption may result from over-configured operator parallelism. And, a stream application model, a communication mode, a Makespan model and a resource constraint model are constructed to quantify indexes of the system, and meanwhile, the problems of double overhead including expandability of operator parallelism, state consistency, state recovery and the like are formalized.
The following describes in detail a flowchart of an elastically scalable stream application operator parallelization method provided by the embodiment of the present invention through a specific embodiment and an application scenario thereof with reference to fig. 1. The embodiment of the invention provides an elastically telescopic stream application operator parallelization method, which comprises the following steps:
s101: inputting stream application data into an M/M/K mathematical model, acquiring system information, and storing the system information in a database, wherein the system information comprises calculation nodes in operator clusters, CPU information of tasks, I/O information of tasks and memory resource consumption information of tasks, data transmission rate between tasks in a topological structure and running state information of a distributed stream calculation system.
S102: and optimizing the number of instances of each operation in the topology structure according to the system information.
Specifically, the emphasis of S102 is on optimizing the number of instances per operator in the topology. For an operator, its instance number is the most important parameter in initializing the topology. A reasonable operator instance number can effectively improve the throughput of the system and reduce the response time of the system. Otherwise, the burden of processing data by the system may be increased, further affecting the system performance. Thus, the topology analysis module extracts data about the topology information stored in the database and analyzes and models the data to obtain the optimal number of instances for each operator in the topology.
Optionally, S102 specifically includes:
s1021: acquiring a first operator in the operator cluster
Figure SMS_65
Alternatively, the streaming application may be viewed as a directed acyclic graph. Thus, the data tuples processed by the streaming application are directional, i.e. the upstream instance transmits the processed data tuples into the downstream instance. When expanding or shrinking operators
Figure SMS_66
Operator +.>
Figure SMS_67
The processing of the data tuples by the upstream operator is not affected. However, it may cause downstream operator instances to pile up data tuples or generate idle resources. Thus, the number of instances of the scaling operator should be hierarchical, prioritizing the increase/decrease of the number of instances of the upstream operator. Based on the above analysis we use a topological ordering algorithm to determine the order of the scaling operators. As shown in the figure3, the logical graph of operators is described as a directed acyclic graph. The order of the scaling operators in the streaming application should be +.>
Figure SMS_68
And->
Figure SMS_69
The DAG is reconstructed based on the M/K mathematical model to ensure timely processing of the data tuples. If the number of instances of the runtime operator is static, a large number of data tuples may pile up on the system in the face of high data flow rates, or there may be additional idle resources in the system in the face of low data flow rates. Such algorithms may reconfigure the DAG at run-time to accommodate unstable data flows.
Optionally, the input data for the algorithm includes G,
Figure SMS_70
,/>
Figure SMS_71
output is +.>
Figure SMS_72
If G is empty, the algorithm stops cycling;
if each is
Figure SMS_73
In G, the following operations are performed: />
Figure SMS_74
If each is
Figure SMS_75
In the telescopic queue, the following operations are performed: if->
Figure SMS_76
In the case of empty, will
Figure SMS_77
Assigned to the expansion queue and emptied +.>
Figure SMS_78
If it is
Figure SMS_79
The method comprises the steps of carrying out a first treatment on the surface of the Assigning the value of k to +.>
Figure SMS_80
S1022: an input queue rate for the first operator and an operator processing data tuple rate are obtained.
S1023: and adjusting the number of instances of the first operator according to the input queue rate and the processing data tuple rate.
Alternatively, when the streaming media application uses insufficient fixed resources, the performance bottleneck of the system cannot be solved by simply increasing the number of instances. Thus, the computing resources used by the streaming application can be extended by preempting more computing nodes to improve the bottleneck problem of the system. If the data flow continues to be in a low rate state, the resources used by the flow application will be curtailed to free up more compute nodes.
S103: and selecting a target node to deploy or recycle the operator examples according to the system information and the number of examples.
Optionally, the stream application data includes a stateless operator and a stateful operator, and the S103 further includes:
in the case that the operator is a stateless operator, when changing the number of instances of the stateless operator, the redirected data stream does not affect the instance processing data tuples of the stateless operator;
in the case where the operator is a stateful operator, backing up the state and caching the data tuples when changing the number of instances of the stateful operator, the redirected data stream may cause the data tuples to miss the state of the stateful operator.
Alternatively, a streaming application submitted by a user mainly includes stateless operators and stateful operators. For stateless operators, only each independent event is concerned, the input data is directly converted into an output result, and the calculation is carried out independently of other data. The data tuples are processed independently by the operator instance. Thus, when changing the number of instances of stateless operators, the redirected data stream cannot affect the stateless instance processing data tuples. For stateful operators, the computation of the output result requires some additional data, including mainly the early input data tuples and some results of early data tuple computation, in addition to the input data tuples. The state of the data tuples is stored in the corresponding instance. Thus, when changing the instance number of a stateful operator, the redirected data stream may cause the data tuple issued by the upstream instance to be processed by the wrong downstream instance, causing the tuple to miss its state.
In order to realize a low-overhead state repair mechanism, to expand the parallelism of stateful operators, a mechanism for backing up state and caching data tuples is designed in an upstream operator. It includes two main aspects:
(1) The instance state of the stateful operator is backed up to the upstream instance, which is more efficient because it reuses the existing communication connections. All operators in a stream application form a logical loop. Each instance in the stateful operator manages its own state. Furthermore, if the node's resource load is less than the instance will synchronize its state with the upstream periodically. Otherwise, the synchronization interval will be set to indefinite.
(2) For a stateful operator, the output of an upstream instance processing a data tuple is backed up locally for a time interval. If the parallelism of the stateful operator is changed, the upstream instance thereof will re-partition the backup state and send the partitioned state to the corresponding downstream instance. Secondly, backup output results of the upstream instance in the current time interval are transmitted to the downstream instance again, so that global rollback state of the whole topological structure is avoided, and system overhead is reduced. As shown in FIG. 4, es-Stream state management is schematically illustrated. Operator
Figure SMS_81
The state of the instance of (2) is backed up to operator +.>
Figure SMS_82
Upstream instance of (a). Furthermore, by instance->
Figure SMS_83
Downstream instance->
Figure SMS_84
And->
Figure SMS_85
The outgoing data tuples are buffered locally at the same time during a time interval.
S104: the task is notified and the state of the backup is repartitioned.
In the embodiment of the application, the following four advantages are achieved:
(1) A series of experiments were constructed to demonstrate that system delay can be affected by varying degrees of parallelism and fluctuating data flows of the streaming application. Additional resource consumption may result from over-configured operator parallelism.
(2) The method comprises the steps of constructing a stream application model, a communication mode, a Makespan model and a resource constraint model to quantify indexes of a system, and formalizing the problems of expandability, state consistency, double overheads of state recovery and the like including operator parallelism.
(3) A data tuple queuing model based on an M/M/k system is constructed to optimize the parallelism of operators and realize the trade-off between system delay and resource consumption. Resource scaling is performed by using a bias distribution model to evaluate the resources consumed by the streaming application.
(4) Upstream backups of operator states and buffering of data tuples for dynamic time intervals are implemented to reduce the cost of state recovery. In addition, the backup time interval is dynamically changed according to the resource load of the node, so that the system overhead is reduced.
(5) The experimental evaluation is performed on a real stream application program, and a system adopting the elastic telescopic stream application operator parallelization method evaluates through the indexes, such as system response time and state recovery cost.
Example two
Referring to fig. 2, a schematic structural diagram of a stream application operator parallelization system 30 with elastic scalability according to an embodiment of the present invention is shown.
The elastically telescopic stream application operator parallelization system 30 provided by the embodiment of the invention comprises:
the monitoring module 301 is configured to obtain system information after inputting stream application data into the M/K mathematical model, and store the system information in a database, where the system information includes computing nodes in an operator cluster, CPU information of a task, I/O information of the task, memory resource consumption information of the task, a data transmission rate between tasks in a topology structure, and running state information of a distributed stream computing system.
Optionally, the information collected by the monitoring module is stored in a database.
The topology analysis module 302 is configured to optimize the number of instances of each operation in the topology according to the system information.
Optionally, the focus of the topology analysis module is to optimize the number of instances of each operator in the topology. For an operator, its instance number is the most important parameter in initializing the topology. A reasonable operator instance number can effectively improve the throughput of the system and reduce the response time of the system. Otherwise, the burden of processing data by the system may be increased, further affecting the system performance. Thus, the topology analysis module extracts data about the topology information stored in the database and analyzes and models the data to obtain the optimal number of instances for each operator in the topology.
And the resource analysis module 303 is configured to select an instance of the deployment or reclamation operator for the target node according to the system information and the number of instances.
Optionally, the resource analysis module is responsible for analyzing the resource load of the cluster, and selecting an appropriate node to deploy or reclaim the operator instance according to the result of the topology analysis.
Optionally, the state notification module is responsible for notifying tasks and repartitioning the state of the backup. From the topology analysis module, it can be known that the number of instances of the stateful operator has changed. If the number of operator instances is elastically extended at runtime, the state of the task should be repartitioned to ensure that the buffered data tuples are mapped into the correct partitions.
The state notification management module 304 is configured to notify tasks and repartition the backup state.
This system may be referred to as the system architecture of Es-Stream. Compared to conventional solutions, es-Stream has the following advantages:
(1) Conventional solutions configure the number of operator instances in the topology according to the steady rate of data flow, the configuration topology running in the cluster is static. However, es-Stream can sense the change of the data Stream rate and dynamically adjust the resource allocation weight of operators in the topology. In addition, es-Stream can effectively reduce the resources used by the topology in the cluster in the face of low data Stream rates.
(2) Conventional solutions adjust the number of instances for stateless operators, which makes the bottleneck of the system difficult to improve. However, es-Stream can extend the number of instances of stateless and stateful operators to improve the throughput of the system. In addition, es-Stream backs up the state of a task to an upstream instance and caches data tuples during dynamic time intervals to provide a flexible and low-overhead state recovery mechanism.
Optionally, the topology analysis module specifically includes:
a first obtaining module, configured to obtain a first operator in the operator cluster
Figure SMS_86
A second obtaining module, configured to obtain an input queue rate of the first operator and a rate at which an operator processes a data tuple;
and the adjusting module is used for adjusting the number of instances of the first operator according to the input queue rate and the processing data tuple rate.
Optionally, the input queue rate of the first operator adopts a formula:
Figure SMS_87
wherein,,
Figure SMS_88
is the instance rate of the first operator.
Optionally, the topology analysis module is further configured to: preempting the computing node to extend the computing resources used by the streaming application.
Optionally, the stream application data includes stateless operators and stateful operators, and the resource analysis module is further configured to:
in the case that the operator is a stateless operator, when changing the number of instances of the stateless operator, the redirected data stream does not affect the instance processing data tuples of the stateless operator;
in the case where the operator is a stateful operator, backing up the state and caching the data tuples when changing the number of instances of the stateful operator, the redirected data stream may cause the data tuples to miss the state of the stateful operator.
In the embodiment of the application, the following four advantages are achieved:
(1) A series of experiments were constructed to demonstrate that system delay can be affected by varying degrees of parallelism and fluctuating data flows of the streaming application. Additional resource consumption may result from over-configured operator parallelism.
(2) The method comprises the steps of constructing a stream application model, a communication mode, a Makespan model and a resource constraint model to quantify indexes of a system, and formalizing the problems of expandability, state consistency, double overheads of state recovery and the like including operator parallelism.
(3) A data tuple queuing model based on an M/M/k system is constructed to optimize the parallelism of operators and realize the trade-off between system delay and resource consumption. Resource scaling is performed by using a bias distribution model to evaluate the resources consumed by the streaming application.
(4) Upstream backups of operator states and buffering of data tuples for dynamic time intervals are implemented to reduce the cost of state recovery. In addition, the backup time interval is dynamically changed according to the resource load of the node, so that the system overhead is reduced.
(5) Experimental evaluation is performed on real streaming applications, and systems employing Es-Stream evaluate through these metrics, such as system response time and state recovery costs.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Note that all features disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise. Thus, unless expressly stated otherwise, each feature disclosed is one example only of a generic set of equivalent or similar features. Where used, further, preferably, still further and preferably, the brief description of the other embodiment is provided on the basis of the foregoing embodiment, and further, preferably, further or more preferably, the combination of the contents of the rear band with the foregoing embodiment is provided as a complete construct of the other embodiment. A further embodiment is composed of several further, preferably, still further or preferably arrangements of the strips after the same embodiment, which may be combined arbitrarily.
It will be appreciated by persons skilled in the art that the embodiments of the invention described above and shown in the drawings are by way of example only and are not limiting. The objects of the present invention have been fully and effectively achieved. The functional and structural principles of the present invention have been shown and described in the examples and embodiments of the invention may be modified or practiced without departing from the principles described.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present disclosure, and not for limiting the same; although the present disclosure has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present disclosure.

Claims (10)

1. A method for parallelizing elastically telescoping stream application operators, comprising:
s101: inputting stream application data into an M/M/K mathematical model, acquiring system information, and storing the system information in a database, wherein the system information comprises calculation nodes in operator clusters, CPU information of tasks, I/O information of tasks and memory resource consumption information of tasks, data transmission rate between tasks in a topological structure and running state information of a distributed stream calculation system;
s102: optimizing the number of instances of each operation in the topology according to the system information;
s103: selecting a target node to deploy or recycle an operator instance according to the system information and the instance number;
s104: the task is notified and the state of the backup is repartitioned.
2. The method for parallelizing the elastically telescoping stream application operators in accordance with claim 1, wherein said S102 specifically comprises:
s1021: acquiring a first operator in the operator cluster
Figure QLYQS_1
S1022: acquiring the input queue rate of the first operator and the rate of processing the data tuples by an operator;
s1023: and adjusting the number of instances of the first operator according to the input queue rate and the processing data tuple rate.
3. The method for parallelizing elastically telescoping stream application operators in accordance with claim 2, wherein the input queue rate of the first operator employs the formula:
Figure QLYQS_2
wherein,,
Figure QLYQS_3
is the instance rate of the first operator.
4. The flexible stream application operator parallelization method of claim 1, wherein S102 further comprises: preempting computing nodes to extend computing resources used by the streaming application.
5. The flexible stream application operator parallelization method of claim 1, wherein the stream application data comprises stateless operators and stateful operators, and wherein S103 further comprises: in the case that the operator is a stateless operator, when changing the number of instances of the stateless operator, the redirected data stream does not affect the instance processing data tuples of the stateless operator; in the case where the operator is a stateful operator, backing up the state and caching the data tuples when changing the number of instances of the stateful operator, the redirected data stream may cause the data tuples to miss the state of the stateful operator.
6. An elastically telescoping stream application operator parallelization system, comprising: the system information comprises calculation nodes in an operator cluster, CPU information of tasks, I/O information of the tasks and memory resource consumption information of the tasks, data transmission rate among the tasks in a topological structure and running state information of a distributed stream calculation system; the topology analysis module is used for optimizing the number of instances of each operation in the topology structure according to the system information; the resource analysis module is used for selecting a target node to deploy or recycle the operator instance according to the system information and the instance number; and the state notification management module is used for notifying tasks and repartitioning the backup state.
7. The flexible stream application operator parallelization system of claim 6, wherein the topology analysis module specifically comprises:
a first obtaining module, configured to obtain a first operator in the operator cluster
Figure QLYQS_4
A second obtaining module, configured to obtain an input queue rate of the first operator and a rate at which an operator processes a data tuple;
and the adjusting module is used for adjusting the number of instances of the first operator according to the input queue rate and the processing data tuple rate.
8. The flexible stream application operator parallelization system of claim 7, wherein the input queue rate of the first operator uses the formula:
Figure QLYQS_5
wherein,,
Figure QLYQS_6
is the instance rate of the first operator.
9. The flexible stream application operator parallelization system of claim 8, wherein the topology analysis module is further to: preempting the computing node to extend the computing resources used by the streaming application.
10. The flexible stream application operator parallelization system of claim 9, wherein the stream application data comprises stateless operators and stateful operators, the resource analysis module further to: in the case that the operator is a stateless operator, when changing the number of instances of the stateless operator, the redirected data stream does not affect the instance processing data tuples of the stateless operator; in the case where the operator is a stateful operator, backing up the state and caching the data tuples when changing the number of instances of the stateful operator, the redirected data stream may cause the data tuples to miss the state of the stateful operator.
CN202310594752.4A 2023-05-25 2023-05-25 Method and system for parallelizing elastically-telescopic stream application operator Active CN116302576B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310594752.4A CN116302576B (en) 2023-05-25 2023-05-25 Method and system for parallelizing elastically-telescopic stream application operator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310594752.4A CN116302576B (en) 2023-05-25 2023-05-25 Method and system for parallelizing elastically-telescopic stream application operator

Publications (2)

Publication Number Publication Date
CN116302576A true CN116302576A (en) 2023-06-23
CN116302576B CN116302576B (en) 2023-08-01

Family

ID=86818980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310594752.4A Active CN116302576B (en) 2023-05-25 2023-05-25 Method and system for parallelizing elastically-telescopic stream application operator

Country Status (1)

Country Link
CN (1) CN116302576B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117032938A (en) * 2023-10-08 2023-11-10 北京燧原智能科技有限公司 Operator parallel scheduling method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104794015A (en) * 2015-04-16 2015-07-22 华中科技大学 Real-time streaming computing flow speed perceiving elastic execution tolerant system
US20160269247A1 (en) * 2015-03-13 2016-09-15 Nec Laboratories America, Inc. Accelerating stream processing by dynamic network aware topology re-optimization
US10129114B1 (en) * 2015-03-30 2018-11-13 Amazon Technologies, Inc. Protocol exposure as network health detection
CN115378789A (en) * 2022-10-24 2022-11-22 中国地质大学(北京) Multi-level cooperative stream resource management method and system
CN115567453A (en) * 2022-11-17 2023-01-03 中国地质大学(北京) Elastic grouping method and system for data stream content feature perception

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160269247A1 (en) * 2015-03-13 2016-09-15 Nec Laboratories America, Inc. Accelerating stream processing by dynamic network aware topology re-optimization
US10129114B1 (en) * 2015-03-30 2018-11-13 Amazon Technologies, Inc. Protocol exposure as network health detection
CN104794015A (en) * 2015-04-16 2015-07-22 华中科技大学 Real-time streaming computing flow speed perceiving elastic execution tolerant system
CN115378789A (en) * 2022-10-24 2022-11-22 中国地质大学(北京) Multi-level cooperative stream resource management method and system
CN115567453A (en) * 2022-11-17 2023-01-03 中国地质大学(北京) Elastic grouping method and system for data stream content feature perception

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117032938A (en) * 2023-10-08 2023-11-10 北京燧原智能科技有限公司 Operator parallel scheduling method and device, electronic equipment and storage medium
CN117032938B (en) * 2023-10-08 2024-01-09 北京燧原智能科技有限公司 Operator parallel scheduling method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN116302576B (en) 2023-08-01

Similar Documents

Publication Publication Date Title
Sun et al. Re-Stream: Real-time and energy-efficient resource scheduling in big data stream computing environments
Acun et al. Parallel programming with migratable objects: Charm++ in practice
Qiao et al. Litz: Elastic framework for {High-Performance} distributed machine learning
Zhang et al. Accelerate large-scale iterative computation through asynchronous accumulative updates
CN116302576B (en) Method and system for parallelizing elastically-telescopic stream application operator
Xue et al. Processing concurrent graph analytics with decoupled computation model
Lai et al. Sol: Fast distributed computation over slow networks
US6993764B2 (en) Buffered coscheduling for parallel programming and enhanced fault tolerance
Wang et al. An efficient and non-intrusive GPU scheduling framework for deep learning training systems
Mashayekhi et al. Execution templates: Caching control plane decisions for strong scaling of data analytics
Li et al. Enabling elastic stream processing in shared clusters
Su et al. Passive and partially active fault tolerance for massively parallel stream processing engines
Carretero et al. Mapping and scheduling HPC applications for optimizing I/O
Li et al. Adaptive priority-based data placement and multi-task scheduling in geo-distributed cloud systems
Zhuang et al. An optimal checkpointing model with online OCI adjustment for stream processing applications
Mon et al. Clustering based on task dependency for data-intensive workflow scheduling optimization
Danelutto et al. A power-aware, self-adaptive macro data flow framework
Madsen et al. Integrating fault-tolerance and elasticity in a distributed data stream processing system
Thamsen et al. Ellis: Dynamically scaling distributed dataflows to meet runtime targets
Bao et al. BC-BSP: A BSP-based parallel iterative processing system for big data on cloud architecture
Senger Improving scalability of Bag-of-Tasks applications running on master–slave platforms
Agrawal et al. An empirical evaluation of work stealing with parallelism feedback
Nicodemus et al. Managing vertical memory elasticity in containers
Wei et al. Reliable stream data processing for elastic distributed stream processing systems
CN112114951A (en) Bottom-up distributed scheduling system and method

Legal Events

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