Window management based on an indication of congestion in a stream computing environment

Disclosed aspects relate to window management in a stream computing environment. An indication of congestion may be detected with respect to the stream computing environment. Based on the indication of congestion, a set of window configurations in the stream computing environment may be determined. In response to determining the set of window configurations in the stream computing environment, the set of window configurations may be established in the stream computing environment.

BACKGROUND

This disclosure relates generally to computer systems and, more particularly, relates to window management in a stream computing environment. The amount of stream computing data that needs to be managed by enterprises is increasing. Management of stream computing environments may be desired to be performed as efficiently as possible. As stream computing data needing to be managed increases, the need for efficient window management in a stream computing environment may increase.

SUMMARY

Aspects of the disclosure relate to window management in a stream computing environment. The window sizes of stream operators in a stream computing environment may be dynamically increased or decreased based upon the relative data congestion of a particular stream operator. A streams manager may monitor for congestion within a stream computing operator graph, and determine if a congested segment of the operator graph includes windowed operators that are configured for window adjustment. Based on the nature of the congestion, the window size of one or more operators may be adjusted to reduce congestion. When a plurality of windowed operators are within the congested segment of the operator graph, the window size of each operator may be adjusted independently or in conjunction with other operators. Adjustments to stream operator window sizes may continue until data throughput achieves a threshold throughput level.

Disclosed aspects relate to window management in a stream computing environment. An indication of congestion may be detected with respect to the stream computing environment. Based on the indication of congestion, a set of window configurations in the stream computing environment may be determined. In response to determining the set of window configurations in the stream computing environment, the set of window configurations may be established in the stream computing environment.

DETAILED DESCRIPTION

Aspects of the disclosure relate to window management in a stream computing environment. The window sizes of stream operators in a stream computing environment may be dynamically increased or decreased based upon the relative data congestion of a particular stream operator. A streams manager may monitor for congestion within a stream computing operator graph, and determine if a congested segment of the operator graph includes windowed operators (e.g., join operators) that are configured for window adjustment. Based on the nature of the congestion, the window size of one or more operators may be adjusted to reduce congestion. When a plurality of windowed operators are within the congested segment of the operator graph, the window size of each operator may be adjusted independently or in conjunction with other operators. Adjustments to stream operator window sizes may continue until data throughput achieves a threshold throughput level. Leveraging dynamic window size adjustment may be associated with benefits such as tuple throughput rate, data processing efficiency, or stream application performance.

Stream-based computing and stream-based database computing are emerging as a developing technology for database systems. Products are available which allow users to create applications that process and query streaming data before it reaches a database file. With this emerging technology, users can specify processing logic to apply to inbound data records while they are “in flight,” with the results available in a very short amount of time, often in fractions of a second. Constructing an application using this type of processing has opened up a new programming paradigm that will allow for development of a broad variety of innovative applications, systems, and processes, as well as present new challenges for application programmers and database developers.

In a stream computing application, stream operators are connected to one another such that data flows from one stream operator to the next (e.g., over a TCP/IP socket). When a stream operator receives data, it may perform operations, such as analysis logic, which may change the tuple by adding or subtracting attributes, or updating the values of existing attributes within the tuple. When the analysis logic is complete, a new tuple is then sent to the next stream operator. Scalability is achieved by distributing an application across nodes by creating executables (i.e., processing elements), as well as replicating processing elements on multiple nodes and load balancing among them. Stream operators in a stream computing application can be fused together to form a processing element that is executable. Doing so allows processing elements to share a common process space, resulting in much faster communication between stream operators than is available using inter-process communication techniques (e.g., using a TCP/IP socket). Further, processing elements can be inserted or removed dynamically from an operator graph representing the flow of data through the stream computing application. A particular stream operator may not reside within the same operating system process as other stream operators. In addition, stream operators in the same operator graph may be hosted on different nodes, e.g., on different compute nodes or on different cores of a compute node.

Data flows from one stream operator to another in the form of a “tuple.” A tuple is a sequence of one or more attributes associated with an entity. Attributes may be any of a variety of different types, e.g., integer, float, Boolean, string, etc. The attributes may be ordered. In addition to attributes associated with an entity, a tuple may include metadata, i.e., data about the tuple. A tuple may be extended by adding one or more additional attributes or metadata to it. As used herein, “stream” or “data stream” refers to a sequence of tuples. Generally, a stream may be considered a pseudo-infinite sequence of tuples.

Tuples are received and output by stream operators and processing elements. An input tuple corresponding with a particular entity that is received by a stream operator or processing element, however, is generally not considered to be the same tuple that is output by the stream operator or processing element, even if the output tuple corresponds with the same entity or data as the input tuple. An output tuple need not be changed in some way from the input tuple.

Nonetheless, an output tuple may be changed in some way by a stream operator or processing element. An attribute or metadata may be added, deleted, or modified. For example, a tuple will often have two or more attributes. A stream operator or processing element may receive the tuple having multiple attributes and output a tuple corresponding with the input tuple. The stream operator or processing element may only change one of the attributes so that all of the attributes of the output tuple except one are the same as the attributes of the input tuple.

Generally, a particular tuple output by a stream operator or processing element may not be considered to be the same tuple as a corresponding input tuple even if the input tuple is not changed by the processing element. However, to simplify the present description and the claims, an output tuple that has the same data attributes or is associated with the same entity as a corresponding input tuple will be referred to herein as the same tuple unless the context or an express statement indicates otherwise.

Stream computing applications handle massive volumes of data that need to be processed efficiently and in real time. For example, a stream computing application may continuously ingest and analyze hundreds of thousands of messages per second and up to petabytes of data per day. Accordingly, each stream operator in a stream computing application may be required to process a received tuple within fractions of a second. Unless the stream operators are located in the same processing element, it is necessary to use an inter-process communication path each time a tuple is sent from one stream operator to another. Inter-process communication paths can be a critical resource in a stream computing application. According to various embodiments, the available bandwidth on one or more inter-process communication paths may be conserved. Efficient use of inter-process communication bandwidth can speed up processing.

