Epicor 9.05 Performance Tuning Guide - SQL
Epicor 9.05 Performance Tuning Guide - SQL
05
Performance Tuning Guide -
SQL
9.05.701
Disclaimer
This document is for informational purposes only and is subject to change without notice. This document and its
contents, including the viewpoints, dates and functional content expressed herein are believed to be accurate as of its
date of publication. However, Epicor Software Corporation makes no guarantee, representations or warranties with
regard to the enclosed information and specifically disclaims any applicable implied warranties, such as fitness for a
particular purpose, merchantability, satisfactory quality or reasonable skill and care. As each user of Epicor software is
likely to be unique in their requirements in the use of such software and their business processes, users of this document
are always advised to discuss the content of this document with their Epicor account manager. All information contained
herein is subject to change without notice and changes to this document since printing and other important information
about the software product are made or published in release notes, and you are urged to obtain the current release
notes for the software product. We welcome user comments and reserve the right to revise this publication and/or
make improvements or changes to the products or programs described in this publication at any time, without notice.
The usage of any Epicor software shall be pursuant to an Epicor end user license agreement and the performance of
any consulting services by Epicor personnel shall be pursuant to Epicor's standard services terms and conditions. Usage
of the solution(s) described in this document with other Epicor software or third party products may require the purchase
of licenses for such other products. Where any software is expressed to be compliant with local laws or requirements
in this document, such compliance is not a warranty and is based solely on Epicor's current understanding of such laws
and requirements. All laws and requirements are subject to varying interpretations as well as to change and accordingly
Epicor cannot guarantee that the software will be compliant and up to date with such changes. All statements of
platform and product compatibility in this document shall be considered individually in relation to the products referred
to in the relevant statement, i.e., where any Epicor software is stated to be compatible with one product and also
stated to be compatible with another product, it should not be interpreted that such Epicor software is compatible
with both of the products running at the same time on the same platform or environment. Additionally platform or
product compatibility may require the application of Epicor or third-party updates, patches and/or service packs and
Epicor has no responsibility for compatibility issues which may be caused by updates, patches and/or service packs
released by third parties after the date of publication of this document. Epicor® is a registered trademark and/or
trademark of Epicor Software Corporation in the United States, certain other countries and/or the EU. All other
trademarks mentioned are the property of their respective owners. Copyright © Epicor Software Corporation 2012.
All rights reserved. No part of this publication may be reproduced in any form without the prior written consent of
Epicor Software Corporation.
9.05.701
Revision: December 20, 2012 2:37 p.m.
Total pages: 21
sys.ditaval
Performance Tuning Guide - SQL Contents
Contents
Introduction............................................................................................................................4
Stop and Restart AppServers.................................................................................................5
Verify .pf File Parameters.......................................................................................................7
.pf Parameters List..................................................................................................................8
Set the Schema Holder to Read Only..................................................................................11
Database Preparation.....................................................................................................................................11
Define the Files as Read Only.........................................................................................................................11
Edit the .pf File...............................................................................................................................................12
Server Configuration File Recap......................................................................................................................12
Hyperthreading.....................................................................................................................13
Create a Table View.............................................................................................................14
Business Activity Query and SQL Issues..............................................................................15
Server Permissions and Review...........................................................................................16
Network Bandwidth.............................................................................................................17
Hardware Upgrades.............................................................................................................18
SQL Server Best Practices.....................................................................................................19
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 demonstrable 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.
Important This guide is intended for use with Epicor 9.05 or later.
Throughout these instructions, you are frequently asked to stop and restart your AppServers. You must do this
to activate your performance tuning changes.
Follow these instructions each time you are asked to stop and restart your AppServers:
1. From the desktop, click Start and navigate to the following program: Programs->Open
Edge(10.2A)->Progress Explorer Tool
Important If you have a more recent Progress installation, you launch the Management Console
instead. Launch this program and then expand the AppServer node. You then follow similar steps
for stopping and restarting the AppServers.
2. The Progress Explorer Tool displays. Review the left pane. A yellow gear labeled Progress Explorer appears;
below this icon either localhost or the server physical name display.
4. Within the localhost Login window, enter your User Name and Password.
5. Click OK.
7. Each database contains three AppServers; locate the three AppServers for your database. For example:
Epicor905, Epicor905ProcessServer, and Epicor905TaskAgent
8. Right click on each AppServer. From the context menu, select Stop. Stop the AppServers in this order:
a. Epicor905ProcessServer
b. Epicor905TaskAgent
c. Epicor905
10. When they each stop, you must start them again. To do this, right click on each AppServer. From the context
menu, select Start. Restart the AppServers in the reverse order:
a. Epicor905
b. Epicor905TaskAgent
c. Epicor905ProcessServer
The .pf file contains the parameters for the application database. Before you do the following steps, be sure you
know which .pf file is run with your Epicor application.
For a SQL database, a .pf file controls the client connection to the database. The first line if this file must be
correctly set up. You enter different parameters depending on your version of OpenEdge.
Tip Some example .pf files include Mfgsys.pf, MfgsysTCP.pf, MfgTrain.pf, MfgTrainTCP.pf, MfgTest.pf,
MfgTestTCP.pf, MfgPilot.pf, and MfgPilotTCP.pf.
Follow these instructions to make sure the .pf file is correctly set up:
4. From the context menu, select Edit. Review the first line of code within the .pf file.
-Mm 10240 -mmax 65534 -Bt 40960 -s 8000 -yy 1970 -stsh 31 -inp 32000 -tok 4000 -ttmarshal 5 -TB
31 -TM 32 -D 500 -l 1000 -tmpbsize 8 -rereadnolock -lkwtmo 180
-T "C:\EpicorData"
-db "C:\Epicor905\db\newdb\mfgsyssh"
-db Epicor905 -dt MSS -ld mfgsys -Dsrv
PRGRS_CONNECT,DSN=Epicor905,TXN_ISOLATION,1,PRGRS_NATIVE_LOCKWAIT,30000,PRGRS_NOWAIT_OVERRIDE,1
5. If any of these parameters are missing, enter them in the first line.
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.
The following table contains parameters you can modify to help improve the Epicor ERP AppServer performance.
The information in this table assumes the server machine has enough processing power and RAM to support
these values. Typically you will receive best performance when the AppServer and database server run on the
same server and the AppServer agent has a shared memory connection to the database server.
-Bt 40960
Max=50,000 number of blocks. Default is 10.
Blocks
An integer that specifies the number of blocks in the buffer for temporary tables. Use
Buffer Size for Temporary Tables (-Bt) to specify the size of the buffer pool for
blocks/records from the temporary table. OpenEdge uses the value you specify for
temporary
Databases used during the session the same way it uses Blocks in Database Buffers (-B)
for permanent databases.
As Epicor 9.05 relies heavily on temp-tables, a higher value of -Bt will improve the
appserver agent's performance. If the value of -Bt is not enough to hold the buffers in
the temp-table then the overflow data is written to temporary files whose names start
with "Dbi". You will find these files in the directory specified by -T parameter. Having
a larger value speeds up the processing because the appserver agent does not have to
do expensive disk I/O to the Dbi files. 1024 should be a good value, but if you consistently
see large Dbi file sizes and you have enough RAM to spare, play with a higher -Bt value.
Progress KB # 20339 and 20850 are good reference for this parameter.
-tmpbsize 8 n
Used together with -Bt parameter.
Refer to Progress KB# 20399
Possible values are 1 and 8,which set block sizes of 1024 and 8192 respectively. Examples:
• -tmpbsize 1
• -tmpbsize 8
The default value is 1. Values other than 1 and 8 will be accepted at start-up, but will
be silently reset to either 1 or 8. When -tmpbsize is set to 1, the temporary tables
-TB 31 Blocks
The block size in kilobytes, to allocate when sorting records for reports and when
rebuilding indexes. The default block size is 2K but can be reset anywhere from 1KB to
31KB.
Use Speed Sort (-TB) primarily to improve sort performance, particularly during index
rebuild Operations. If you increase the block size beyond 2KB, Progress sorts records
faster but uses more memory and disk space in the process. If system memory is severely
limited, you might actually choose to lower the block size.
Sort space is allocated in the SRT file, a temporary session file having a system-generated
unique name with the prefix srt. Progress uses the SRT file to store session-compile
modules and as temporary work space during sorting (including rebuilding indexes). Use
-TB to set the SRT file block size-the increments by which the SRT file grows.
If you must use un-indexed field sorts (such as the sorts in work files), the -TB and -TM
options speed up the sorting process. The -TB option controls the size of the blocks
Progress sets aside for sorting.
-TM 32 Blocks
The number of blocks or streams to be simultaneously merged during the sort process.
Use Merge Number (-TM) to increase the speed of the merge phase of the sort process
(at the cost of increased temporary memory usage). See also the description of the Speed
Sort (-TB) startup parameter.
-D 500 n
The number of compiled procedure directory entries.
Use Directory Size (-D) to change the number of compiled procedure directory entries.
Each compiled procedure executed during an OpenEdge session requires a directory
entry. A compiled procedure can be a session-compiled version of a procedure or a
precompiled r-code version. When Progress creates a session-compiled version of a
procedure and there is no available space in the directory, it discards the oldest inactive
compilation of a procedure. The next time the discarded procedure is run, Progress must
recompile it if it was a session compile, or reopen and reread it if it was a precompiled
r-code version.
-l 1000 n
The size of the local record buffer in 1KB units. Use Local Buffer Size (-l) to change the
size of the local record buffer in which Progress stores all variables, work files, and records
that are in use at one time for a user. The maximum size of the local record buffer is
4GB for most systems.
-T This is where Progress writes the temporary files. If possible, specify a different disk
location than where the MfgSys database is located. The idea is to spread the disk I/O
across multiple disks.
During this process, you set up Epicor905 schema holder database to Read-Only (-RO); both items significantly
improve performance.
Tip You can only do these steps on systems where the AppServers and the schema holder database are
on the same machine. Do not follow these instructions on load balanced systems where the AppServers
are on distributed servers.
Database Preparation
3. Click the Start button. Navigate to: Programs > OpenEdge > Proenv
5. Press Enter.
6. Change the directory to the database folder for Epicor905. To do this, enter: cd \epicor\Epicor905\newdb
You next edit the AppServer prefetch or parameter (.pf) file you use with the Epicor application. Before you follow
these steps, be sure you know which .pf file is run with your application.
3. Locate the AppServer .pf file you use with the Epicor application.
Tip Some example .pf files include Mfgsys.pf, MfgsysTCP.pf, MfgTrain.pf, MfgTrainTCP.pf, MfgTest.pf,
MfgTestTCP.pf, MfgPilot.pf, and MfgPilotTCP.pf.
7. Start the AppServers for the Epicor905 database. Do not, however, start the Epicor905 database itself.
Hyperthreading
Typically hyperthreading should be enabled on all processors released after 2010. However if you use an older
processor released before this year, you should disable hyperthreading.
If you use an older processor, these instructions give you an overview about how you disable this feature. Before
you disable hyperthreading, please review your server manual. The following instructions are only intended as a
guide.
You disable this feature through the BIOS on your computer:
2. As you soon as you see an opening Windows video on your screen, press F2.
5. To shut off hyperthreading, select the Disable check box next to the HyperThreading field.
If you experience performance problems while running custom or modified reports with an ODBC connection,
consider creating a table view. Database tables may become locked while the report is run; the table view can
bypass these SQL lock problems.
To correct this issue:
1. Create a view for each table that has an ODBC connection access. Do this by using a third party application
like Crystal Reports, Excel, or another ODBC source.
Now anybody who accesses the modified table view cannot create a share lock within the SQL database, improving
report performance.
Tip If you do not use a table view, you should instead use the "with (nolock)" option in the SELECT
statement for the table.
SQL function syntax is stricter than Progress syntax. If you previously ran the application using a Progress database
but now have moved to SQL, you may experience these syntax issues.
The main issue is that you can use abbreviations within Progress; for example, ABSOLUTE can be abbreviated to
ABS, ABSO, or ABSOL within Progress. BAQ formulas are directly sent to SQL. As long as these formulas do not
contain any abbreviations, they work as expected. However if a formula references an abbreviation, syntax issues
occur.
The following table displays the functions which are not identical between Progress and SQL. The characters
contained between the parentheses are optional characters in Progress.
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.
Tip 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
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.
This topic contains a list of best practices for SQL Server installation and disk layout methods.
• SQL Server, like any other database software, works best with fast data drives.
• Epicor recommends you run SQL Server on multiple disk drives. Do this so you can spread the I/O load across
disk spindles using RAID 10. Data writes are extremely important for an ERP application to achieve good
performance.
• Epicor recommends the SQL 64-bit version for Epicor 9.05.
• Review the Hardware Sizing Guide for recommendations on RAM amount and server recommendations.
This guide is available for download from the Epicor website (EPICWeb).
• Place the following files in separate physical drives with RAID 10 configuration:
• SQL Data Drive - RAID 10 the more drive the better.
• SQL Log Drive
• SQL Temp Database - This database should have eight files.
Index
.pf file 7, 12 N
network bandwidth 17
A
appservers 5 P
pf parameters list 8
B progress explorer tool 5
business activity query 15
R
D read only 11
database preparation 11
S
H schema holder 11
hardware upgrades 18 server configuration file 12
hyperthreading 13 server permissions 16
sql issues 15
sql server best practices 19
M
mfgsys.pf 7, 12 T
table view 14