REAL-TIME SYSTEM EXCEPTION MONITORING TOOL

Information

  • Patent Application
  • 20080263556
  • Publication Number
    20080263556
  • Date Filed
    April 17, 2007
    17 years ago
  • Date Published
    October 23, 2008
    16 years ago
Abstract
Techniques for monitoring resources of a computer system are provided. A monitoring process collects and reports utilization data for one or more resources of a computer system, such as CPU, memory, disk I/O, and network I/O. Instead of reporting just an average of the collected data over a period of time (e.g., 10 seconds), the monitoring process at least reports individually collected resource utilization values. If one or more of the utilization values exceed specified thresholds for the respective resources, then an alert may be generated. In one approach, the monitoring process is made a real-time priority process in the computer system to ensure that the memory used by the monitoring process is not swapped out of memory. Also, being a real-time priority process ensures that the monitoring process obtains a CPU in order collect resource utilization data even when the computer system is in a starvation mode.
Description
FIELD OF THE INVENTION

The present invention relates to monitoring resources of a computer system.


BACKGROUND

A computer system manages access to multiple resources of the system, such as a CPU, memory, a storage device (referred to hereinafter as a disk), and a network. There are many computer monitoring tools available that monitor such resources. Monitoring tools gather information about the availability (or lack thereof) of resources and typically report such information to users or administrators. However, existing monitoring tools suffer from significant drawbacks. One of those drawbacks is described in the context of Oracle Corporation's Real Application Cluster (“RAC”).


A RAC comprises a single database that is shared by multiple instances of a database server (referred to as database instances). In such a configuration, each separate database instance reads data from and writes data to the same disk space, but each database instance maintains its own separate shared memory, which is only available to the processes of the corresponding database instance.


Currently, a RAC database instance may be evicted from a cluster because the database instance is not responding to other databases instances in the cluster either through network messaging or disk I/O. A possible reason for why this may happen is that the evicted instance has a relatively high CPU usage level. If CPU usage is relatively high, then a monitoring tool is unable to obtain the CPU in order to determine that the disk and network are not responding to other instances in the cluster. After the database instance is evicted from the cluster, there is not enough information about the machine on which the evicted instance is running because current monitoring tools (either inside or outside the database) are unable to capture the data during the period that the CPU is maxed out (e.g., 99% usage). Eviction of a database instance may also occur when other resources of the corresponding machine are heavily utilized or unresponsive, such as disk I/O, network I/O, and memory. Without the necessary information, an administrator of the cluster is unable to quickly and accurately determine why the database instance was evicted.


Based on the foregoing, there is a need to provide a computer system monitoring tool that will report exceptional events before resources of the computer system become unavailable or unresponsive. The monitoring tool should also provide an accurate description of the state of the computer system so that an analysis of the gathered statistics will yield the reason(s) why the computer system failed or became (at least temporarily) unresponsive.


The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.





BRIEF DESCRIPTION OF THE DRAWINGS

The present invention is illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which like reference numerals refer to similar elements and in which:



FIG. 1 is a graph that illustrates exceptional events with respect to a resource in a computer system, according to an embodiment of the invention;



FIG. 2 is a flow diagram that illustrates how a resource in a computer system may be monitored, according to an embodiment of the invention; and



FIG. 3 is a block diagram of a computer system upon which embodiments of the invention may be implemented.





DETAILED DESCRIPTION

In the following description, for the purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, that the present invention may be practiced without these specific details. For example, although embodiments of the invention are described in the context of a database cluster, other contexts also apply, such as grid computing, a single node database system, or a desktop computer. In other instances, well-known structures and devices are shown in block diagram form in order to avoid unnecessarily obscuring the present invention.


General Overview

Techniques for monitoring the resources of a computer system are provided. In one approach, a monitoring tool comprises a monitoring process that is given a real-time priority in the computer system. This enables the monitoring process to gather utilization data of one or more resources even when the CPU usage is relatively high and the monitoring process would have otherwise been replaced by a system process or user process with higher priority.


A monitoring process collects (or samples) data at regular intervals. In a related approach, instead of reporting average values of a particular set of collected data, the monitoring tool reports exceptional events, such as when one or more collected values exceeds a particular threshold for a resource. Exceptional events may be reported directly to a user of the computer system and/or to other processes associated with the monitoring process that may make predictions and take subsequent actions to prevent a decrease in performance of the computer system.