A streams processing job has a directed graph of processing elements that send data tuples between the processing elements. The processing element operates on the incoming tuples, and produces output tuples. A processing element has an independent processing unit and runs on a host. The streams platform can be made up of a collection of hosts that are eligible for processing elements to be placed upon. When a job is submitted to the streams run-time, the platform scheduler processes the placement constraints on the processing elements, and then determines (the best) one of these candidates host for (all) the processing elements in that job, and schedules them for execution on the decided host.

Aspects of the disclosure include a method, system and computer program product for window management in a stream computing environment. An indication of congestion with respect to the stream computing environment may be detected. The indication of congestion may include a build-up of tuples. The indication of congestion may include a segment of congestion of an operator graph with respect to the stream computing environment. The indication of congestion may correspond with a throughput factor, and a benchmark threshold value may exceed a throughput value for the throughput factor. Based on the indication of congestion, a set of window configurations in the stream computing environment may be determined. In embodiments, a set of window configuration parameter values may be received, and the set of window configurations may be determined using the set of window configuration parameter values. In response to determining the set of window configurations in the stream computing environment, the set of window configurations may be established in the stream computing environment. In embodiments, establishing the set of window configurations in the stream computing environment may alter a throughput factor.

In embodiments, a streams management engine may monitor for the indication of congestion. The streams management engine may modify the set of window configurations until a throughput value for a throughput factor in the stream computing environment achieves a target threshold value for the throughput factor in the stream computing environment. In embodiments, a first window configuration of a window in the stream computing environment may be modified to a second window configuration. In embodiments, the set of window configurations may include a set of window sizes of a set of windows. Modifying the first window configuration to the second window configuration may include adjusting, in a dynamic fashion, a window size of the window. A reduction of the indication of congestion may be detected. In embodiments, the indication of congestion may indicate a segment of congestion having a window which is within the segment of congestion, and a window size of the window within the segment of congestion may be decreased. In embodiments, the stream computing environment may include a window which is external to the segment of congestion, and the window size of the window which is external to the segment of congestion may be increased. Altogether, aspects of the disclosure can have performance or efficiency benefits (e.g., wear-rate, service-length, reliability, speed, flexibility, load balancing, responsiveness, stability, high availability, resource usage, productivity). Aspects may save resources such as bandwidth, disk, processing, or memory.

FIG. 1illustrates one exemplary computing infrastructure100that may be configured to execute a stream computing application, according to some embodiments. The computing infrastructure100includes a management system105and two or more compute nodes110A—110D—i.e., hosts—which are communicatively coupled to each other using one or more communications networks120. The communications network120may include one or more servers, networks, or databases, and may use a particular communication protocol to transfer data between the compute nodes110A-110D. A compiler system102may be communicatively coupled with the management system105and the compute nodes110either directly or via the communications network120.

The communications network120may include a variety of types of physical communication channels or “links.” The links may be wired, wireless, optical, or any other suitable media. In addition, the communications network120may include a variety of network hardware and software for performing routing, switching, and other functions, such as routers, switches, or bridges. The communications network120may be dedicated for use by a stream computing application or shared with other applications and users. The communications network120may be any size. For example, the communications network120may include a single local area network or a wide area network spanning a large geographical area, such as the Internet. The links may provide different levels of bandwidth or capacity to transfer data at a particular rate. The bandwidth that a particular link provides may vary depending on a variety of factors, including the type of communication media and whether particular network hardware or software is functioning correctly or at full capacity. In addition, the bandwidth that a particular link provides to a stream computing application may vary if the link is shared with other applications and users. The available bandwidth may vary depending on the load placed on the link by the other applications and users. The bandwidth that a particular link provides may also vary depending on a temporal factor, such as time of day, day of week, day of month, or season.

FIG. 2is a more detailed view of a compute node110, which may be the same as one of the compute nodes110A-110D ofFIG. 1, according to various embodiments. The compute node110may include, without limitation, one or more processors (CPUs)205, a network interface215, an interconnect220, a memory225, and a storage230. The compute node110may also include an I/O device interface210used to connect I/O devices212, e.g., keyboard, display, and mouse devices, to the compute node110.

Each CPU205retrieves and executes programming instructions stored in the memory225or storage230. Similarly, the CPU205stores and retrieves application data residing in the memory225. The interconnect220is used to transmit programming instructions and application data between each CPU205, I/O device interface210, storage230, network interface215, and memory225. The interconnect220may be one or more busses. The CPUs205may be a single CPU, multiple CPUs, or a single CPU having multiple processing cores in various embodiments. In one embodiment, a processor205may be a digital signal processor (DSP). One or more processing elements235(described below) may be stored in the memory225. A processing element235may include one or more stream operators240(described below). In one embodiment, a processing element235is assigned to be executed by only one CPU205, although in other embodiments the stream operators240of a processing element235may include one or more threads that are executed on two or more CPUs205. The memory225is generally included to be representative of a random access memory, e.g., Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), or Flash. The storage230is generally included to be representative of a non-volatile memory, such as a hard disk drive, solid state device (SSD), or removable memory cards, optical storage, flash memory devices, network attached storage (NAS), or connections to storage area network (SAN) devices, or other devices that may store non-volatile data. The network interface215is configured to transmit data via the communications network120.

A stream computing application may include one or more stream operators240that may be compiled into a “processing element” container235. The memory225may include two or more processing elements235, each processing element having one or more stream operators240. Each stream operator240may include a portion of code that processes tuples flowing into a processing element and outputs tuples to other stream operators240in the same processing element, in other processing elements, or in both the same and other processing elements in a stream computing application. Processing elements235may pass tuples to other processing elements that are on the same compute node110or on other compute nodes that are accessible via communications network120. For example, a processing element235on compute node110A may output tuples to a processing element235on compute node110B.

The storage230may include a buffer260. Although shown as being in storage, the buffer260may be located in the memory225of the compute node110or in a combination of both memories. Moreover, storage230may include storage space that is external to the compute node110, such as in a cloud.

