Performance Problems
Most performance problems stem from multiple causes. A complete performance analysis must include each item in the Diagnostic Hierarchy section below. But if you need to resolve a specific performance problem quickly, focus your attention on that area. The information in this troubleshooting section is designed to assist you in resolving a performance issue after first isolating which factors are influencing performance.
Use the procedures in this section if a Vector tool “hangs,” that is, your program seems to start but nothing happens. Other programs such as SQL display header information, but when you issue a command, nothing happens.
Flow Diagram for Troubleshooting Performance Problems
Use the following flow chart to identify and isolate a system performance problem:
Diagnose Logging System Problems
Use the following procedure to diagnose a DBMS server that is not responding due to logging system problems.
1. Check the logging system by issuing the following command at the operating system prompt to invoke the logstat utility:
Windows:
logstat | more
Linux:
logstat | more
2. If you are unable to start up logstat, the
recovery process has probably taken an exclusive lock and is in recovery. (See
Recovery Process Monitoring.)
Logstat Status Fields
The problem states and resolutions of logstat fields are described in the following table:
IMPORTANT! If the server is recovering a lengthy transaction, be aware that shutting down the server with iimonitor's "stop server" (or by killing processes at the operating system level) results in slower recovery. Allow the recovery to proceed normally. You can monitor the progress of the recovery with logstat and iimonitor or the ipm utility.
Many other normal states appear on the status line. For additional information on reading logstat output, see the Logstat section in the Command Reference.
How to Avoid Logfull Abort
To avoid logfull aborts, examine the transaction processing strategy errors that caused the log file to fill. Consider the following points:
• If transactions do many updates or are left open for a long time, you must either commit them more frequently or increase the size of the log file. If the log file size is increased, check the “percentage of logfile written” before a consistency point is taken. For details, see the ipm, logstat, or VDBA output.
• Avoid continuous transaction errors by:
– Setting autocommit on where applicable
– Avoiding application errors that are caused by beginning transactions before they get all the user input required or by failing to use Vector application timeout features. (Timeout features are discussed in the SQL Language Guide.)
• If you have taken the above precautions but still get log full/abort, the transaction log is sized too small for the types of transactions you need to process. Read the tips in the next section on choosing the correct transaction log file size.
• Use set log_trace to examine the size and type of log records being written to the log file.
Process of Resizing Transaction Logs
Resizing transaction logs involves these steps:
1. Determine whether the log requires resizing
2. Resize the transaction log file
3. Reestablish Dual Logging
Determine Whether a Log Requires Resizing
To determine whether a log requires resizing, use one of the following procedures.
Using VDBA’s Performance Monitor, start a monitoring session on the desired node:
1. Select the node in the left pane and click the Monitor toolbar button.
2. Select Log Information in the branch.
3. Click the Header tab in the right pane to display log usage.
Start the Interactive Performance Monitor utility (ipm).
1. Highlight the Log_info menu item and select the Select option.
2. Highlight the Header menu item and select the Select option.
3. The Log file Diagram shows the percentage use of the Transaction Log.
4. Exit the ipm program.
Find the current peak transaction load by using the logstat utility to monitor the amount of log file that is in use during your peak hours. This allows you to choose the correct size for your log file. Because requirements change, you must monitor the log file regularly.
1. Enter the logstat command.
2. Find the value under % of log file in use.
3. If the log file needs to be resized, select the new size.
Linux: Use mkrawlog to reconfigure a raw log file.
4. Shut down the installation by entering the ingstop command.
Resize the Transaction Log File
To resize the transaction file, follow these steps:
1. Shut down the Vector installation by entering the ingstop command.
2. Start the Configuration-By-Forms (cbf) or Configuration Manager (vcbf) utility.
a. Choose Transaction Log from the menu.
The file name is displayed along with the current size of the Transaction Log.
b. Choose Destroy.
When destroyed, the Transaction Log information table is emptied.
c. Select the Create option.
d. Enter the required Transaction Log file size in megabytes.
The transaction log is created.
3. Exit cbf or vcbf.
4. Restart the installation by entering the command ingstart.
IMPORTANT! Reconfiguring your log file destroys the current contents of the file and leaves an empty, reinitialized log file after the reconfiguration is complete. When Vector is shut down, all transactions are written to disk; therefore, to prevent inconsistent database problems, reconfigure the log file only after a successful installation shutdown procedure.
Reestablish Dual Logging
A failure in one of the two dual log files is most often symptomatic of hardware problems. In the event of such a failure, you must reestablish dual logging at the first opportunity.
To re-establish dual logging after a failure of one of the log files, follow these steps:
1. Shut down the installation.
2. Create a new log file in the location of the failed log.
3. Start the Configuration-By-Forms (cbf) or Configuration Manager (vcbf) utility.
4. Select dual transaction log.
5. Select Reformat.
This automatically determines which of the log files is valid and copies the contents of the valid log to the newly created log file. After the copy is complete, both log files are marked valid. Dual logging is reestablished.
6. Restart the installation with the ingstart command.
7. Check that both log files are enabled by using Configuration-By-Forms (cbf) or Configuration Manager (vcbf).