Selective profiler for use with transaction processing applications

A server system suitable for processing transactions includes transaction processing means to process requests issued by client systems. A transaction profiler records information regarding transactions processed by the server. Profiled transactions are selected for inclusion in a cumulative database according to a selection criteria. The transaction processor may be an HTTP server, a file server, or a database server. The profiler may be enabled by the processing means just before processing a request and disabled upon completion. In one embodiment, the transaction profiler is configured to calculate a transaction response time as the difference between the time the transaction processing means enables the profiling means and the time the transaction processing means disables the profiling means. In this embodiment, the selection criteria includes a minimum transaction response time wherein only transaction profiles indicating a response time in excess of the minimum transaction time are included in the cumulative database.

BACKGROUND

1. Field of the Present Invention

The present invention is in the field of data processing systems, and more particularly in data processing systems that are extensively used to process transactions.

2. History of Related Art

Many data processing applications can be characterized as transaction processing applications. A conventional web server, for example, services transactions in the form of HTTP requests. The server detects and receives requests, takes appropriate action to respond to received requests, and returns some form of response to the requestor. Other transaction processing applications include data base servers and file servers.

In the context of data processing applications, monitoring the performance or efficiency of transaction processing applications is desirable to detect problems that may prevent transactions from being processed in a timely fashion. Typically, transaction monitoring is achieved by aggregating statistics for a large number of transactions and then averaging the statistics based on the collected data to determine, for example, the response time of a typical transaction. This form of monitoring is not suitable, however, in cases where the number of transactions “of interest” from a performance perspective is relatively small. In such cases, the relatively large number of uninteresting transactions may tend to skew the data such that any meaningful information regarding interesting transactions is obscured or lost. It would be desirable to implement a system and method for monitoring the performance of a transaction processing application in a way that enabled the user to focus on transactions of most interest, such as transactions that take a very long time to complete, even if the number of such transactions is relatively small.

SUMMARY OF THE INVENTION

The identified objective is achieved by a server system, server code, and server method suitable for processing transactions according to the present invention including transaction processing means to process requests issued by client systems. A transaction profiler records information regarding transactions processed by the server. Profiled transactions are selected for inclusion in a cumulative database according to a selection criteria. The transaction processor may be an HTTP server, a file server, or a database server. The profiler may be enabled by the processing means just before processing a request and disabled upon completion. In one embodiment, the transaction profiler is configured to calculate a transaction response time as the difference between the time the transaction processing means enables the profiling means and the time the transaction processing means disables the profiling means. In this embodiment, the selection criteria includes a minimum transaction response time wherein only transaction profiles indicating a response time in excess of the minimum transaction time are included in the cumulative database.

While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that the drawings and detailed description presented herein are not intended to limit the invention to the particular embodiment disclosed, but on the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the present invention as defined by the appended claims.

DETAILED DESCRIPTION OF THE INVENTION

The invention is generally concerned with collecting statistics relevant to the performance of a transaction processing system. More specifically, the invention is a system and method for selectively profiling processed transactions. The system includes functionality enabling a user to select or filter the transactions of interest based on one or more criteria of interest. By enabling a user to selectively choose the transactions to be profiled, the invention enables the user to gain greater insight into the types of problems a transaction processing system might exhibit.

Referring now toFIG. 1, selected elements of a transaction processing system100according to one embodiment of the present invention are depicted. In the depicted embodiment, system100includes a transaction processing server system102and a plurality of transaction requesters or clients106-108. Server system102and clients106-108are interconnected via a network104, which may represent an Ethernet or other local area network (LAN). In other implementations, network104may represent a wide area network (WAN) such as the Internet.

The present invention is primarily directed at transaction processing applications. InFIG. 1, transaction processing associated with system100is illustrated by arrows110-112, which represent transaction requests initiated by clients106-108respectively, and arrows120-122, which represent the corresponding responses generated by server system102and transmitted to clients106-108respectively. Transaction requests110-112can be simple requests (e.g., a Web request initiated when a user enters a web site on its browser) or complex requests (e.g., multi-dimensioned data queries). Server system102is configured to detect transaction requests110-112, process each of the requests, generate transaction responses120-122, and send the responses back to the appropriate requester. Server system102as contemplated herein may include elements of commercially distributed servers including, as examples, a transaction-based e-server such as the Web Sphere server application from IBM Corporation, or a traditional web server such as the widely implemented Apache HTTP server from the Apache Software Foundation. It will be appreciated that the description of system100provided herein encompasses substantially all forms of transaction processing server applications.

