Performance Toolkit Readme
Microsoft Transaction Server Performance Toolkit Beta Readme

The Microsoft Transaction Server Performance Toolkit Beta provides sample applications and documentation that you can use to tune Microsoft Transaction Server (MTS) application performance.

For updates to the MTS Performance Toolkit Beta, check ftp://ftp.microsoft.com/bussys/viper/Unsup-ed/MTSPTool.

The MTS Performance Toolkit Beta contains the following elements:

•	Debit/Credit Sample Application

•	Console single node sample client

•	Console multiple node client

•	Graphical user interface multiple node client

•	SQL Server 6.5 scripts for sample data

Important  Complete documentation for the MTS Performance Toolkit Beta is installed in HTML format in the \Documents sub-directory of your Toolkit directory. To browse this documentation, launch the MTS Performance Toolkit Home Page (default.htm).

This Readme lists software requirements, installation instructions, late-breaking feature information, and information on reporting bugs or problems with the product. This Readme also briefly describes the contents of the MTS Performance Toolkit Beta.

•	MTS Performance Toolkit Beta Overview

•	Software Requirements

•	Setting Up

•	Using the Documentation

•	Client Applications

•	Client Command Line Arguments

•	Known Limitatations

•	Reporting Feedback


software requirements, Beta Performance Toolkit
Software Requirements

The following software is required to install and build the MTS Performance Toolkit Beta:

•	Microsoft® Windows NT® version 4.0

•	Microsoft® Transaction Server (MTS) version 2.0

•	Microsoft® SQL Server with Service Pack 3

•	Microsoft® Visual C++® version 5.0

•	Microsoft® Visual Basic® version 5.0

Important: In order to obtain the same performance numbers as in our tests, you must have MTS Service Pack 1, which is available as part of the Windows NT Server version 4.0 Pack 4.

The following data access technologies are required to run the sample application in the toolkit. These components can be obtained from http://microsoft.com or through Microsoft® Visual Studio® version 6.0.

•	Microsoft® ActiveX Data Objects® version 2.0

•	Microsoft® OLE DB® version 2.0

•	Microsoft® OLE DB SQL Server Provider® for OLE DB version 2.0

•	Microsoft® Remote Data Objects ® version 2.0

•	Microsoft® ODBC ® version 2.0

See the Setting Up topic in the HTML documentation for complete details for building sample projects and running the different clients.


MTS Performance Toolkit Beta Overview

The performance of your application is an integral factor in the design, development, and deployment of your application. To help you test and tune MTS application performance, we provide the MTS Performance Toolkit Beta. This toolkit contains a testing harness and accompanying documentation that describes how to tune distributed applications through configuration and code optimization.

How to Use the MTS Performance Toolkit Beta

The MTS Performance Toolkit Beta enables you to:

•	Reproduce the test results for our experiments

•	Extrapolate from our workload on our configuration to your workload on your configuration

•	Test the performance of your current configuration

•	Better understand the semantics of performance tuning

•	Infer hypotheses for tuning your own applications

•	Model and implement your own performance test harness

•	Modify the toolkit to model your own application performance.

Reproduce Test Results

We've run a series of tests demonstrating how to use the tuning process to find and solve bottlenecks. In addition, we've compared the cost of using different technologies and configurations. You can review our test results in the documentation, but in order to thoroughly understand the tuning process, you can try and reproduce the same results on your configuration.

Extrapolate Workload on Different Configurations

The documentation for the Toolkit Beta describes different client loads on different configurations. You can extrapolate from our data and tests to test and find the right workload for your application on different configurations.

Hardware Configuration Verification

Once you install the MTS Performance Toolkit Beta, run the single and multiple node clients on the hardware configuration that you are using to deploy your application. If the performance of the Beta Toolkit is noticeably worse on your configuration, you can infer that your hardware is not optimally configured. You can then go through the tuning process to fix hardware bottlenecks. The tuning process is an iterative one, and often turns up new bottlenecks (hardware and software) that may be obscured by more obvious performance problems.

Tuning Training

In addition, you can review the performance experiments to see how we used the tuning process and the Performance Toolkit to tune our Debit/Credit application. In reviewing our transaction mix and data access method results, you can extrapolate what works best for your application.

Testing Harness Model

Finally, the Beta Toolkit demonstrates how to write and use a testing harness for single and multiple node clients. You can use the harness as a model for developing performance tests for your application.

Modify Toolkit Beta Applications

You can use our sample application and clients in your performance testing by modifying the code in the Toolkit Beta. See the documentation for more information.

What the MTS Performance Toolkit Beta Does Not Provide

