Detecting and predicting bottlenecks in complex systems

A method for detecting a bottleneck in a system includes receiving a graph, wherein a node represents a software module and an edge represents a communication channel between software modules, monitoring selected resources for each software module in comparison to available resources, monitoring a ratio of a bandwidth consumed on a communication channel versus available bandwidth, traversing the graph for identifying a source software module whose produced amount of output is below the amount of output needed by the software module that is in idle mode, and analyzing a resource consumption of the identified source software module to identify a lacking amount of resource for the identified source software module. A computer system and computer program product corresponding to the above method are also disclosed herein.

BACKGROUND OF THE INVENTION

The invention relates generally to a method for detecting a bottleneck in a system, and more specifically, to a method using a graph in which a node represents a software module and an edge of the graph represents a communication channel. The invention relates further to a bottleneck identification system for detecting a bottleneck in a system, and a computer program product.

Nowadays, quite often software solutions consist of a number of inter-communicating endpoints, where many endpoints serve as data producers as well as a consumers at the same time. Poor performance on one of the endpoint/software modules may happen and typically will impact the overall performance of a complete solution. Moreover, performance of the endpoint depends not only on the hardware running it, but also on other factors like, e.g., other software modules running on the same machine, may it be a physical machine or a virtual machine. Isolating the root cause for a bottleneck in a system—in particular, with an intermitting presence—may be difficult to detect, isolate and eliminate. The reason is in the fact that a performance bottleneck may have a plurality of reasons. There may be not enough computing resources, e.g., main memory or external storage capacity, too big or too small swap files, not enough communication bandwidth, too many users trying to do the same with the same software module, etc. Even for experienced system designers and architects it may be a cumbersome task to get down to the real cause of the performance problem. The number of tools to support such analysis is still limited and often based on static information from the past. Hence, there may be a requirement for a more sophisticated support in isolating bottlenecks in a system.

SUMMARY

As disclosed herein, a method, executed by a computer, for detecting a bottleneck in a system includes receiving a graph, wherein a node represents a software module and an edge represents a communication channel between software modules, monitoring selected resources for each software module in comparison to available resources, monitoring a ratio of a bandwidth consumed on a communication channel versus available bandwidth, traversing the graph for identifying a source software module whose produced amount of output is below the amount of output needed by the software module that is in idle mode, and analyzing a resource consumption of the identified source software module to identify a lacking amount of resource for the identified source software module. A computer system and computer program product corresponding to the above method are also disclosed herein.

DETAILED DESCRIPTION

According to one aspect of the present invention, a method for detecting a bottleneck in a system may be provided. The system may comprise software modules communicating with each other via communication channels. The method may comprise receiving a graph. In the graph, a node may represent one of the software modules and an edge may represent one of the communication channels with a data flow from a transmitting software module out of the software modules to a receiving software module out of said software modules. A node, representing a software module, may serve as transmitting software module and as receiving software module and may relate to a predefined factor representing an expected ratio of a received amount of input data versus a produced amount of output data derived from the input data.

The method may further comprise monitoring, for each software module, for selected resources a ratio of an amount of the resources consumed by the software module versus an available amount of the resources, monitoring, for each communication channel, a ratio of a bandwidth consumed by one of the communication channels versus an available bandwidth on the communication channel, and an amount of idle time of the communication channel; traversing, for a software module in idle mode, the graph for identifying a source software module whose produced amount of output is below the amount of output needed by said software module that is in idle mode, and analyzing a resource consumption of the identified source software module to identify a lacking amount of resource for the identified source software module.

According to another aspect of the present invention, a bottleneck identification system for detecting a bottleneck in a system may be provided. Also, the system may comprise software modules communicating with each other via communication channels. The system may comprise a reception unit adapted for receiving a graph, in which a node may represent one of the software modules and an edge may represent one of the communication channels with a data flow from a transmitting software module out of the software modules to a receiving software module out of the software modules. A node, representing a software module, may serve as transmitting software module and as receiving software module—in particular at the same time—and may relate to a predefined factor representing an expected ratio of a received amount of input data versus a produced amount of output data derived from the input data. The system may further comprise a monitoring unit adapted for monitoring, for each software module, for selected resources, a ratio of an amount of the resources consumed by the software module versus an available amount of the resources. The monitoring unit may also be adapted for monitoring, for each communication channel, a ratio of a bandwidth consumed by one of the communication channels versus an available bandwidth of the communication channel, and an amount of idle time of the communication channel. A traversing module may be adapted for traversing, for a software module in idle mode, the graph for identifying a source software module whose produced amount of output is below the amount of output needed by the software module that is in idle mode, and an analysis module may be adapted for analyzing a resource consumption of the identified source software module to identify a lacking amount of resources for the identified source software module.