Portions of the present invention may be implemented as a set or sequence of computer executable instructions (computer software or computer code) stored on a computer readable medium (storage). The medium may be a persistent storage medium such as a hard disk, CD, magnetic tape, or DVD. During execution, portions of the code may also reside in volatile medium such as a system memory (DRAM) and/or cache memory (SRAM). Referring now toFIG. 2, selected software components of server system102according to an embodiment of the present invention are depicted. In the depicted embodiment, server system102includes an operating system202, a server application204, and an application profiler210. Operating system202is most likely a Unix-based or Unix derivative operating system such as Linux or AIX although, in other embodiments, alternative operating systems including the Windows® family of operating systems from Microsoft Corporation may be used.

Server application204represents the software code providing the system or systems on which it is installed with its basic server functionality. As stated previously, server application204is intended to represent any of a variety of transaction based server types including web servers, files servers, and database servers. For purposes of illustrating the present invention, server application204is presumed to be a web server application (also sometimes referred to as an HTTP server application).

Profiler210is a special purpose application designed to provide statistical insight into the performance of server application204. Profiler210preferably includes code designed to maintain a database of information indicative of the performance of server application204. Referring toFIG. 3, a conceptual representation of an exemplary database300maintained by profiler210is depicted. In the depicted embodiment, database300includes a plurality of entries301where each entry301corresponds to a transaction that was processed by server application204. Each entry301includes data for one or more parameters associated with the corresponding transaction. In the depicted embodiment, the parameters that are profiled or monitored include a transaction identifier (ID)304, a time in value306, a data requested parameter308, a time out parameter310, and a response parameter312. AlthoughFIG. 3illustrates these particular parameters explicitly, it will be appreciated that many other parameters associated with a transaction might be profiled as well. The source of each transaction request, for example, might be maintained as a parameter in database300.

The depicted implementation of database300is suitable for profiling applications that emphasize the transaction response time as a parameter of significant interest. In such applications, tracking the response time is achieved by recording, for each transaction, a beginning time (time in306) and ending time (time out310) and calculating the response time312as the difference between the two. The data requested parameter308, which indicates the amount of data required to respond to the request, might be monitored as a basis for profiling “like” transactions (i.e., data requested parameter308may be used, for example, as a basis for filtering requests that request approximately the same quantity of data).

Someone wishing to verify that server application204is performing adequately would most likely wish to profile the response times for a large number of transactions. Anecdotal evidence suggests, however, that it is not uncommon to encounter a server application204that produces adequate response times for a large majority of the transactions that it handles. For such applications, cumulating data for a large number of transactions, the vast majority of which exhibit acceptable response times, tends to “drown” out the relatively few transactions that exhibit unacceptable response times. In many on-demand applications, however, it is precisely the very few slow transactions that are of most interest. Imagine an on-line stock trading server application, for example, that guarantees order confirmation with a specified window that is presumably quite short. In a server application of this type, substantially every transaction must be processed in the specified time window or customers will quickly subscribe with a more reliable provider.

The present invention addresses the need to perform selective transaction profiling so that the profiled transaction database is filtered to contain only information regarding the most important transactions (e.g., transactions that fail to meet a specified response time). According to the present invention, server application204includes code for enabling and disabling profiler210. With such code, server application204may enable profiler210just prior to initiating a transaction processing sequence and disable profiler210just after the transaction processing sequence is complete. In this way, the server application204can determine the response time for the application. In addition, profiler210is configured to store transaction profiles into a temporary buffer initially. After a transaction is completed, profiler210determines whether the transaction profile should be incorporated into the cumulative transaction profile database (exemplified by database300ofFIG. 3). Profiler210determines which transactions to accumulate and which transactions to discard based upon a specified criteria such as whether the transaction exhibits adequate response times. The specified criteria is most likely a user specified criteria such as a user specified response time threshold.