The MTS Performance Toolkit Beta does not provide an out-of-the-box performance tuning tool that you can run against your application. Nor can we guarantee that it provides performance data specific to your application. That would be impossible considering the wide variety of implementation choices developers face. Instead, the Toolkit demonstrates common performance bottlenecks in a simple MTS application and how to fix those bottlenecks to reach target performance. The MTS Performance Toolkit Beta enables you to learn how to tune performance and infer what changes are necessary for your application.


Setting Up the Beta Performance Toolkit
Setting Up

The MTS Performance Toolkit Beta self-extracting executable automatically installs the sample application and clients, and sets up the database tables for the Debit/Credit Sample application. By default, the Toolkit Beta installs in \Program files\Mts\MtsPerf.

To browse complete documentation for compiling and extending the Performance Toolkit, launch the Performance Toolkit Home Page (default.htm) page in the \MTSPerf\Documents directory of your Toolkit installation folder.

The following table describes the directory structure set up by the MTS Performance Toolkit Beta installation.

Sub-Directory Name	Description
bstats	Tracks statistics gathered during the test
ChangeBank	Sets up index row locking
Common	Shared build files for sample projects
DCBankATLADO	MTS server component using ATL and ADO
DCBankATLADO_Lux	MTS server component using ATL, ADO and OLEDB
DCBankATLADOCPlus	MTS server component using ATL, ADO and Visual C++
DCBankATLADOState	MTS server component using ATL, ADO, and storing state
DCBankATLODBC	MTS server component using ATL and ODBC
DCBankATLODBCCom	MTS server component using ATL, ODBC, and COM
DCBankATLODBCState	MTS server component using ATL, ODBC, and storing state
DCBankATLOLEDB	MTS server component using ATL and OLE DB
DCBankATLOLEDB_Lux	MTS server component using ATL and OLEDB
DCBankATLOLEDBState	MTS server component using ATL, OLEDB, and storing state
DCBankVBADO	MTS server component using VB and ADO
DCBankVBODBC	MTS server component using VB and ODBC
DCBankVBRDO	MTS server component using VB and RDO
DCBankVoid	MTS server component that doesn't return anything
Delpak	Uninstall program
Documents	HTML pages providing background information and detailed description of the toolkit. Winhelp for the clients.
DrvClient	Driver components that instantiate server components.
Equalizer	Displays statistics for the graphical user multiple node client.
inc	Project include files. You must include this in your Visual C++ include path in order to compile the Debit/Credit components.
lib	Project libraries
loader	Loads scenarios for the multiple node client
MTClient	Single node client
MTLoadSim	Text-based version of the multiple node client
MTLoadSimDriver	Multiple node client driver
MTLoadSimUI	Multiple node client user interface
package	Binaries and MTS packages
regbank	Registers packages
Scripts	SQL Server 6.5 scripts to set up the Debit/Credit database and the tables to store multiple node client scenarios.


Using the Documentation

Documentation for the MTS Performance Toolkit Beta is installed into the \MTSPerf\Documents folder by the Toolkit setup program. To browse the documentation, launch the MTS Performance Toolkit Beta Home Page (default.htm), which provides an overview of the toolkit and links to topics.


MTClient and Performance Testing
Client Applications

The MTS Performance Toolkit Beta provides single and multiple node clients. The single node client (MTClient) is a console application that runs the test components and server components on a single node. The multiple node client allows you to run your driver components and server components on a remote node.

Both client applications test the performance of Microsoft Transaction Server (MTS) components in the Debit/Credit sample application. The purpose of a client application in performance testing is to generate a workload against the components being tested. This load should be controllable and repeatable, so that performance can be studied accurately.

In general, when testing performance, run multiple clients and to specify such factors such as:

•	the number of clients

•	how long a client runs

•	which interface methods called by a client

•	the think (the delay between when a client receives one reply and when it submits the next request)

•	the desired response time

Client applications should also track the following data:

•	how many method calls they made during the test interval

•	how many method calls succeeded

•	how many method calls met the response time.

Finally, collect the statistics from each client to get total statistics for the components.

Writing clients to do all that, however, takes time. You can use either client to generate a similar workload without writing your own applications.

Single Node Client

The single node client (MTClient) simulates multiple client applications by creating multiple threads. Each thread creates one COM component, obtains an IBank interface pointer on that component, and calls a single IBank interface method repeatedly.

MTClient does not use any think time; It simply calls the method as quickly as possible in a tight loop. The loop is divided into three phases:

•	rampup

•	work time

•	rampdown.

MTClient generates a full load during all three phasesThe purpose of rampup is to allow the system to reach a steady state. Rampdown is used so that the client threads that finish their work time first continue to generate a steady load while other threads are still measuring performance. Statistics are maintained during steady state.

After rampdown, MTClient exits the loop, releases all the COM components, displays statistics, and exits.