The aspects defined above and further aspects of the present invention are apparent from the examples of embodiments to be described hereinafter and are explained with reference to the examples of embodiments, but to which the invention is not limited.

The term ‘bottleneck’ may denote any negative impact in respect to the performance of a system comprising, e.g., a series of modules, some of which may be software modules. The term bottleneck may be a replacement for the term performance degradation. The reason for the performance problems may not be obvious and may require a thorough analysis.

The term ‘system’ may denote a group of interrelated items, like software modules, hardware components of any sort, communication units, storage elements and the like, all being part of a computing and communication system.

The term ‘software module’ may denote a software component being part of the system as defined above. The software module may be any sort of software module, like application software, system software, middleware software, embedded software, communication software and the like. There may be no limits to the sort of software module. The software may comprise at least an input port for receiving data and an output port for outputting data. The software module itself may transform the data in any form, store them and/or route them to an output port.

The term ‘communication channel’ may denote a data link connecting a data output and a data input. The data output may be an output in form of a software module and/or, alternatively, in form of a hardware module. Also a combination may be possible.

The term ‘graph’ may denote in mathematics, and more specifically in graph theory, a representation of a set of objects where some pairs of objects are connected by links. The interconnected objects are represented by mathematical abstractions called vertices (also called nodes or points), and the links that connect some pairs of vertices are called edges (sometimes also called arcs or lines). Typically, a graph is depicted in diagrammatic form as a set of dots for the vertices, joined by lines or curves for the edges.

The term ‘node’ may denote an object in the sense of the definition of the graph mentioned above. The term ‘edge’ may denote a link in the sense of the definition of the graph mentioned above.

The term ‘transmitting software module’ may denote a software module sending data from the software module. The term ‘receiving software module’ may denote the opposite of the term ‘transmitting software module’. It may be noted that a software module may have both characteristics: transmitting and receiving at the same time.

The term ‘selected resource’ may denote any resource used to perform a task of an object or a link, i.e., a software module or a communication channel in the sense of the present invention and in graph theory. A selected resource may comprise and may not be limited to: available amount of memory and speed, storage, CPU power, clock speed, bus clock speed, core per CPU, number of thread per core, I/O rate, etc.

The term ‘a micro-service’ may denote a special form of a software module. In cloud computing software modules and complete systems may be built out of micro services, i.e., small interlinked software modules, which only comprise a partial function of the overall function.

The proposed method for detecting a bottleneck in a system as well as the bottleneck identification may offer multiple couple of advantages and technical effects:

The proposed solution may monitor continuously resources like CPU, co-processors, cache memory, main memory, I/O devices, databases, user interfaces, communication links, their amount and their availability, and the like. Beside the resources itself, also the consumption of the resources for each node and for each data flow, i.e., communication channel to/from the nodes may be monitored. A link or communication channel may be established between software modules and required resources for its proper functioning may be monitored. This way, a pretty precise picture may be drawn from resource requirements for individual activities in the system. This may be the basis for a detailed analysis of bottlenecks and their elimination. The ability to map the measured values or resource consumption against predefined values or ratios may enable a single or multiple thresholds based alarm and optimization system.

The proposed solution may identify bottlenecks in each and every component of the software components and the communication links. The root cause of performance degradation may be detected and actions may be performed to avoid such bottlenecks in the future. An operator may get active support by the proposed method and/or system for detecting bottlenecks. Due to the dynamic character of the solution, the operator does not need to rely on historic data for a performance analysis. Instead, he may be enabled by life data from the system of software modules and communication channels.

A new level of system optimization may be reached by this new approach using graph theory in order to isolate and finally eliminate system bottlenecks.

According to one preferred embodiment of the method, the node may be selected out of the group comprising a data source, e.g., a database, a data storage or, another software module, a data processing system, a data transformation system, in particular a processing software module, and a user interface module. Other optional node types may be selected from a network module, a middleware module, a storage module or the like. Thus, any component of a computing system, in particular software based nodes may be used as a source and a sink of data. Hence, the proposed solution may be adaptable to virtually every system architecture and configuration.

According to another preferred embodiment of the method, the data source may be a database, a file system, a content management system, or streaming data. The data may come in wireline-based or wirelessly. Thus, the proposed method may also be useable in a system comprising software modules linked by mobile technologies and/or cloud systems. Also embedded systems may be supported by the method.

According to one permissive embodiment of the method, at least one of the software modules may be a micro-service. Or in other words, all types of software modules may be supported as nodes of the system by the method.

According to one advantageous embodiment of the method, analyzing resource consumption may comprise tracking and reporting the lacking support of a resource over a time period. This development in time may be observed. It may be detected that the bottleneck may grow slowly over time. A time-series based analysis may help to identify the root cause of the bottleneck much faster.