The compute node110may include one or more operating systems262. An operating system262may be stored partially in memory225and partially in storage230. Alternatively, an operating system may be stored entirely in memory225or entirely in storage230. The operating system provides an interface between various hardware resources, including the CPU205, and processing elements and other components of the stream computing application. In addition, an operating system provides common services for application programs, such as providing a time function.

FIG. 3is a more detailed view of the management system105ofFIG. 1according to some embodiments. The management system105may include, without limitation, one or more processors (CPUs)305, a network interface315, an interconnect320, a memory325, and a storage330. The management system105may also include an I/O device interface310connecting I/O devices312, e.g., keyboard, display, and mouse devices, to the management system105.

Each CPU305retrieves and executes programming instructions stored in the memory325or storage330. Similarly, each CPU305stores and retrieves application data residing in the memory325or storage330. The interconnect320is used to move data, such as programming instructions and application data, between the CPU305, I/O device interface310, storage unit330, network interface315, and memory325. The interconnect320may be one or more busses. The CPUs305may be a single CPU, multiple CPUs, or a single CPU having multiple processing cores in various embodiments. In one embodiment, a processor305may be a DSP. Memory325is generally included to be representative of a random access memory, e.g., SRAM, DRAM, or Flash. The storage330is generally included to be representative of a non-volatile memory, such as a hard disk drive, solid state device (SSD), removable memory cards, optical storage, Flash memory devices, network attached storage (NAS), connections to storage area-network (SAN) devices, or the cloud. The network interface315is configured to transmit data via the communications network120.

The memory325may store a stream manager134. Additionally, the storage330may store an operator graph335. The operator graph335may define how tuples are routed to processing elements235(FIG. 2) for processing or stored in memory325(e.g., completely in embodiments, partially in embodiments).

The management system105may include one or more operating systems332. An operating system332may be stored partially in memory325and partially in storage330. Alternatively, an operating system may be stored entirely in memory325or entirely in storage330. The operating system provides an interface between various hardware resources, including the CPU305, and processing elements and other components of the stream computing application. In addition, an operating system provides common services for application programs, such as providing a time function.

FIG. 4is a more detailed view of the compiler system102ofFIG. 1according to some embodiments. The compiler system102may include, without limitation, one or more processors (CPUs)405, a network interface415, an interconnect420, a memory425, and storage430. The compiler system102may also include an I/O device interface410connecting I/O devices412, e.g., keyboard, display, and mouse devices, to the compiler system102.

Each CPU405retrieves and executes programming instructions stored in the memory425or storage430. Similarly, each CPU405stores and retrieves application data residing in the memory425or storage430. The interconnect420is used to move data, such as programming instructions and application data, between the CPU405, I/O device interface410, storage unit430, network interface415, and memory425. The interconnect420may be one or more busses. The CPUs405may be a single CPU, multiple CPUs, or a single CPU having multiple processing cores in various embodiments. In one embodiment, a processor405may be a DSP. Memory425is generally included to be representative of a random access memory, e.g., SRAM, DRAM, or Flash. The storage430is generally included to be representative of a non-volatile memory, such as a hard disk drive, solid state device (SSD), removable memory cards, optical storage, flash memory devices, network attached storage (NAS), connections to storage area-network (SAN) devices, or to the cloud. The network interface415is configured to transmit data via the communications network120.

The compiler system102may include one or more operating systems432. An operating system432may be stored partially in memory425and partially in storage430. Alternatively, an operating system may be stored entirely in memory425or entirely in storage430. The operating system provides an interface between various hardware resources, including the CPU405, and processing elements and other components of the stream computing application. In addition, an operating system provides common services for application programs, such as providing a time function.

The memory425may store a compiler136. The compiler136compiles modules, which include source code or statements, into the object code, which includes machine instructions that execute on a processor. In one embodiment, the compiler136may translate the modules into an intermediate form before translating the intermediate form into object code. The compiler136may output a set of deployable artifacts that may include a set of processing elements and an application description language file (ADL file), which is a configuration file that describes the stream computing application. In some embodiments, the compiler136may be a just-in-time compiler that executes as part of an interpreter. In other embodiments, the compiler136may be an optimizing compiler. In various embodiments, the compiler136may perform peephole optimizations, local optimizations, loop optimizations, inter-procedural or whole-program optimizations, machine code optimizations, or any other optimizations that reduce the amount of time required to execute the object code, to reduce the amount of memory required to execute the object code, or both. The output of the compiler136may be represented by an operator graph, e.g., the operator graph335.

The compiler136may also provide the application administrator with the ability to optimize performance through profile-driven fusion optimization. Fusing operators may improve performance by reducing the number of calls to a transport. While fusing stream operators may provide faster communication between operators than is available using inter-process communication techniques, any decision to fuse operators requires balancing the benefits of distributing processing across multiple compute nodes with the benefit of faster inter-operator communications. The compiler136may automate the fusion process to determine how to best fuse the operators to be hosted by one or more processing elements, while respecting user-specified constraints. This may be a two-step process, including compiling the application in a profiling mode and running the application, then re-compiling and using the optimizer during this subsequent compilation. The end result may, however, be a compiler-supplied deployable application with an optimized application configuration.

FIG. 5illustrates an exemplary operator graph500for a stream computing application beginning from one or more sources135through to one or more sinks504,506, according to some embodiments. This flow from source to sink may also be generally referred to herein as an execution path. In addition, a flow from one processing element to another may be referred to as an execution path in various contexts. AlthoughFIG. 5is abstracted to show connected processing elements PE1-PE10, the operator graph500may include data flows between stream operators240(FIG. 2) within the same or different processing elements. Typically, processing elements, such as processing element235(FIG. 2), receive tuples from the stream as well as output tuples into the stream (except for a sink—where the stream terminates, or a source—where the stream begins). While the operator graph500includes a relatively small number of components, an operator graph may be much more complex and may include many individual operator graphs that may be statically or dynamically linked together.