Although reference is made to a single monitoring process, “a monitoring process” may include multiple monitoring processes. For example, there may be a separate monitoring process designated for collecting utilization data for each resource. Therefore, there may be a first monitoring process for collecting utilization data for disk I/O, a second monitoring process for collecting utilization data for memory, a third monitoring process for collecting utilization data for a CPU, and a fourth monitoring process for collecting utilization data for network I/O.


As used hereinafter, “utilization data” is one or more values indicating the utilization, availability, and/or responsiveness of a resource. Unless otherwise specified, reference to “utilization” may also include availability and/or responsiveness. “Utilization value” refers to a single value (of the utilization data) that represents the utilization of a resource at a particular instant. An “instant” is a point in time when the monitoring process collects a utilization value.


Types of Resources

There are many resources of a computer system that may be monitored by a monitoring tool. Examples of resources include, but are not limited to, CPU, memory, disk I/O, and network I/O.


Although memory is referred to as a single resource, memory may be divided into multiple memory areas and each memory area may be treated as a separate resource. For example, the memory of a computer system may comprise a private memory area and a shared memory area. Each memory area may be further divided into multiple memory areas. In an embodiment of the invention, one or more monitoring processes may treat each of the different memory areas as a separate resource by collecting utilization data for each of the different memory areas.


Also, although network I/O appears to refer to a single resource, network I/O may refer to multiple resources that are each treated separately. For example, a separate queue may be maintained for each node in a network to which the computer system is connected.


Measuring Resource Utilization

Utilization data may be gathered every second, or at other intervals. Embodiments of the invention are not limited to any particular way of determining or measuring resource utilization and/or availability. The utilization and/or availability of a resource may be measured in multiple ways. For example, CPU usage may be measured by determining the length of a run queue. Each element in a run queue indicates a process that is waiting for the CPU.


As another example, disk I/O may be measured by determining the length of a disk queue. Each element in a disk queue indicates a read or write request to a file system or a database associated with the computer system.


As another example, network I/O may be measured by determining the response time of a ping to a node in the network. Additionally or alternatively, a queue may be maintained by the computer system for each node in the network. Network I/O may then be measured by determining the length of the queue. Each element in a network node queue indicates a pending (e.g., unanswered) request for data or services from the corresponding node in the network.


Additionally or alternatively, for each queue discussed above, resource utilization may be measured by how long an element (e.g., the oldest element) in the queue has been waiting for the corresponding resource. Such a measurement indicates responsiveness but may also be used as a measurement of resource utilization. Responsiveness of a resource may indicate that the resource is heavily utilized or that the resource has failed and is unable to support any requests for the resource.


Reporting Exceptional Data

According to an embodiment of the invention, rather then reporting only an average of the collected utilization data, “exceptional events” are reported (either in addition to the average or as an alternative thereto). In an embodiment, an “exceptional event” occurs when the utilization of a particular resource exceeds a threshold for that resource at a particular instant.


In a related embodiment, an exceptional event may occur when utilization of a particular resource exceeds a threshold for that resource at multiple instants over a period of time. For example, an exceptional event may be CPU usage of 98% or above for 8 out of 10 consecutive instants.



FIG. 1 is a graph 100 that illustrates exceptional events with respect to a resource in a computer system, according to an embodiment of the invention. Specifically, graph 100 illustrates utilization levels of a CPU in the computer system. An exceptional event 102 occurs at time instant 10 (where utilization is 98%) and an exceptional event 104 occurs at time instants 19 and 20 (where utilization is 98% and 99%, respectively). The interval between each time instant may be, e.g., one second or one millisecond.


In an embodiment, if an exceptional event occurs, then an alert is issued to warn of the severity and possible impact of the exceptional event. The alert may trigger an automatic response by another process associated with the monitoring process. For example, if CPU usage exceeds 98%, then another process denies requests for system resources from other nodes in the network to which the computer system is connected. Additionally or alternatively, the alert may issue immediately to an administrator or user so that the administrator or user may take steps (as they deem appropriate) to prevent significant negative effects (that may result from the high resource utilization) from occurring.


A threshold value may be specified in many ways and based on different factors. For example, a threshold value for CPU usage may be specified by a user or administrator of the computer system. Alternatively or additionally, the threshold value may be a default value that is set by the monitoring tool.


A threshold value may be based on the median utilization value of a particular resource over a period of time. Alternatively, a threshold value may be based on a number of standard deviations away from the average utilization value of the particular resource over a period of time.