MTClient is a console application that takes command-line argument specifying which class of COM component to test, how many instances of the component to run, which interface method to call, how long to run the test, and the required response time. For detailed help information on invoking MTClient, type “MTCLIENT /?” at the command prompt.

MTClient compiles a number of statistics, including the number of calls per second (referred to as transactions per second, or TPS), the percentage of the calls that succeeded, and the percentage that met the specified response time. It writes these statistics both to the console and to a log file called Client.out.

MTClient is designed to be flexible. It can drive any COM component that supports the IBank interface. IBank is a simple test interface whose methods provide a variety of simple data access operations – reads, writes, and debit\credit.

You can use the test components provided, or you can write your own components that support the IBank interface. The MTClient sample includes the Interface Description Language (IDL) description for the IBank interface, located in the file Bank.idl. It also includes the related files generated by the Microsoft Interface Description Language (MIDL) compiler (Bank.h, Bank_i.c, and Bank.tlb). Using these files you can implement a new component using any COM-enabled language or tool. In particular, to implement a component in Microsoft Visual Basic, add a reference to the Bank type library to your Visual Basic project and then use the Visual Basic implements statement.

MTClient is designed to be reusable. It is written to call IBank methods, but you can easily modify it to use any COM interface.

To modify MT Client for other COM interfaces, follow these steps:

1.	Find all of the IBank specific code in the MTClient source files by doing a case-insensitive search on the string “Bank”.

1.	Change the code to work with the new interface.

1.	Rebuild MTClient and use it to test components that provide your new interface.

See the documentation for more information about using the single node client.

Multiple Node Client

The multiple node client tracks the same statistics as the single node client, but allows much greater flexibility for setting up test scenarios. The MTS Performance Toolkit Beta provides a graphical and text version of the multiple node client. The text version (MTSLoadSim) takes command-line parameters to run scenarios while the graphical client (MTSLoadSimUI) presents a user interface and real-time graphs of test results.

Like the single node client, the multiple node client can drive any COM component that supports the IBank interface. Unlike MTClient, you can divide the load for your test among more than drivers on separate nodes. The multiple node client supports running the graphical user interface, driver components, and server components on different machines. Along with creating a more realistic testing environment for distributed applications, this architecture permits a greater client load than the single node client.

The MTS Explorer and Windows NT Task Manager can help you track the statistics for both the graphical and text-based multiple client. The MTS Explorer identifies the number of instances for a particular object. You can track thread count and other statistics using the Windows NT Performance Monitor as well.

The graphical user interface charts scenario results in the Benchmark Control Console, dynamically updating the statistics as the tests are run. The graph displays statistics such as:

•	transaction per second rate compared against target transactions

•	number of drivers

•	number of clients

•	transaction processed

•	time elapsed

See the documentation for more information about using the multiple node client.


MTClient Command-line Arguments
Client Command-line Arguments

For the single node client and the console multiple client, you must use command-line arguments to set up tests. You can enter these arguments in any order using the following format.

c:\>MTCLIENT -qualifier<argument>

c:\>MTSLOADSIM -qualifier<argument>

In order to obtain a list of the client command-line arguments, use the console help by typing the following command:

mtclient /?

mtsloadsim /?


Known Limitations for Beta Performance Toolkit
Known Limitations

The following sections contain known limitations for the MTS Performance Toolkit Beta.

Performance Data Subject to Change

Any performance data contained in the Toolkit Beta documentation is subject to change with future revisions of products.

MTS Performance Toolkit Beta Not Supported

The MTS Performance Toolkit Beta is not supported. We do, however, solicit your feedback, bug reports, and any ideas you have regarding enhancing or improving our sample applications. See the Reporting Problems and Bugs topic for more information.


Reporting Problems and Bugs (Readme)
Reporting Feedback

When reporting feedback, please include the following information in email to the MTS Performance Toolkit Beta alias (mtsptool@microsoft.com):

•	The error number and description, or the enhancement or new component you would like us to provide.

•	The software that you're using and their version numbers.

•	Any relevant Windows NT event-log messages. (Microsoft Transaction Server reports errors in the Windows NT event log. If an error occurs, please check the Windows NT event log).

•	The configuration for your client computer, if applicable.

•	The configuration for your server computer.

•	The components that are causing the problem.

•	The language used in the component (Microsoft Visual Basic or Microsoft Visual C++).

•	The data access method used.

•	The ODBC version, if applicable.

•	The name and version of the resource manager.

•	Any third-party components, resource dispensers, or resource managers that are causing problems.

•	If possible, the line or lines of code where the problem occurs.

Note: Updates to the MTS Performance Toolkit Beta will be posted to ftp://ftp.microsoft.com/bussys/viper/Unsup-ed/.