PerformanceTuningGuideSQL 803405
PerformanceTuningGuideSQL 803405
PerformanceTuningGuideSQL 803405
SQL Server
Vista/Vantage 8.03.405 Version
Published by: Epicor Software Corporation 2000 Interchange Tower 600 S. Highway 169 Minneapolis, Minnesota 55426 2008 by Epicor Software Corporation. All rights reserved. Document Version May 2008 Epicor and Manufacturing Systems are registered trademarks of Epicor Software Corporation. Microsoft and MS-DOS are registered trademarks of Microsoft Corporation. Windows, Windows XP, and Windows 2000 are trademarks of Microsoft Corporation. Progress is a registered trademark of Progress Software Corporation. All other product names are copyright and registered trademarks/tradenames of their respective owners.
Table of Contents
Introduction .................................................................................................................................3 Stop and Restart AppServers .....................................................................................................3 Verify Mfgsys.pf File Parameters ...............................................................................................4 Update Schema Holder Settings ................................................................................................5
# Blocks in DB Buffer ....................................................................................................................................5 # Lock Table Entries .....................................................................................................................................5 Spin Locks ....................................................................................................................................................6 Background Writers ......................................................................................................................................6
Disable Hyperthreading ............................................................................................................11 Index Script for SQL Server 2005 .............................................................................................11
Verify the Index Script is Run ......................................................................................................................11
Create a Table View ...................................................................................................................12 Business Activity Query and SQL Issues ................................................................................12 Server Permissions and Review ..............................................................................................13 Network Bandwidth ...................................................................................................................13 Hardware Upgrades ..................................................................................................................14 Workstation Problems ..............................................................................................................14 Additional Performance Troubleshooting ...............................................................................15
System Troubleshooting .............................................................................................................................15 Application Troubleshooting .......................................................................................................................15
Introduction
This document contains a series of instructions that can help you improve the performance of your SQL database. Each set of instructions documents a potential performance tuning option you can use. Implement the options which best match the configuration of your system. Each operating system and specific configuration is different, so the results of these options will vary. Epicor recommends that you measure the performance benefits of these changes. To do this, time how long it takes to run a process before you use a performance option. Then after you implement the option, time the same process again. You should see a demonstratable savings in performance time. Be sure to record each change and why you made it. You then can review what you did later on. Write comments in your scripts and .pf files to document the changes. Remember that you can gain a lot of performance by just doing a few things. Usually adding memory and spreading the disk workload across as many disks as possible gives you the best performance gains. Always stop after you have accomplished enough; the more tuning you do, the smaller the return on your investment.
Vista/Vantage 8.03.405
Vista/Vantage 8.03.405
# Blocks in DB Buffer
For the Progress schema holder, you only need a 10000 value for the # Blocks in DB Buffer parameter. To change this parameter: 1. Go to your application server. 2. Click Start and navigate to the following program: Programs->Open Edge (10.0B or 10.1B)>Progress Explorer Tool 3. Expand the Databases folder to display MfgSys803. 4. Expand the MfgSys803 folder to display Configurations and DefaultConfiguration. 5. Right-click DefaultConfiguration. 6. From the context menu and select Properties. 7. Change the # Blocks in DB Buffer to a 10000 value. 8. Click OK.
Vista/Vantage 8.03.405
Spin Locks
Spin locks define the number of times a process tries to acquire a launch before it pauses. If the process cannot acquire the resource latch, it resets and attempts to acquire it again. This iterative process is called spinning. To adjust the spin locks: 1. Return to the DefaultConfiguration Properties window. If you need to navigate to this window, follow the instructions in the # Blocks in DB Buffer section. 2. Go to the Advanced section. 3. Increase the Spin Locks Retries value. Progress recommends a value of 20000 per processor. If you use a dual/dual core CPU, increase this value to 800000. 4. Click OK.
Background Writers
Background writers are not used by the Progress Explorer Tool for a SQL database. If you turn them off, you free up some resources on the server. 1. Return to the DefaultConfiguration Properties window. If you need to navigate to this window, follow the instructions in the # Blocks in DB Buffer section. 2. Go to the Background Writers section. 3. Locate the #APW value; set it to start at 0. 4. Clear the Auto Startup check box on the before-image writer. 5. Clear the Auto Startup check box on the after-image writer. 6. Click OK. These changes do not activate until the AppServers and the database are stopped and started within the Progress Explorer Tool. Review the previous Stop and Restart AppServers instructions to learn how to do this process.
Vista/Vantage 8.03.405
Database Preparation
1. Stop all the AppServers for the Mfgsys803 database. 2. Stop the Mfgsys803 database. 3. Click the Start button. Navigate to: Programs OpenEdge Proenv 4. At the Proenv> prompt, enter the following: prompt 5. Press Enter. 6. Change the directory to the database folder for Mfgsys803. To do this, enter: cd \epicor\mfgsys803\db 7. Truncate the bi file. To do this, enter: proutil mfgsyssh C truncate bi 8. Close the Proenv window.
Vista/Vantage 8.03.405
6. Select the Read Only check box. 7. Click Apply and then click OK.
Vista/Vantage 8.03.405
Vista/Vantage 8.03.405
Vista/Vantage 8.03.405
10
Disable Hyperthreading
Hyperthreading is not needed if SQL server is installed. You disable this feature through the BIOS on your computer. Before you disable hyperthreading, however, please review your server manual. The following instructions are only intended as a guide: 1. Reboot the server. 2. As you soon as you see an opening Windows video on your screen, press F2. 3. Select CPU Info. 4. Select Logical Processors. 5. To shut off hyperthreading, select the Disable check box next to the HyperThreading field. 6. Save the BIOS changes. 7. Restart the computer.
Vista/Vantage 8.03.405
11
Progress
ABS(OLUTE) ASC(II) INT(EGER) MAX(IMUM) MIN(IMUM)
Vista/Vantage 8.03.405
12
Network Bandwidth
Each network has a bandwidth that defines how much data can be transferred across it at the same time. If the network bandwidth is too small to handle the data that must be transferred, performance is reduced. This typically happens when too many users are logged into a single network segment. If you have slow network performance, either consider lowering the amount of network traffic or increasing the bandwidth of the network itself. Traditional network hubs are gradually being replaced by high-speed data switches; this hardware is slowly alleviating network bottlenecks over the Internet. To increase the bandwidth of your company network, however, consider adding multiple server network cards and automated load balancing to your overall network configuration. Note: Diagnosing a network bandwidth issue is difficult. If you are not comfortable working with the network, contact a professional network analyst. As a general rule, the Epicor client requires a bandwidth of 56 - 500 kilobytes per second (kbps). This requirement varies based on the volume of data that transfers between each client and the server. To calculate the amount of bandwidth you need, determine the worst kbps bandwidth throughput for each client and then divide that amount into the total network segment bandwidth. For example, if each client needs at least 1.5 mbps of bandwidth and the network has 100 mbps, the network segment should support 66 client machines. This calculation is only meant as a starting point for the maximum number of clients per network segment. It does not consider the media characteristics of your network, which could potentially affect the number of clients the network segment can support. For more information on this subject, review this web article: http://mediaproducts.gartner.com/reprints/juniper/vol3/article2/article2.html
Vista/Vantage 8.03.405
13
Hardware Upgrades
By default, SQL Sever self-tunes. When more hardware resources are added to the server, SQL automatically tunes itself to accomodate the new hardware.
Workstation Problems
If you experience workstation problems, like locking up and display issues, do the following: 1. Log out of Vista or Vantage. 2. Right-click the Start button. 3. From the context menu, select Explorer. 4. Navigate to this path: C:\Documents and Settings\All Users\Application Data\Epicor\Vantage or Vista 5. Delete all the version folders that exist below Vista or Vantage. 6. Log back into Vista or Vantage.
Vista/Vantage 8.03.405
14
System Troubleshooting
If the Microsoft XP firewall is active, it may slow performance. Test this firewall against other firewall options to discover which one reduces performance the least but still effectively protects your system. Frequent virus scans on the Mfgsysdata and the client folders slows performance. Schedule virus scans during off hours. Backing up the database during the day slows performance. Schedule database backups during off hours. Avoid directly accessing tables through ODBC or SQL Explorer. If you do this, records can lock-up. Avoid setting the DSN value to the wrong default isolation level within ODBC. If you do this, records can lock up.
Application Troubleshooting
Be sure to disable all schedules before you move from the training database to your live database. If you do not, two MRP processes run at the same time, slowing down performance. Epicor recommends that you do not run MRP processing during the work day. Schedule MRP processing during off hours. Be sure that your Business Activity Queries (BAQs) are properly written. If a BAQ pulls unnecessary data or a calculation is improperly constructed, each time this BAQ is run it slows performance. Avoid creating several Business Process Management (BPM) procedures that generate email messages at the same time (synchronously). If these procedures run frequently, performance is reduced. Instead, set up your BPM procedures to run asynchronously. Avoid activating too many change logs within the Business Activity Manager. Only run change logs for the specific fields you need. When too many logs are running, they slow performance. Performance slows when several large reports generate at the same time. To resolve this, move your report generation processes to separate AppServers. Likewise, when multiple applications run at the same time, performance slows. Try to only use the programs you need when you need them. Close them if they are no longer active.
Vista/Vantage 8.03.405
15