Real-Time Priority Monitoring Process

According to an embodiment of the invention, a monitoring process is made to have a real-time priority in the computer system. More than one process that is executing in the computer system may have a real-time priority. A “real-time priority process” is a process that obtains the CPU whenever the process requests the CPU. Also, the memory used by a real-time priority process is pinned in memory so that the memory is never swapped or paged out. As a real-time priority process, it is guaranteed that the monitoring process will be scheduled and will obtain the CPU at its scheduled intervals in order to collect utilization data and store the utilization data for further analysis. Thus, the monitoring process may operate under many starvation situations. For example, if CPU usage is 99%, then, rather than being denied access to the CPU, the monitoring process obtains access to the CPU when the monitoring process is scheduled. The monitoring process is lightweight so that it uses a relatively small amount of memory and requires relatively few CPU cycles to collect a utilization value.


Analysis of Utilization Data

In an embodiment, utilization data that is collected is sent to a logging system. The logging system includes an interpretive engine that attempts root cause analysis and suggests appropriate actions, such as calling a workload manager or connection tool to throttle incoming requests. Thus, the logging system provides a type of feedback control.


The interpretive engine may also comprise a historical perspective and a predictor of the probability of certain events which may destabilize the computer system (and/or an associated RAC cluster), result in hangs, or cause other severe performance issues. For example, if an increase in the length of the disk queue by a factor of 10 in a few seconds tends to precede a database instance being evicted, then an alert is generated when that increase occurs and requests for access to the disk are throttled.


Flow Diagram


FIG. 2 is a flow diagram that illustrates how a resource in a computer system may be monitored, according to an embodiment of the invention. At step 202, a monitoring process is made to have real-time priority in the computer system. At step 204, the monitoring process collects utilization values that each indicates a utilization or responsiveness level, of the resource, at a different instant. At step 206, the utilization values are compared to a threshold value that is associated with the resource. At step 208, it is determined, either by the monitoring process or by another process, that one or more utilization values exceed the threshold value. After step 208, one or more of the following actions may be performed. For example, at step 210A, an alert is issued, either to a user (e.g., administrator) of the computer system or to another process associated with the monitoring process that collects the utilization values. The other process may perform some actions in response to the alert, such as denying all or a subset of subsequent requests to the resource. As another example, at step 210B, one or more suggestions are generated for a user (e.g., administrator). The suggestions are of possible actions that the user should take to avoid a decrease in the performance of the computer system. Examples of suggestions may be to restart the computer system and to deny incoming requests for system resources from all or certain nodes in the network.


Contrast with Current Monitoring Tools

Current monitoring tools only collect average data over a period of time (e.g., every 5-10 seconds or more). Current monitoring tools are not concerned with exceptional events, i.e., outliers. If they were concerned with exceptional events, then those exceptional events are difficult to capture when only statistical averages are reported. Averaging data effectively removes outliers. To illustrate, consider FIG. 1 above. If a traditional monitoring tool collected the utilization data illustrated in graph 100 and reported the average of five consecutive data values, then the traditional monitoring tool would report at least six values:


4.8, which represents the average of the data collected at times 1-5;


45.2, which represents the average of the data collected at times 6-10;


20.8, which represents the average of the data collected at times 11-15;


54, which represents the average of the data collected at times 16-20;


30.2, which represents the average of the data collected at times 21-25; and


5, which represents the average of the data collected at times 26-30.


Therefore, the outliers (i.e., at time instants 10, 19, and 20) are removed when the collected values are averaged. Based on the average values, the traditional monitoring tool would not initiate any types alerts.


Thus, one of the significant differences that distinguish embodiments of the invention from other monitoring tools is the statistical perspective. Embodiments of the invention allow a monitoring tool to identify and report exceptional events while current monitoring tools only calculate and report statistical averages.


Furthermore, because current monitoring tools do not have real-time priority, it is difficult, if not impossible, for current monitoring tools to collect exceptional events when CPU usage is relatively high or memory is unavailable for the monitoring tool. As a result, a gap arises in the collected data. It is thus difficult to determine why, e.g., a database instance is evicted from a cluster. Data indicating one or more exceptional events is always missing during a memory or CPU starvation time period because the monitoring process that performs the collection is unable to obtain the necessary resource(s) in order to collect utilization data for any resources.