The example operator graph shown inFIG. 5includes ten processing elements (labeled as PE1-PE10) running on the compute nodes110A-110D. A processing element may include one or more stream operators fused together to form an independently running process with its own process ID (PID) and memory space. In cases where two (or more) processing elements are running independently, inter-process communication may occur using a “transport,” e.g., a network socket, a TCP/IP socket, or shared memory. Inter-process communication paths used for inter-process communications can be a critical resource in a stream computing application. However, when stream operators are fused together, the fused stream operators can use more rapid communication techniques for passing tuples among stream operators in each processing element.

The operator graph500begins at a source135and ends at a sink504,506. Compute node110A includes the processing elements PE1, PE2, and PE3. Source135flows into the processing element PE1, which in turn outputs tuples that are received by PE2and PE3. For example, PE1may split data attributes received in a tuple and pass some data attributes in a new tuple to PE2, while passing other data attributes in another new tuple to PE3. As a second example, PE1may pass some received tuples to PE2while passing other tuples to PE3. Tuples that flow to PE2are processed by the stream operators contained in PE2, and the resulting tuples are then output to PE4on compute node110B. Likewise, the tuples output by PE4flow to operator sink PE6504. Similarly, tuples flowing from PE3to PE5also reach the operators in sink PE6504. Thus, in addition to being a sink for this example operator graph, PE6could be configured to perform a join operation, combining tuples received from PE4and PE5. This example operator graph also shows tuples flowing from PE3to PE7on compute node110C, which itself shows tuples flowing to PE8and looping back to PE7. Tuples output from PE8flow to PE9on compute node110D, which in turn outputs tuples to be processed by operators in a sink processing element, for example PE10506.

Processing elements235(FIG. 2) may be configured to receive or output tuples in various formats, e.g., the processing elements or stream operators could exchange data marked up as XML, documents. Furthermore, each stream operator240within a processing element235may be configured to carry out any form of data processing functions on received tuples, including, for example, writing to database tables or performing other database operations such as data joins, splits, reads, etc., as well as performing other data analytic functions or operations.

The stream manager134ofFIG. 1may be configured to monitor a stream computing application running on compute nodes, e.g., compute nodes110A-110D, as well as to change the deployment of an operator graph, e.g., operator graph132. The stream manager134may move processing elements from one compute node110to another, for example, to manage the processing loads of the compute nodes110A-110D in the computing infrastructure100. Further, stream manager134may control the stream computing application by inserting, removing, fusing, un-fusing, or otherwise modifying the processing elements and stream operators (or what tuples flow to the processing elements) running on the compute nodes110A-110D.

Because a processing element may be a collection of fused stream operators, it is equally correct to describe the operator graph as one or more execution paths between specific stream operators, which may include execution paths to different stream operators within the same processing element.FIG. 5illustrates execution paths between processing elements for the sake of clarity.

FIG. 6is a flowchart illustrating a method600for window management in a stream computing environment, according to embodiments. The stream computing environment may include one or more stream operators (e.g. processing elements) configured to perform operations (logic-based analysis, attribute modification) on data (e.g., tuples) as part of a stream computing application. In embodiments, one or more stream operators of the stream computing environment may include a window to facilitate data analysis. Generally, the window may include a buffer or queue configured to hold (e.g., maintain) a set of data in order to perform an analysis operation on the set of data. For instance, the window may be configured to hold data (e.g., tuples) over a particular time period (e.g., tuples from the last 1 minute, 10 minutes, 4 hours), a specified number of tuples (e.g., 500 tuples, 1000 tuples), or a designated capacity of data (e.g., 1 gigabyte, 5 gigabytes). Aspects of method600relate to dynamically adjusting the size of a window of one or more stream operators in a stream computing environment based on data congestion. Leveraging dynamic window size adjustment may be associated with benefits including tuple throughput rate, data processing efficiency, and stream application performance. The method600may begin at block601.

In embodiments, a streams management application may monitor for an indication of congestion at block602. The streams management application may include a software widget or other tool configured to facilitate operation of a streaming application in the stream computing environment. Generally, monitoring can include observing, supervising, scanning, overseeing, analyzing, or inspecting for the indication of congestion. The indication of congestion may include a sign, evidence, trace, warning, symptom, or other representation of congestion (e.g., slowdown, bottleneck) with respect to the stream computing environment. In embodiments, monitoring may include using a streams management application to analyze the data throughput of an operator graph to identify the indication of the congestion. For instance, the streams management application may inspect the total tuple throughput of the operator graph as well as the tuple throughput of individual stream operators to determine areas of the operator graph that may be associated with congestion (e.g., tuple throughput rate that is relatively low with respect to other areas). Other methods of monitoring for the indication of congestion are also possible.

In embodiments, the indication of congestion may indicate a build-up of tuples at block604. Generally, the build-up of tuples may include an accumulation, aggregation, or other profusion of tuples that leads to a slowdown or bottleneck within an operator graph of the stream computing environment. In embodiments, the build-up of tuples may include a group of tuples that have become backed-up in the processing queue (e.g., back-pressure queue) of a particular stream operator. For instance, a particular stream operator may receive more tuples in a given time period than it is able to process, such that tuples waiting to be processed accumulate in a hold queue for the stream operator. In this way, the overall tuple throughput rate of the operator graph may be reduced, resulting in congestion with respect to the stream computing environment. Other types of tuple build-up are also possible. In embodiments, the indication of congestion may indicate a segment of congestion of an operator graph with respect to the stream computing environment at block606. Generally, the segment of congestion of the operator graph may include an area, portion, or region of the operator graph that is associated with reduced tuple throughput, excessive tuple accumulation, or other type of data traffic slowdown. For example, the segment of congestion of the operator graph may include a group of one or more stream operators associated with a data traffic bottleneck. Other types of the indication of congestion are also possible.

