Chapter 6: Database Access Tuning
These server properties affect the performance of the EAServer transaction manager and components that use server-managed transactions.
Make sure you have configured a transaction timeout if your application uses EJB bean-managed transactions, or if you use components of other types that keep transactions open across method calls. The transaction timeout setting specifies the maximum duration of an EAServer transaction. The default configuration allows transactions to remain open indefinitely. A finite timeout allows transactions to be closed when the client crashes or hangs during an open transaction.
You can set the timeout for components on the Resources tab in the EAServer Manager Component Properties dialog box. If you are using jagtool, the property name is com.sybase.jaguar.component.tx_timeout.
You can set a default timeout at the server level by setting server property com.sybase.jaguar.server.tx_timeout (set on the Advanced tab in the Server Properties dialog box). EAServer determines the transaction timeout period as follows:
If the component transaction timeout property is set to a nonzero value, this is the timeout period.
Otherwise, the server transaction timeout property is checked (the server transaction timeout is specified by the com.sybase.jaguar.server.tx_timeout property). If the server transaction timeout is non-zero, this specifies the timeout period.
Otherwise, the component Instance Timeout value is checked. A nonzero value specifies the transaction timeout period as well as the instance timeout period.
Otherwise, the transaction timeout is infinite.
For both the component and server setting, the timeout period is configured in seconds, with 0 indicating no timeout. The default for a new server is 0. When specifying timeouts, Sybase recommends a resolution of 5 seconds. Network transport time is included in the measured timeout period. You may need to configure a larger timeout period if clients connect over slow networks.
EAServer checks for timeouts after each method returns. Your component will not be deactivated in the middle of an invocation because of a timeout. When a transaction times out, the next method invocation in the client-side ORB throws the CORBA::TRANSACTION_ROLLEDBACK system exception.
The transaction manager uses an internal table to track the status of pending transactions. You can tune the size of the table by setting the server property com.sybase.jaguar.server.jta.tranTableSize. The default is 1024.
This table provides cached storage of the transaction information. If the number of pending transactions exceeds the table size, new memory is allocated and deallocated as needed. For best performance, set the value to at least one-half the maximum number of simultaneous transactions expected in your application.
If you see unexpected deadlock or slow database throughput when executing transactional components, check for the following setting in the properties of the component that initiates the transaction:
This setting causes the transaction to run with serializable isolation level, which can cause deadlocks or degraded performance for any component that uses JDBC connections, other than EJB 1.0 session beans. For components that are not EJB 1.0 session beans, delete this setting using the Advanced tab in the component properties dialog box. This setting was erroneously used as a default for new components in earlier versions of EAServer.
If the component is an EJB 1.0 session bean, verify that the Transaction Isolation Level setting on the Transactions tab matches your application requirements.
|Copyright © 2005. Sybase Inc. All rights reserved.|