Previous Table of Contents Next


CHAPTER 7
MONITORS

That which is monitored improves.
—Source unknown

A monitor is a tool used to observe the activities on a system. In general, monitors observe the performance of systems, collect performance statistics, analyze the data, and display results. Some also identify problem areas and suggest remedies.

Monitors are used not only by performance analysts but also by programmers and systems managers. Some of the reasons to monitor a system are as follows:

  A system programmer may use a monitor to find the frequently used segments of the software and optimize their performance.
  A systems manager may use a monitor to measure resource utilizations and to find the performance bottleneck.
  A systems manager may also use a monitor to tune the system. The system parameters can be adjusted to improve the performance.
  A systems analyst may use a monitor to characterize the workload. The results may be used for capacity planning and for creating test workloads.
  A systems analyst may use a monitor to find model parameters, to validate models, and to develop inputs for models.

In summary, monitoring is the first and key step in performance measurements.

7.1 MONITOR TERMINOLOGY

This section describes some of the monitor-related terms that are frequently used.

  Event: A change in the system state is called an event. Examples of events are process context switching, beginning of seek on a disk, and arrival of a packet.
  Trace: A trace is a log of events usually including the time of the event, the type of event, and other important parameters associated with the event.
  Overhead: Most monitors slightly perturb the system operation. They may consume system resources, such as CPU or storage. For example, the data collected by the monitor may be recorded on the secondary storage. This consumption of system resources is called overhead. One of the goals of monitor design is to minimize the overhead. Sometimes, the term artifact is also used to denote the overhead.
  Domain: The set of activities observable by the monitor is its domain. For example, accounting logs record information about CPU time; number of disks, terminals, networks, and paging I/O’s; number of characters transferred among disks, terminals, networks, and paging device; and clasped time for each user session. These constitute the domain of the accounting logs.
  Input Rate: The maximum frequency of events that a monitor can correctly observe is called its input rate. Generally, two input rates are specified: burst mode and sustained. Burst-mode rate specifies the rate at which an event can occur for a short duration. It is higher than the sustained rate, which the monitor can tolerate for long durations.
  Resolution: The coarseness of the information observed is called the resolution. For example, a monitor may be able to record time only in units of 16 milliseconds. Similarly, the size of buckets used in a histogram may determine the resolution of the histogram.
  Input Width: The number of bits of information recorded on a event is called the input width. This, along with the input rate, determines the storage required to record the events.

7.2 MONITOR CLASSIFICATION

Monitors are classified based on a number of characteristics, such as the implementation level, trigger mechanism, and result displaying ability.

Depending upon the level at which a monitor is implemented, it is classified as a software monitor, hardware monitor, firmware monitor, or hybrid monitor. The hybrid is a combination of hardware, firmware, or software. This is the most common classification.

Depending upon the mechanism that triggers the monitor into action, a monitor may be classified as event driven or timer driven (sampling monitor). An event-driven monitor is activated only by the occurrence of certain events. Thus, there is no monitoring overhead if the event is rare. But if the event is frequent, it may cause too much overhead. The sampling monitor is activated at fixed time intervals by clock interrupts. Sampling monitors are ideal for observing frequent events. On activation, the monitor records device status registers and counters. The frequency of sampling is determined by the event frequency and the desired resolution.

Another way to classify monitors is according to their result displaying ability. On-line monitors display the system state either continuously or at frequent intervals. Batch monitors, on the other hand, collect data that can be analyzed later using a separate analysis program.

All three of the preceding classifications can be used together to characterize a monitor. For example, a particular monitor may be classified as a hybrid-sampling-batch monitor.

7.3 SOFTWARE MONITORS

Software monitors are used to monitor operating systems and higher level software such as networks and databases. At each activation, several instructions are executed, and therefore, they are suitable only if the input rate is low. For example, if the monitor executes 100 instructions per event, each activation would take 0.1 millisecond on a 1-MIPS machine. Thus, to limit the overhead to 1%, it should be activated at intervals of 10 milliseconds or more. That is, the input rate should be less than 100 events per second.

There are a few monitoring applications for which overhead is not an issue. For example, in an instruction-tracing monitor, every single-user instruction executed may be interrupted and followed by several hundred monitor instructions. This is acceptable if the increase in execution time does not have any impact on the path of execution or the instruction frequency. However, if the time between two successive instructions was being monitored, this type of monitor would not be appropriate.

Software monitors generally have lower input rates, lower resolutions, and higher overhead than hardware monitors. However, they have higher input widths and higher recording capacities than hardware monitors. They are easier to develop and easier to modify, if necessary.


Previous Table of Contents Next

Copyright © John Wiley & Sons, Inc.