In embodiments, the indication of congestion may correspond with a throughput factor at block608. A benchmark threshold value may exceed a throughput value for the throughput factor. Generally, the throughput factor may include one or more characteristics, attributes, or properties of the stream computing environment that influence how data is processed by the stream computing application (e.g., tuple routing methods, input/output protocols). The throughput factor may be associated with a throughput value. In embodiments, the throughput value may be a quantitative measure of the rate at which tuples are processed and passed through an operator graph of the streaming application. As an example, the throughput value may include a number of tuples processed by the operator graph in a given time period (e.g., 200 tuples per second). In embodiments, an operator graph may be associated with a benchmark throughput value that indicates a target throughput rate (e.g., goal, desired throughput). Aspects of the disclosure relate to the recognition that, in embodiments, a throughput value failing to achieve the benchmark throughput value may indicate congestion with respect to the stream computing environment. Consider, for example, a stream computing environment associated with a benchmark throughput value of 500 tuples per second. A throughput value for the stream computing environment may be measured to be 356 tuples per second. As the throughput value of 356 tuples per second does not achieve the benchmark throughput value of 500 tuples per second, the stream computing environment may be considered to be congested. Other types of congestion indications are also possible.

At block620, an indication of congestion with respect to a stream computing environment may be detected. Generally, detecting can include sensing, discovering, recognizing, identifying, or otherwise ascertaining the indication of congestion. As described herein, the indication of congestion may include a sign, evidence, trace, warning, symptom, or other representation of congestion (e.g., slowdown, bottleneck) with respect to the stream computing environment. In embodiments, detecting may include identifying that one or more stream operators or other regions of an operating graph appear to be or are responsible for a slowdown of the tuple throughput rate of the stream computing environment. As an example, detecting may include using a data traffic diagnostic tool to evaluate the tuple throughput characteristics of one or more stream operators of the stream computing environment, and identifying one or more stream operators that have a tuple throughput rate below a throughput threshold (e.g., throughput rate of 620 tuples per second is below a throughput threshold of 700 tuples per second). In certain embodiments, detecting the indication of congestion may include measuring the number of tuples held in the back-pressure queue of one or more stream operators, and comparing the number of tuples to a tuple back-pressure threshold. In response to ascertaining that the number of tuples in the back-pressure queue for a particular stream operator exceeds the back-pressure threshold for that stream operator (e.g., 50 tuples may exceed a back-pressure threshold of 30 tuples), the indication of congestion may be detected. Other methods of detecting the indication of congestion are also possible.

In embodiments, it may be identified that the indication of congestion corresponds with a set of stream operators having a set of windows at block622. Generally, identifying can include recognizing, ascertaining, or determining that the indication of congestion corresponds with the set of stream operators having the set of windows. Aspects of the disclosure relate to the recognition that, in certain situations, as the amount of data maintained by the window of a stream operator (e.g., join operator) increases, the throughput rate of the stream computing environment may decrease. Accordingly, in certain embodiments, the set of windows of the set of stream operators may be one cause of the congestion within the stream computing environment. In embodiments, identifying that the indication of congestion corresponds with the set of operators having the set of windows may include assessing the set of windows for the set of stream operators and ascertaining that the amount of data maintained by one or more windows of the set of windows exceeds a window data threshold. As an example, for a stream computing environment having a window data threshold of 4 gigabytes of data, a window determined to have 6 gigabytes of data may be identified as a potential indication of congestion for the stream computing environment. Other methods of identifying that the indication of congestion corresponds with the set of stream operators having the set of windows are also possible.

At block650, a set of window configurations in the stream computing environment may be determined. The set of window configurations may be determined based on the indication of congestion. Generally, determining can include selecting, calculating, devising, formulating, or ascertaining the set of window configurations. The set of window configurations may include one or more properties or attributes that define the operational characteristics of the set of windows within the stream computing environment. For instance, the set of window configurations may include attributes that specify the type and amount of data managed by a particular stream operator, as well as the type of operations that a stream operator performs on the data (e.g., join operation). In embodiments, determining the set of window configurations may include evaluating the throughput performance of an operator graph, and ascertaining a set of window configurations that are expected to be associated with positive impacts (e.g., increased throughput rate, operator performance) with respect to the stream computing environment. In certain embodiments, determining the set of window configurations may be based on historical usage data for the stream computing environment or similar stream computing environments. As described herein, in certain embodiments the set of window configurations may be determined based on the indication of congestion. For instance, determining the set of window configurations may include selecting a combination of parameters for one or more stream operator windows that reduce or benefit congestion within the operator graph (e.g., decrease/eliminate tuple build-up, increase throughput). Other methods of determining the set of window configurations are also possible.

In embodiments, the set of window configurations may include a set of window sizes of a set of windows at block652. Generally, the set of windows sizes of the set of windows may include one or more parameters that designate the amount of data that may be maintained by a particular window of a streaming operator. In embodiments, the window size may specify a time-frame for which tuples may be held in the window (e.g., hold the last/most recent 10 minutes of tuples, last 30 minutes of tuples, last 2 hours of tuples). In embodiments, the window size may specify a number of tuples to be held by a window (e.g., most recent 100 tuples, most recent 500 tuples, most recent 1500 tuples). In embodiments, the window size may designate an amount of data to be maintained by a window (e.g., 4 gigabytes of tuples, 7 gigabytes of tuples). Other types of window sizes of the set of windows are also possible.

Consider the following example. An indication of congestion for a stream computing environment may be detected that indicates that a first stream operator is associated with a tuple build-up. For instance, the first stream operator may have a window size of “Most recent 3 hours of tuples,” such that a large number of tuples (e.g., exceeding a threshold number) have accumulated in a back-pressure queue of the first stream operator, and the throughput rate of the stream operator has decreased (e.g., below a threshold level). Accordingly, aspects of the disclosure relate to determining a window configuration (e.g., window size) for the first stream operator that will have positive impacts with respect to the throughput rate of the stream computing environment. In embodiments, determining the window configuration for the first stream operator may include analyzing historical usage data and performance metrics for the stream computing environment to ascertain an appropriate window configuration for the first stream operator. In response to analyzing the historical usage data, it may be determined that a past window configuration for the first stream operator having a window size of “Most recent 2 hours of tuples” or “2 hours” was not associated with congestion. Accordingly, a window size of “Most recent 2 hours of tuples” or “2 hours” may be ascertained for the first stream operator.