Referring toFIG. 5, selected code from server application204and profiler210is depicted to illustrate additional details of an embodiment of the present invention. The depicted code is written in pseudo-code for illustrative purposes. In the depicted implementation, server application204cooperates with profiler210to selectively profile transactions processed by server application204. As illustrated inFIG. 5, server application204includes only two lines of code that are necessary to implement the selective profiling functionality. Specifically, server application204includes a line (501) of code to enable profiler210and a line (503) of code to disable profiler210. Lines501and503are preferably located immediately preceding and immediately after the portion of server application204that performs the actual transaction processing (represented inFIG. 5by line502). In this implementation, a Boolean variable (ProfileTrans) is defined to indicate the state of profiler210. Just prior to processing a transaction, server application204sets the ProfileTrans variable to TRUE. After setting ProfileTrans, server application204begins to process the current transaction (such as by calling a Process Transaction subroutine or module in line502). The Process Transaction module preferably interrupts, triggers, or otherwise informs profiler210that processing of a new transaction has been initiated.

If profiler210determines (line504) that server application210is processing a transaction and has set the ProfileTrans variable, profiler210then sets (line505) the value of a TimeIn variable to the current time. Thereafter, the depicted implementation of profiler210monitors (line506) the ProfileTrans variable for a change in state and stores transaction information (the transaction profile) into a temporary storage buffer. The transaction information collected by profiler210and stored into the temporary buffer is implementation specific, but may include information such as the amount of data requested, the identity of requested date (e.g., filename), an identity of the request (e.g., IP address), and so forth. In this implementation, server application204is presumed to clear or reset the ProfileTrans variable upon completing a transaction servicing sequence.

When profiler210detects a change in the state of the ProfileTrans variable, thereby indicating that server application204has processed a transaction, profiler210records (line507) the time in the TimeOut variable and calculates (line508) the transaction time (TransTime) as the difference between the Timein and TimeOut. The transaction time is incorporated into the transaction profile in the temporary buffer. Profiler210is configured to accumulate transaction profiles selectively, based upon specified filtering criteria.

In one implementation, transaction profiles are accumulated based upon their corresponding transaction times. In this implementation, profiler210determines (line509) whether the transaction time for a particular transaction exceeds a threshold value, which is preferably alterable by the user. If the transaction time exceeds the specified threshold, the depicted embodiment of profiler210preserves the corresponding transaction profile by copying (line510) the profile from the temporary buffer to a cumulative buffer. In this manner, the cumulative storage buffer is reserved for transactions that are of interest to the user, most likely because these transactions exhibit some performance or other characteristic that is atypical and undesirable.

The illustrative computer code ofFIG. 5, when executed, performs an embodiment of a more generalized method400of selectively profiling data processing transactions represented by the flow diagram ofFIG. 4. In the depicted embodiment of method400, a system such as server system102ofFIG. 1is monitored (block402) for transaction activity. Upon detecting a transaction (block404), a profiler is enabled and a temporary buffer is opened (block406). The time is recorded (block408) and stored as the start time for the transaction. The transaction is then processed (block410) by the server system and the transaction profile is stored in the temporary buffer. Following completion of the transaction processing, the profiler is disabled (block412) and the time is recorded (block413) and stored as the end time. The transaction time is computed (block414) and stored in the transaction profile in the temporary buffer.

To determine whether the current transaction profile will be included into the transaction profile database, a profiler parameter of interest is compared (block415) to a threshold value. The parameter of interest enables the user to specify which transactions the user wants to include in the profile database. Selection can be based on any parameter or set of parameters that a profiler is able to track including, as examples, the origin of a request, the size and location of the data requested, the transaction processing time, the time the request was initiated, and so forth.

If the values of the specified parameters match (block416), the transaction profile is copied from the temporary buffer and stored (block418) to the cumulative buffer, which serves as the profiled transaction database. If the parameter values for the current transaction do not match the criteria specified by the user, the transaction profile is not incorporated into the cumulative database. The temporary buffer is then cleared (block420) regardless of whether the transaction profile was stored in the cumulative database. Method400thus provides a flexible mechanism for obtaining insight into the performance characteristics of a transaction processing server and for discovering performance issues that may occur on a relatively infrequent basis, but which are concerns nevertheless.

It will be apparent to those skilled in the art having the benefit of this disclosure that the present invention contemplates a mechanism for selectively profiling transactions of a transaction processing application. It is understood that the form of the invention shown and described in the detailed description and the drawings are to be taken merely as presently preferred examples. It is intended that the following claims be interpreted broadly to embrace all the variations of the preferred embodiments disclosed.