KEEP MTS FROM WEIGHING DOWN YOUR NETWORK
Microsoft Transaction Server (MTS) is a remarkable product. To appreciate MTS's functionality, consider how the complexity of an application increases as the number of users it must support increases. An application that supports hundreds, thousands, or tens of thousands of users must include support for multithreading, database connection management, and load balancing. MTS makes these necessary features easy to add to applications, so product developers can focus on their applications' core functionality without worrying about scalability. (For an overview of MTS, see Ken Spencer and Charles Caison, "Administering MTS," March 1998.)
However, if you don't configure MTS properly, it can overburden your system resources. Fortunately, you can adjust a few MTS settings and plan your MTS implementation to optimize MTS performance on your Windows NT server.
Adjust MTS Settings
MTS comes as part of the Microsoft Windows NT 4.0 Option Pack, and it runs as part of the Microsoft Management Console (MMC). You administer, distribute, install, deploy, and test MTS applications through the MTS Explorer. The MTS Explorer's easy-to-use interface is similar to the NT Explorer interface: MTS Explorer displays a tree view (the hierarchy pane) on the left and the contents of the item you select in the hierarchy pane on the right. After you install the components that make up an MTS application, you can adjust the MTS Explorer's View and Log settings to minimize the components' use of system resources.
View settings. MTS reports information about running components through transaction windows. The Transaction List window displays information about the current transactions of components on a specific computer. The Transaction Statistics window displays current and cumulative information about transactions that MTS's distributed transaction coordinator (DTC) services. The Trace Messages window reports warnings and errors and displays other informational messages about the status of various MTS activities. You can adjust settings for all three transaction windows in the My Computer Properties dialog box under the Computers folder in the MTS Explorer. Icons in the Computers folder represent the computers that you can configure packages on. (A package is a group of MTS components that run as an application in one process.) Right-click the My Computer icon, select Properties, then select the Advanced tab, as Screen 1 shows.
The Display Refresh property specifies the rate at which MTS updates the transaction windows. Display Refresh rates can range from 1 second to 20 seconds. The Transactions Shown property specifies the length of time that a transaction is active before its information appears in the transaction windows. If you select Very Old, the transaction windows display information only about transactions that have been active for 5 minutes. If you select New + Old, the transaction windows display information about all transactions that have been active for more than 1 second. The Trace property specifies the types of trace messages MTS sends to the Trace Messages window. You can set the Trace slider to send no trace information (the slider's left position), all trace information (its right position), or specific types of trace information (only error traces; both error and warning traces; or error, warning, and informational traces).
Each of these settings relates to an auxiliary MTS activity that increases MTS's use of system resources. Monitoring a process in MTS degrades the performance of that process, because frequent monitor updates increase administrative overhead on running transactions. MTS must divide its time and resources between performing auxiliary activities and running the components that make up your MTS applications. Therefore, if you monitor a process less, you can expect better performance (but less-current information in the transaction windows). For example, when you move the Display Refresh slider to the left, you tell MTS to refresh the transaction windows less often, which frees more MTS time and processing power for your applications.
By adjusting the View settings, you can reduce MTS stress on the network and increase MTS performance, especially when components run on one server and MTS reports information to another server. To get the highest level of performance from MTS, set Display Refresh to Infrequently, Transactions Shown to Very Old, and Trace to Less. These settings will focus MTS resources on running your applications, rather than collecting and displaying status information.
Log settings. The size of the MTS DTC log file also affects MTS's performance. You set the log file size using the Capacity slider in Screen 1. The larger the log file, the more transactions MTS can run concurrently. The fact that MTS runs transactions concurrently can be a performance benefit, but your server can run only a limited number of simultaneous transactions efficiently. The maximum size of the MTS DTC log file is 512MB on NT and 64MB on Windows 95. By setting the Log Size to 5MB or less, you can prevent MTS from overburdening your system and maximize your system's performance. If you want to save log information for an extended period, you can back up the file to tape or write it to a database.
Options. After you adjust the settings on the Advanced tab, select the Options tab. The Transaction Timeout property on the Options tab tells MTS how much time to let transactions run before terminating them. You want MTS to terminate a transaction if a problem causes the transaction to stop responding. Because MTS can roll back transactions, MTS can terminate transactions gracefully through code that uses MTS-specific calls. Your developers need to include MTS-specific calls in your applications to ensure that the applications perform well.
Changing the Transaction Timeout property doesn't enhance application performance under most conditions, but it helps ensure that your applications continue to perform by terminating transactions that stop responding. Transaction Timeout values can range from 0 to 3600 seconds (1 hour). The default setting of 60 seconds is satisfactory for most applications, but if your transactions are operation-intensive and require 30 seconds to 45 seconds to execute, you need to increase the Transaction Timeout value. Identify the transaction that takes the most time to execute and multiply its execution time by three. Set the Transaction Timeout value to that number.
Shut Down Server Processes
Sometimes you need to manually shut down an MTS application. For example, if an application becomes unstable, processes might malfunction or stop responding. Often, you can remedy the problem by forcing a shutdown of the offending processes. You also need to shut down an MTS application if you want to move a component DLL from one folder to another and run the DLL from the new location, or if a developer rebuilds a component and wants to copy the new version over the old version.
In MTS 2.0, you can shut down an individual MTS process running on a specific computer by opening the Packages Installed folder under the icon for the computer you want to stop the process on. Right-click the package you want to stop processes for, and select Shut Down from the context menu.
If you don't use MTS 2.0, or if more than one package has become unstable, you can shut down all the server's processes at once. Shutting down all of a server's processes terminates its active MTS transactions, resets the MTS applications, and recovers server resources. Within the MTS Explorer hierarchy pane, select the computer you want to shut down processes for, and select Shut Down Server Processes from the Action menu, as Screen 2 shows. You can also shut down server processes from the command line: Navigate to your server's system32 folder, which NT usually stores at C:\winnt\system32, and type
mtxstop
You will receive a message stating that the application server processes are stopping.
After you stop the MTS processes, you can run your client applications as usual. You don't need to manually restart the processes you stop; your client application will automatically restart them.
Refresh Server Component Information
The NT Registry and a data store called the MTS Catalog store information about MTS components. MTS uses this information to activate and run the components. Some component information appears in both places. If a piece of information that MTS stores in both places changes in one place but not the other, the application associated with the component will malfunction.
Some applications, such as Visual Basic (VB), can rewrite Registry information for an MTS component. For example, when a developer updates and rebuilds a component, VB rewrites component information to the Registry but not to the MTS Catalog.
If your component's Registry information becomes inaccurate, you must refresh it. You can assume that you don't need to refresh component information if your MTS application works properly. However, if an application begins to malfunction after a developer has altered its components, you need to refresh the components' Registry information.
You can refresh a component's Registry information from the MTS Explorer, the command line, or the VB add-in that comes as an optional MTS component in the Option Pack. To refresh the settings from the MTS Explorer, open the Computers folder in the MTS hierarchy pane. Select the computer that you want to refresh components on, and select Refresh All Components from the Action menu.
To refresh settings from the command line, open a command prompt and navigate to your system's MTS installation folder (usually C:\Program Files\Mts), as Screen 3 shows. Type
mtxrereg
on the command line. MTS will display a message confirming that it has refreshed the components registered on your computer.
To refresh component settings through the VB add-in, you must install the add-in, then select Transaction Server AddIn for VB 5.0 from the list of add-ins within the VB integrated development environment. The Transaction Server add-in will automatically refresh your MTS components when you rebuild them.
Prev. page  
[1]
2
next page