In embodiments, the set of window configurations may be modified at block654. The set of window configurations may be modified by a streams management engine until a throughput value for a throughput factor in the stream computing environment achieves a target threshold value for the throughput factor in the stream computing environment. Generally, modifying can include altering, adjusting, increasing, decreasing, or otherwise changing the set of window configurations. As described herein, aspects of the disclosure relate to altering the window configuration (e.g., window size) of a set of stream operators to positively impact the throughput rate of the stream computing environment. For instance, the streams management engine may be configured to successively (e.g., gradually) adjust the window configuration of a stream operator until a throughput value achieves a target threshold value. In certain embodiments, the streams management engine may be configured to analyze the relationship between the throughput rate of the stream computing environment and the window configuration of one or more stream operators, and calculate a window size for the set of stream operators that will result in a throughput rate that will achieve the target threshold value. Other methods of modifying the set of window configurations are also possible.

In embodiments, a window size of a window within a segment of congestion may be decreased at block656. Generally, decreasing can include diminishing, lessening, shrinking, or otherwise reducing the window size of the window within the segment of congestion. As described herein, aspects of the disclosure relate to the recognition that reduction of the window size of a stream operator located in a segment of congestion of an operator graph may be associated with positive impacts with respect to tuple throughput rate. Accordingly, in embodiments, the window size of a window within a segment of congestion may be reduced. As examples, a window size of “8 gigabytes” may be reduced to “7 gigabytes,” a window size of “Most recent 1 hour of tuples” may be reduced to “Most recent 50 minutes of tuples,” or a window size of “600 tuples” may be reduced to “500 tuples.” Other methods of decreasing the window size of a window, as well as window size reductions of greater or lesser extents are also possible.

As an example, consider that a particular stream computing environment has a current throughput rate of 600 tuples per second, and a target threshold value of 900 tuples per second. In embodiments, the stream computing environment may detect an indication of congestion associated with a stream operator having a window size of 10 gigabytes. Accordingly, the streams management engine may be configured to modify the window configuration by reducing the window size of the stream operator. The streams management engine may first reduce the window size from 10 gigabytes to 8 gigabytes, and subsequently measure the tuple rate of the stream computing environment to be 800 tuples per second. As the throughput value of 800 tuples per second does not yet achieve the target threshold value of 1000 tuples per second, the streams management engine may continue to modify the window configuration by further reducing the window size of the stream operator to 6 gigabytes. In response to reducing the window size to 6 gigabytes, it may be determined that the throughput rate has increased to 1000 tuples per second, which achieves the target threshold value of 900 tuples per second. Other methods of modifying the set of window configurations until the target threshold value is achieved are also possible.

In embodiments, a window size of a window which is external to the segment of congestion may be increased at block658. Generally, increasing can include raising, expanding, boosting, growing, or enlarging the window size of the window which is external to the segment of congestion. Aspects of the disclosure relate to the recognition that in certain situations, window sizes of windows corresponding to streaming operators that are external to the segment of congestion may be increased without adversely affecting the throughput rate of the stream computing environment. Accordingly, in embodiments, aspects of the disclosure relate to raising the window size of one or more windows of the stream computing environment (e.g., to facilitate the performance of analysis operations on a set of data stored in the window). As examples, a window size of “4 gigabytes” may be increased to “6 gigabytes,” a window size of “Most recent 30 minutes of tuples” may be increased to “Most recent 60 minutes of tuples,” or a window size of “500 tuples” may be increased to “700 tuples.” Other methods of increasing the window size of a window, as well as window size increases of greater or lesser extents are also possible.

At block670, the set of window configurations may be established in the stream computing environment. Establishing the set of window configurations may be performed in response to determining the set of window configurations. Generally, establishing can include creating, applying, configuring, generating, instantiating, or implementing the set of window configurations. In embodiments, establishing may include dynamically (e.g., in real-time, on-the-fly) adjusting one or more parameters of a set of stream operators to define the new set of window configurations. As described herein, establishing may include modifying window parameters for a set of windows of the stream operators to adjust (e.g., increase or decrease) the window size of one or more windows. As an example, a window size of a particular stream operator may be reduced from “Last 30 minutes of tuples” to “Last 10 minutes of tuples” in order to decrease the accumulation of tuples in the back-pressure queue of the stream operator and positively impact the throughput rate of the stream computing environment. In embodiments, establishing the set of window configurations may include using the streams management engine to simultaneously modify the window sizes of a plurality of stream operators during operation of a streaming application. Other methods of establishing the set of window configurations in the stream computing environment are also possible.

In embodiments, establishing the set of window configurations in the stream computing environment may alter a throughput factor at block672. As described herein, aspects of the disclosure relate to the recognition that, as the amount of data/tuples held in the back-pressure queue of a stream operator window decrease, the memory footprint of the stream operator may decrease, leading to an increased overall throughput rate for the stream computing environment. Accordingly, establishing the set of window configurations in the stream computing environment and modifying one or more parameters (e.g., window sizes) of the set of windows may cause an increase or decrease in the throughput rate. For example, in embodiments, reducing the window size of a stream operator (e.g., from 4 gigabytes of tuples to 2 gigabytes of tuples) may decrease the memory footprint of the stream operator, and result in an increase of the tuple throughput rate of the stream computing environment (e.g., 600 tuples per second to 750 tuples per second). Other types of changes to the throughput factor are also possible.

Consider the following example. A streams management engine may monitor a stream computing environment and detect an indication of congestion associated with a first stream operator. For instance, the first stream operator may have a window size of “Most recent 4 hours of tuples,” such that a large number of tuples have accumulated in the back-pressure queue for the stream operator, leading to an increased memory footprint for the streaming application and a decrease in the total throughput rate of the stream computing environment. Accordingly, as described herein, the streams management engine may be configured to gradually decrease the window size of a stream operator while monitoring the throughput rate until a threshold throughput rate is achieved. For instance, in embodiments, the streams management engine may be configured to decrease the window size of the first stream operator by 10 minute increments until the threshold rate achieves the target threshold value (e.g., 700 tuples per second). Other methods of managing the window size of a stream operator to increase the throughput rate are also possible.