According to an additionally preferred embodiment of the method, analyzing resource consumption may comprise determining a recommendation to counteract to the lacking support of a resource. For this, there may be a knowledge base provided with typical system bottlenecks known from other systems. Combinations of resource shortages of different resources may be combined and pattern matching may be applied using the actual resource measurements and those available in the knowledge base. Thus, an operator may get direct recommendations to a system optimization without doing the analysis himself.

By sharing the experiences of an elimination of a bottleneck via the knowledge base and making the so extended knowledge base available to other operators, the knowledge and know-how may be spread implying a self-learning environment of those implementations sharing the content of their knowledge bases.

According to one permissive embodiment of the method, analyzing resource consumption may comprise moving the software module to a different computing system. This may have a significant effect on the overall performance. If the different computing system may have more resources available or is completely unused, only a little communication overhead may be involved. However, if the software module is very resource intensive—e.g., because it may be a number crunching application module—and may therefore be in conflict with competing software modules on the original computing system, a transfer to a free and unused computing system may increase overall performance of a system of software modules dramatically.

According to another preferred embodiment of the method, analyzing resource consumption may comprise predicting how the system will react to changes in the resources. This may comprise the availability, amount, or speed of components or resources. It may also comprise a reflection of a change in competing software modules for a same resource. For this, it may be required that the method may comprise tracking and reporting another software module competing for the lacking resources on the same computing system. Hence, this may be a quite powerful optimization technique for eliminating bottlenecks from a system comprising a plurality of software modules.

In the following, a detailed description of the figures will be given. All instructions in the figures are schematic. Firstly, a block diagram of an embodiment of the inventive method for detecting a bottleneck in a system is given. Afterwards, further embodiments as well as embodiments of the bottleneck identification system for detecting a bottleneck in a system will be described.

FIG. 1shows a block diagram of an embodiment of the method100for detecting a bottleneck in a system. The system may be a computer system, a computer system with attached peripheral device, a network of computers, a plurality of micro services, a complete software application system, and the like. The system comprises at least one software modules, in particular a plurality of software modules, communicating with each other via communication channels. These may be system level pipes, sockets and the like, which are well known to a skilled person. The method comprises receiving,102, a graph. A node represents one of the software modules and an edge represents one of the communication channels with a data flow from a transmitting software module out of the software modules to a receiving software module out of said software modules. The node, representing a software module, serving as transmitting software module and as receiving software module at the same time relates to a predefined factor representing an expected ratio of a received amount of input data versus a produced amount of output data derived from the input data.

The method also comprises monitoring,104, for each software module, for selected resources—e.g., amount of RAM, number of CPUs, cores, threads, cores, co-processor(s), other accelerators, I/O rates, parallel threads per CPU, I/O rates etc.—a ratio of an amount of the resources consumed by the software module versus an available amount of the resource.

The method may further comprise monitoring,106, for each communication channel, a ratio of a bandwidth consumed by one of the communication channels versus an available bandwidth of the communication channel, and an amount of idle time of the communication channel, and traversing,108, for a software module in idle mode, the graph for identifying a source software module whose produced amount of output is below the amount of output needed by the software module that is in idle mode. Last but not least, the method comprises analyzing,110, a resource consumption of the identified source software module to identify a lacking amount of resource for the identified source software module. This way all the above-mentioned advantages may be experienced.

FIG. 2shows an example of a graph200useful as a general model for the currently proposed concept. The graph200comprises exemplary nodes202,204,206,208,210,212,214in the sense of the mathematical concept of a graph. In-between the nodes202, . . . ,214are links216,218,220,222,224,226, and228. The links may be interpreted as communication links or communication channels allowing a transfer of information between the nodes. The nodes may—in the context of this application—be interpreted as the software modules.

FIG. 3shows a block diagram of an embodiment of a system comprising a network300of elements. This may be viewed as an application of the graph concept to a real-life application302.

There may be software modules represented by the reference numbers304,306and308. Software module306may, e.g., represent a data storage, like a database. The communication channel312may transfer data from a sending portion of the software module306to a receiving portion of software module304. Software module304may represent a processing module304or a transactional module304, which may send—using a sending portion—data from the processing module304to the software module308, which may represent a user interface. The data may be sent using the communication channel310.

Although this sample network of software modules being represented by the nodes304,306,308has only two communication channels312and310, detecting, isolating and eliminating dynamic performance problems or bottlenecks may be quite difficult. This may also be implied by the feedback loop of the communication channel314from the user interface software module308to the transactional software module304.

In reality, the network of interdepending software modules may be quite bigger, comprising more nodes, i.e., software modules and more links, i.e., communication channels. However, the fundamental inventive concept can be illustrated using this simpler model.