One reason why embodiments of the invention are not intuitive is because it is common practice for database designers and skilled software developers to avoid causing non-essential processes to have real-time priorities in a computer system. Many designers and developers consider monitoring processes as non-essential processes, which is why, traditionally, monitoring processes have been made a relatively low priority.


Hardware Overview


FIG. 3 is a block diagram that illustrates a computer system 300 upon which an embodiment of the invention may be implemented. Computer system 300 includes a bus 302 or other communication mechanism for communicating information, and a processor 304 coupled with bus 302 for processing information. Computer system 300 also includes a main memory 306, such as a random access memory (RAM) or other dynamic storage device, coupled to bus 302 for storing information and instructions to be executed by processor 304. Main memory 306 also may be used for storing temporary variables or other intermediate information during execution of instructions to be executed by processor 304. Computer system 300 further includes a read only memory (ROM) 308 or other static storage device coupled to bus 302 for storing static information and instructions for processor 304. A storage device 310, such as a magnetic disk or optical disk, is provided and coupled to bus 302 for storing information and instructions.


Computer system 300 may be coupled via bus 302 to a display 312, such as a cathode ray tube (CRT), for displaying information to a computer user. An input device 314, including alphanumeric and other keys, is coupled to bus 302 for communicating information and command selections to processor 304. Another type of user input device is cursor control 316, such as a mouse, a trackball, or cursor direction keys for communicating direction information and command selections to processor 304 and for controlling cursor movement on display 312. This input device typically has two degrees of freedom in two axes, a first axis (e.g., x) and a second axis (e.g., y), that allows the device to specify positions in a plane.


The invention is related to the use of computer system 300 for implementing the techniques described herein. According to one embodiment of the invention, those techniques are performed by computer system 300 in response to processor 304 executing one or more sequences of one or more instructions contained in main memory 306. Such instructions may be read into main memory 306 from another machine-readable medium, such as storage device 310. Execution of the sequences of instructions contained in main memory 306 causes processor 304 to perform the process steps described herein. In alternative embodiments, hard-wired circuitry may be used in place of or in combination with software instructions to implement the invention. Thus, embodiments of the invention are not limited to any specific combination of hardware circuitry and software.


The term “machine-readable medium” as used herein refers to any medium that participates in providing data that causes a machine to operation in a specific fashion. In an embodiment implemented using computer system 300, various machine-readable media are involved, for example, in providing instructions to processor 304 for execution. Such a medium may take many forms, including but not limited to, non-volatile media, volatile media, and transmission media. Non-volatile media includes, for example, optical or magnetic disks, such as storage device 310. Volatile media includes dynamic memory, such as main memory 306. Transmission media includes coaxial cables, copper wire and fiber optics, including the wires that comprise bus 302. Transmission media can also take the form of acoustic or light waves, such as those generated during radio-wave and infra-red data communications. All such media must be tangible to enable the instructions carried by the media to be detected by a physical mechanism that reads the instructions into a machine.


Common forms of machine-readable media include, for example, a floppy disk, a flexible disk, hard disk, magnetic tape, or any other magnetic medium, a CD-ROM, any other optical medium, punchcards, papertape, any other physical medium with patterns of holes, a RAM, a PROM, and EPROM, a FLASH-EPROM, any other memory chip or cartridge, a carrier wave as described hereinafter, or any other medium from which a computer can read.


Various forms of machine-readable media may be involved in carrying one or more sequences of one or more instructions to processor 304 for execution. For example, the instructions may initially be carried on a magnetic disk of a remote computer. The remote computer can load the instructions into its dynamic memory and send the instructions over a telephone line using a modem. A modem local to computer system 300 can receive the data on the telephone line and use an infra-red transmitter to convert the data to an infra-red signal. An infra-red detector can receive the data carried in the infra-red signal and appropriate circuitry can place the data on bus 302. Bus 302 carries the data to main memory 306, from which processor 304 retrieves and executes the instructions. The instructions received by main memory 306 may optionally be stored on storage device 310 either before or after execution by processor 304.


Computer system 300 also includes a communication interface 318 coupled to bus 302. Communication interface 318 provides a two-way data communication coupling to a network link 320 that is connected to a local network 322. For example, communication interface 318 may be an integrated services digital network (ISDN) card or a modem to provide a data communication connection to a corresponding type of telephone line. As another example, communication interface 318 may be a local area network (LAN) card to provide a data communication connection to a compatible LAN. Wireless links may also be implemented. In any such implementation, communication interface 318 sends and receives electrical, electromagnetic or optical signals that carry digital data streams representing various types of information.