Method600concludes at block699. Aspects of method600may provide performance or efficiency benefits for window management in a stream computing environment. For example, aspects of method600may have positive impacts with respect to increasing the tuple throughput rate of a streaming application by adjusting the window size of one or more stream operators. The detecting, the determining, the establishing, and other steps described herein may each occur in an automated fashion without user invention (e.g., using automated computing machinery, fully machine-driven without manual stimuli). Altogether, dynamic window size adjustment may be associated with benefits including tuple throughput rate, data processing efficiency, and stream application performance.

FIG. 7is a flowchart illustrating a method700for window management in a stream computing environment, according to embodiments. Aspects of method700relate to dynamically adjusting the size of a window of one or more stream operators in a stream computing environment based on data congestion. Aspects of method700may substantially correspond to embodiments described herein and theFIGS. 1-8. The method700may begin at block701. At block720, an indication of congestion with respect to a stream computing environment may be detected. At block750, a set of window configurations based on the indication of congestion may be determined. At block770, the set of window configurations may be established in the stream computing environment. Leveraging dynamic window size adjustment may be associated with benefits including tuple throughput rate, data processing efficiency, and stream application performance.

In embodiments, the detecting, the determining, the establishing, and other steps described herein may each occur in an automated fashion without user intervention at block704. In embodiments, the detecting, the determining, the establishing, other steps described herein may be carried out by an internal streams management module maintained in a persistent storage device of a computing node that hosts the streaming application. In certain embodiments, the detecting, the determining, the establishing, and other steps described herein may be carried out by an external streams management module hosted by a remote computing device or server (e.g., accessible via a subscription, usage-based, or other service model). In this way, aspects of window management in a stream computing environment may be performed using automated computing machinery without manual action. Other methods of performing the steps described herein are also possible.

In embodiments, a parameter value which indicates a window size is adjustable may be sensed at block705. Generally, sensing can include discovering, recognizing, ascertaining, or otherwise identifying the parameter value. Aspects of the disclosure relate to the recognition that in some situations, stream computing environments may have predetermined window configurations with fixed window sizes. Accordingly, aspects of the disclosure relate to ascertaining that a stream computing environment is configured for adjustable window sizes based on a parameter value. The parameter value may include a figure, symbol, character, number, or other indication that a particular window size is configured to be adjusted, modified, or otherwise changed. In embodiments, the parameter value may be a specification programmed into a streaming application by a developer of the streaming application. For example, the parameter value may include a binary value such that a first value (e.g., 0) indicates that the window size is non-adjustable, and a second value (e.g., 1) indicates that the window size is adjustable. In embodiments, sensing the parameter value may include using the streams management engine to access a database, index, directory, or other location where the parameter value is stored, and ascertaining the parameter value. Other methods of sensing the parameter value are also possible.

In embodiments, a set of window configuration parameter values may be received at block706. Generally, receiving can include collecting, gathering, obtaining, detecting, or otherwise accepting delivery of the set of window configuration parameter values. The set of window configuration parameter values may include magnitudes, quantities, numbers, figures, or symbols that specify one or more characteristics of the window configuration of a stream operator. For instance, the set of window configuration parameter values may designate a window size for one or more windows of the stream computing environment. In certain embodiments, the set of window configuration parameter values may indicate both desired or target (e.g., ideal) window sizes as well as upper and lower window size limits (e.g., maximum or ceiling window size, minimum or floor window size). In embodiments, the set of window configuration parameter values may be received from a user or stream computing environment administrator. In embodiments, the set of window configurations may be determined using the set of window configuration parameter values at block708. For instance, the set of window configuration parameter values may be imported by the stream computing environment and directly applied (e.g., established) as the window configurations for a set of windows. In embodiments, the streams management engine may use the set of window configuration parameter values along with other operational constraints and target thresholds (e.g., target throughput thresholds) of the stream computing environment to determine the set of window configurations. As an example, a user may specify a target window size of “5 gigabytes,” as well as an upper window size limit of “7 gigabytes” and a lower window size limit of “3 gigabytes” for a particular window. As such, the streams management engine may attempt to make the window size 5 gigabytes, but determine that a window size of 5 gigabytes prevents the throughput rate of the stream computing environment from achieving a target throughput value. Accordingly, the streams management engine may lower the window size from 5 gigabytes to 4 gigabytes, such that the target throughput value is achieved while remaining within the window size range specified by set of window configuration parameter values. Other methods of determining the set of window configurations based on the set of window configuration parameter values are also possible.

In embodiments, a window in the stream computing environment may be modified from a first window configuration to a second window configuration at block752. Generally, modifying can include altering, adjusting, increasing, decreasing, or otherwise changing the first window configuration to the second window configuration. As described herein, aspects of the disclosure relate to the recognition that in some situations, the window configuration of a window in the stream computing environment may be associated with network traffic slowdown, bottlenecks, or other congestion in the stream computing environment. For example, a particular window may include a substantially large window size that has a relatively large memory footprint, resulting in a decrease to overall tuple throughput. Accordingly, aspects of the disclosure relate to modifying the window configuration from a first window configuration to a second window configuration (e.g., to increase streaming application performance). In embodiments, modifying the window configuration may include altering or adjusting one or more window parameters of one or more streaming operators. Other methods of modifying a window from a first window configuration to a second window configuration are also possible.

In embodiments, modifying a window in the stream computing environment from a first window configuration to a second window configuration may include adjusting a window size of the window at block754. The window size of the window may be adjusted in dynamic fashion. Generally, adjusting may include increasing, decreasing, reducing, expanding, or otherwise altering the window size of the window. In embodiments, aspects of the disclosure relate to adjusting the window size of one or more windows in real-time/on-the-fly or while the streaming application is running (e.g., in operation). As described herein, adjusting may include expanding or contracting the size of one or more windows of the streaming computing environment. As examples, adjusting the window size may include decreasing the window size (e.g., from 5 gigabytes of data to 4 gigabytes of data) in a congested segment of an operator graph, or increasing the window size (e.g., from 1 hour of tuples to 2 hours of tuples) in a non-congested area of an operator graph. Other methods of adjusting the windows size in dynamic fashion are also possible.