In the current embodiment, it may be assumed that the processing software module304and the user interface software module occupy the same machine and communicate via IPC (inter-process communication, e.g., UNIX domain sockets). It may not be required that every software module is executed on a separate computer.

The proposed solution continuously monitors resources—as mentioned above—consumption for each node or software module and data flows to/from the nodes or software modules, some of which may only be transmitters, like the database306. Other software modules may only or mostly be receivers, e.g., the user interface software module308.

When watching the user interface (UI) module308and determining that it is waiting for data, one may also determine that the processing software module304is also waiting for data. From this status one can determine that the UI software module308and the processing software module304are waiting for data from the database (DB) software module306, which in turn cannot wait for data from any other component or software module because it is an endpoint of the graph300. Therefore, the DB software module306has a potential bottleneck. A further examination or metrics and an analysis may reveal that the disk I/O is the resource that is utilized in almost 100% of the cases. Hence, a recommendation is generated to take action to increase the I/O rate of the resource disk relating to DB software module306. A related message to an operator may look like this: “The DB seems to have a bottleneck component due to intensive I/O. It was detected that the second largest I/O consumer on the machine is a process called Apache (I/O utilization 10%). You may consider stopping it or limiting its resource if feasible or migrating it to another computer system.”

In another example related to the same embodiment, it may be determined that the UI software module308is waiting and also the DB software module306is mostly idle. From this, the direct conclusion is made that the processing software module304is a potential bottleneck. Thus, the DB software module306can produce data faster than the processing software module304can consume it, and/or the UI software module308can receive data faster than the processing software module304can transmit it. A resource usage analysis reveals that the processing software module304is competing from RAM resources with the UI software module308. The bottleneck identification system can then generate a message to an operator with recommendations to increase the amount of RAM or move the UI software module308or the processing software module304to another physical computer system. Based on these simplified examples and embodiments a skilled person can derive more complex scenarios.

FIG. 4shows an embodiment of the inventive bottleneck identification system400for detecting a bottleneck in a system comprising software modules linked with each other via communication channels. The bottleneck identification system comprises a reception unit402adapted for receiving a graph. Each node represents one of the software modules and an edge represents one of the communication channels with a data flow from a transmitting software module out of the software modules to a receiving software module out of the software modules. A node may represent a software module which serves as a transmitting software module as well as a receiving software module. Each node may relate to a predefined factor representing an expected ratio of a received amount of input data versus a produced amount of output data derived from said input data.

The bottleneck identification system400also comprises a monitoring unit404adapted for monitoring, for each software module, for selected resources a ratio of an amount of the resources consumed by the software module versus an available amount of the resources. The monitoring unit404is also adapted for monitoring, for each communication channel, a ratio of a bandwidth consumed by one of the communication channels versus an available bandwidth on the communication channel, and an amount of idle time of the communication channel. A traversing module406adapted for traversing, for a software module in idle mode, the graph for identifying a source software module whose produced amount of output is below the amount of output needed by the software module that is in idle mode to keep it busy. An analysis module408is adapted for analyzing a resource consumption of the identified source software module to identify a lacking amount of resource for the identified source software module.

Embodiments of the invention may be implemented together with virtually any type of computer, regardless of the platform being suitable for storing and/or executing program code.

As shown in the figure, computer system/server500is shown in the form of a general-purpose computing device. The components of computer system/server500may include, but are not limited to, one or more processors or processing units502, a system memory504, and a bus506that couples various system components including system memory504to the processor502. Bus506represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnects (PCI) bus. Computer system/server500typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer system/server500, and it includes both, volatile and non-volatile media, removable and non-removable media.

Program/utility514, having a set (at least one) of program modules516, may be stored in memory504by way of example, and not limitation, as well as an operating system, one or more application programs, other program modules, and program data. Each of the operating system, one or more application programs, other program modules, and program data or some combination thereof, may include an implementation of a networking environment. Program modules516generally carry out the functions and/or methodologies of embodiments of the invention as described herein.

The computer system/server500may also communicate with one or more external devices518such as a keyboard, a pointing device, a display520, etc.; one or more devices that enable a user to interact with computer system/server500; and/or any devices (e.g., network card, modem, etc.) that enable computer system/server500to communicate with one or more other computing devices. Such communication can occur via input/output (I/O) interfaces514. Still yet, computer system/server500may communicate with one or more networks such as a local area network (LAN), a general wide area network (WAN), and/or a public network (e.g., the Internet) via network adapter522. As depicted, network adapter522may communicate with the other components of computer system/server500via bus506. It should be understood that although not shown, other hardware and/or software components could be used in conjunction with computer system/server500. Examples, include, but are not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.

Additionally, the bottleneck identification system400for detecting a bottleneck in a system may be attached to the bus system506.