Network link 320 typically provides data communication through one or more networks to other data devices. For example, network link 320 may provide a connection through local network 322 to a host computer 324 or to data equipment operated by an Internet Service Provider (ISP) 326. ISP 326 in turn provides data communication services through the world wide packet data communication network now commonly referred to as the “Internet” 328. Local network 322 and Internet 328 both use electrical, electromagnetic or optical signals that carry digital data streams. The signals through the various networks and the signals on network link 320 and through communication interface 318, which carry the digital data to and from computer system 300, are exemplary forms of carrier waves transporting the information.


Computer system 300 can send messages and receive data, including program code, through the network(s), network link 320 and communication interface 318. In the Internet example, a server 330 might transmit a requested code for an application program through Internet 328, ISP 326, local network 322 and communication interface 318.


The received code may be executed by processor 304 as it is received, and/or stored in storage device 310, or other non-volatile storage for later execution. In this manner, computer system 300 may obtain application code in the form of a carrier wave.


In the foregoing specification, embodiments of the invention have been described with reference to numerous specific details that may vary from implementation to implementation. Thus, the sole and exclusive indicator of what is the invention, and is intended by the applicants to be the invention, is the set of claims that issue from this application, in the specific form in which such claims issue, including any subsequent correction. Any definitions expressly set forth herein for terms contained in such claims shall govern the meaning of such terms as used in the claims. Hence, no limitation, element, property, feature, advantage or attribute that is not expressly recited in a claim should limit the scope of such claim in any way. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.

Claims
  • 1. A method for monitoring a computer system, comprising: establishing a monitoring process as a real-time priority process in the computer system;the monitoring process collecting a plurality of values, wherein each value of the plurality of values indicates a measure of utilization or responsiveness of a resource in the computer system at a different instant; andbased at least in part on the plurality of values, determining that one or more exceptional events occurred; andin response to determining that the one or more exceptional events occurred, performing one or more specified actions.
  • 2. The method of claim 1, wherein the memory used by the monitoring process is never swapped out of memory while the computer system is operating.
  • 3. The method of claim 1, wherein the monitoring process obtains a CPU of the computer system whenever the monitoring process requests the CPU.
  • 4. The method of claim 1, wherein: a threshold value is associated with the resource; andwherein an exceptional event occurs when one or more values of the plurality of values exceeds the threshold value.
  • 5. The method of claim 1, wherein performing one or more specified actions includes issuing an alert to a user of the computer system.
  • 6. The method of claim 1, wherein: the computer system is connected to a network; andperforming one or more specified actions includes denying one or more requests from other nodes in the network for one or more resources of the computer system.
  • 7. The method of claim 1, wherein performing one or more specified actions includes issuing an alert to one or more other processes, of the computer system, that perform one or more other actions in response to the alert.
  • 8. The method of claim 7, wherein the alert is issued to an interpretive engine, wherein the interpretive engine predicts, based on the alert and previous alerts, a probability that the one or more exceptional events may cause performance problems for the computer system.
  • 9. The method of claim 1, wherein performing one or more specified actions includes generating one or more suggestions of possible actions that should be taken by a user of the computer system to avoid a decrease in performance of the computer system.
  • 10. The method of claim 1, wherein the resource is one of the CPU, a memory, a network queue, or a disk queue.
  • 11. The method of claim 1, wherein the computer system is a database instance in a cluster of a plurality of database instances that collectively manage a single database.
  • 12. The method of claim 1, further comprising, for each other resource in the computer system: the monitoring collecting a second plurality of values, wherein each value of the second plurality of values indicate a measure of utilization or responsiveness of said each other resource at a different instant, wherein a different threshold value is associated with said each other resource; anddetermining whether one or more other exceptional events occurred, wherein each of the one or more exceptional events occur when one or more values of the set of values exceeds the different threshold value; andperforming one or more of the specified actions if the one or more other exceptional events occurred.
  • 13. A machine-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 1.
  • 14. A machine-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 2.
  • 15. A machine-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 3.
  • 16. A machine-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 4.
  • 17. A machine-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 5.
  • 18. A machine-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 6.
  • 19. A machine-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 7.
  • 20. A machine-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 8.
  • 21. A machine-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 9.
  • 22. A machine-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 10.
  • 23. A machine-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 11.
  • 24. A machine-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform the method recited in claim 12.