In embodiments, a reduction of the indication of congestion may be detected at block756. Generally, detecting can include sensing, discovering, recognizing, identifying, or otherwise ascertaining the reduction of the indication of congestion. As described herein, aspects of the disclosure relate to modifying the window size of a window of one or more stream operators to positively impact the throughput rate of the stream computing environment. Accordingly, in certain embodiments, modification of the window size of a stream operator may be associated with a reduction in the indication of congestion. In embodiments, detecting the reduction of the indication of congestion may include using a data traffic diagnostic tool to analyze the throughput performance of the stream computing environment, and sensing an increase in the overall traffic throughput. In certain embodiments, detecting the reduction may include evaluating the back-pressure queue of one or more stream operators and ascertaining that the number of tuples held in the back-pressure queue has decreased (e.g., with respect to a previous congested state). Other methods of detecting the reduction of the indication of congestion are also possible.

At block780, a stream of tuples is received. The stream of tuples may be processed by a plurality of processing elements (e.g., stream operators) operating on a set of compute nodes (e.g., in a stream application environment). The stream of tuples may be received consistent with the description herein includingFIGS. 1-8. Current/future processing by the plurality of processing elements may be performed consistent with the description herein includingFIGS. 1-8. The set of compute nodes may include a shared pool of configurable computing resources. For example, the set of compute nodes can be a public cloud environment, a private cloud environment, or a hybrid cloud environment. In certain embodiments, each of the set of compute nodes are physically separate from one another.

In embodiments, the stream of tuples is processed at block790. The stream of tuples may be processed by the plurality of processing elements operating on the set of compute nodes. The stream of tuples may be processed consistent with the description herein includingFIGS. 1-8. In embodiments, stream operators operating on the set of compute nodes may be utilized to process the stream of tuples. Processing of the stream of tuples by the plurality of processing elements may provide various flexibilities for stream operator management. Overall flow (e.g., data flow) may be positively impacted by utilizing the stream operators.

In embodiments, use of window management may be metered at block792. Metering can include measuring, tracking, documenting, recording, or calculating the degree or extent of the utilization of the window management operations in the stream computing environment. The degree of utilization may be calculated based on the number of times window management operations were utilized (e.g., 10 times, 100 times), the amount of data managed using window management operations (e.g., tuple throughput), application configurations (e.g., streaming application configurations, window parameters), resource usage (e.g., data processed by window management) or other means. Based on the metered use, an invoice may be generated at block794. The invoice may include a bill, fee, service charge, or other itemized breakdown specifying compensation for the usage of window management. Subscription based models are also possible. The method700may conclude at block799.

FIG. 8illustrates an example stream computing environment800with respect to managing a set of tuples in a consistent region, according to embodiments. Aspects of the example stream computing environment800relate to managing a window size for a stream operator to facilitate processing of a set of tuples in a steam computing environment. The stream computing environment800may include one or more tuples805, a segment of congestion835, and stream operators810,820,830,840,850,860, and870. Aspects of the stream computing environment800relate to establishing a set of window configurations for one or more stream operators in the stream computing environment in order to positively impact the segment of congestion835. Aspects of the stream computing environment800may be associated with benefits including tuple throughput rate, data processing efficiency, and stream application performance.

The segment of congestion may include an area or region of the stream computing environment800that is associated with data traffic slowdown, bottleneck, tuple build-up, or other decrease in tuple throughput rate. For instance, as shown inFIG. 8, a large number of tuples (e.g., exceeding a threshold number) may accumulate in one area of the operator graph, such as between stream operator820and stream operator830. As described herein, in embodiments, a streams management engine may monitor for indications of congestion, and detect the tuple build-up between stream operators820and830. In embodiments, the streams management engine may analyze the window configuration of stream operators820and830, and ascertain that stream operator830has a substantially large window size of “Most recent 10 gigabytes of tuples,” such that tuples are not being processed quickly enough and are instead building up in the back-pressure queue of stream operator830. Accordingly, the streams management engine may be configured to determine and establish a reduced window size for the stream operator830. As an example, the window size of the stream operator830may be reduced from 10 gigabytes to 9 gigabytes, and the streams management engine may monitor the tuple throughput rate and back-pressure queue of the stream operator830to determine whether the congestion in the stream computing environment800has been reduced/alleviated. In embodiments, the streams management engine may continue to reduce the window size of the stream operator830until the throughput rate of the stream computing environment800achieves a target throughput threshold (e.g., 800 tuples per second). Other methods of managing the window size of a stream operator to positively impact data throughput in a stream computing environment are also possible.

In addition to embodiments described above, other embodiments having fewer operational steps, more operational steps, or different operational steps are contemplated. Also, some embodiments may perform some or all of the above operational steps in a different order. In embodiments, operational steps may be performed in response to other operational steps. The modules are listed and described illustratively according to an embodiment and are not meant to indicate necessity of a particular module or exclusivity of other potential modules (or functions/purposes as applied to a specific module).

Typically, cloud-computing resources are provided to a user on a pay-per-use basis, where users are charged only for the computing resources actually used (e.g., an amount of storage space used by a user or a number of virtualized systems instantiated by the user). A user can access any of the resources that reside in the cloud at any time, and from anywhere across the Internet. In context of the present disclosure, a user may access applications or related data available in the cloud. For example, the nodes used to create a stream computing application may be virtual machines hosted by a cloud service provider. Doing so allows a user to access this information from any computing system attached to a network connected to the cloud (e.g., the Internet).

Embodiments of the present disclosure may also be delivered as part of a service engagement with a client corporation, nonprofit organization, government entity, internal organizational structure, or the like. These embodiments may include configuring a computer system to perform, and deploying software, hardware, and web services that implement, some or all of the methods described herein. These embodiments may also include analyzing the client's operations, creating recommendations responsive to the analysis, building systems that implement portions of the recommendations, integrating the systems into existing processes and infrastructure, metering use of the systems, allocating expenses to users of the systems, and billing for use of the systems.