20
PERFORMANCE TUNING HIGHLIGHTS INFOR ERP LN Cees Padmos and Adrian Voortman Performance Engineers Performance & Benchmarking Center July 2011 1 Copyright © 2011 Infor. All rights reserved.

PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

PERFORMANCE TUNING HIGHLIGHTSINFOR ERP LN

Cees Padmos and Adrian VoortmanPerformance EngineersPerformance & Benchmarking CenterJuly 2011

1 Copyright © 2011 Infor. All rights reserved.

Page 2: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

Agenda

Why this presentation? Updated Performance, Tracing and Tuning Guides

General Guidelines for Performance Tuning

System Tuning I/O and Storage setup

Best practice

Database TuningSQL Server

Oracle

DB2

Infor ERP LN tuningOLTP

Batches

2 Copyright © 2011 Infor. All rights reserved.

“An ounce of performance

is worth pounds of

promises.” – M. West

Page 3: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

Why this presentation?

Update of Performance, Tracing and Tuning Guide Infor ERP LN - Performance, Tracing and Tuning Guide

(U9357C US)

Infor ERP LN - Performance, Tracing and Tuning Guide for SQL Server (B0079A US)

Infor ERP LN - Performance, Tracing and Tuning Guide for Oracle (B0078A US)

Infor ERP LN - Performance, Tracing and Tuning Guide for DB2 (B0077A US)

Inform Infor Consulting Services about performance optimizations and tunables found by recent BenchmarksRefer to Infor365 solution 22881401

3 Copyright © 2011 Infor. All rights reserved.

Page 4: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

General guidelines for performance tuning

1. Don't make a change unless you have a reason to If everything is working well enough and the users are happy,

then why make changes?

2. Practice change controlMake backups of any configuration files you alter

3. Take a baseline of the performance before and after changing any settingsHow else will you know if your settings had a positive effect?

4. Make sure you understand the problem you are trying to address If it is unclear precisely where the problem lies, it is even more

important to make backups before you make any significant changes

5. Document the changeThis helps others understand why a change was madeKeeping a system change log can help you build a bigger picture

of the state of the system, and may indicate long-term problems before they occur

4 Copyright © 2011 Infor. All rights reserved.

Page 5: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

“The key to get a well

performing system is

a correct I/O Setup”

– W. Klok

System Tuning -I/O and Storage Setup (1)

1. Configure I/O in RAID 10 or 0+1 For optimal performance and redundancy

RAID 5 maybe sufficient for smaller implementations

2. Isolate database transaction log onto its own volume for larger implementations (200+ users)Transaction log I/O is almost 100% sequential and 100% write

Configure transaction log I/O cache such as cache in SCSI Controller, to 100% write

Always use RAID 10 or 01 for transaction log volumes

3. Configure enough fast disk spindles. Rule of thumb:Transaction log less than 225 iops per disk

Data/index file volumes less than 85 iops per disk

Check vendor specs for required I/O throughput of SAN / NAS

Look at sqlcat.com for Storage Top 10 Best Practices

5 Copyright © 2011 Infor. All rights reserved. Copyright © 2011 Infor. All rights reserved.

Page 6: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

System Tuning – I/O and Storage Setup (2)

4. Raw devices still give best performance Hard to manage

A correct use of Direct I/O and Concurrent I/O will give a performance between 93 - 99% of raw logical volumes

5. Use UNIX mount options based on data access patterns:

6 Copyright © 2011 Infor. All rights reserved.

File type Access type

Database Redo log and Archive log Direct I/O

Database Data files Concurrent I/O

Binaries Cached I/O

OS Direct I/O Concurrent

I/O

AIX dio cio

HP-UX delaylog,mincache=direct,convosync=direct delaylog,cio

Page 7: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

System Tuning – Best practice (1)

1. Use large pages Improve system performance for high performance or memory-

access-intensive application that uses large amounts of virtual memory. (Like a database)

Large pages optimizes the use of Translation LookasideBuffers (TLB), locks these larger pages in RAM, and the system has less bookkeeping work to do for that part of virtual memory due to larger page sizes.

Benchmarks showed Infor ERP LN benefits from the use of

large pages for the database

Special permissions needed for database owners

Use when database buffercache > 8 GB

2. Enable HyperthreadingUp to 20% performance increase

Disabled by default on HP-UXTo enable: # kctune lcpu_attr=1

7 Copyright © 2011 Infor. All rights reserved.

Page 8: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

System Tuning - Best practice (2)

3. Do not favor filesystem cache for user processesOn most systems defaults are good

Except Linux and AIX 5.3 and lower

Linux: swappiness=10

AIX 5.3: lru_file_repage=0

The Linux swappiness kernel parameter will influence the priority paging mechanism.

The default value is 60

Higher values will provide more buffer/page cache

lower values will wait longer to swap out idle processes

Change swappiness to 10, in order to keep the user processes (bshell) as much as possible in memory

# sysctl –w vm.swappiness=10

4. Issues with Windows desktop heapOut of memory errors: “A desktop heap allocation failed”

Infor365 solution 941132

8 Copyright © 2011 Infor. All rights reserved.

Page 9: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

Database Tuning – General (1)

1. Create and update database statistics

2. Lock (Large) pages in memoryPrevent frequent reloads (LOCK_SGA)

3. Properly size database memory (shared_pool, buffer cache etc) by looking at wait events,

buffer hit ratios, system swapping and paging, etc.

4. Properly size and place database filesprovides maximum disk subsystem throughput

Create database initially with appropriate size

Prevent Auto grow

Causes additional fragmentation.

If needed, use big chunks, like 10 GB

9 Copyright © 2011 Infor. All rights reserved.

Page 10: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

Database Tuning – General (2)

5. Use compression and varcharExisting data can be reduced

More optimal use of buffercache

Little bit CPU overhead for compression

6. Look for frequent disk sorts, full table scans, missing indexes, row chaining, data fragmentation, etcUse AWR, ADDM, missing index DMV

7. Eliminate database locks, latches and wait eventsCan cause huge performance bottlenecks

Possible solution by using partitioned tables (e.g. device queue ttaad320)

10 Copyright © 2011 Infor. All rights reserved.

Page 11: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

Database Tuning – SQL Server

1. Storage setup

2. Use the SNAC driverDB driver accesses SQL Server via SHM instead of NP

Approx10% better performance compared with NP in 2-Tier

Also 10% Memory decrease

Default from portingset 8.7a

3. Use Large pages for the buffer pool: Trace flag 834

4. Keep min/max server memory equal

5. Set MAXDOP=1

6. Set Max worker threads to lowest value possible

11 Copyright © 2011 Infor. All rights reserved.

Page 12: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

Database Tuning – Oracle

1. Adequately size SGA and storage setup. Physical memory for Oracle SGA; 2-tier 25%; 3-tier: 40%

Undo Tablespace: 2Gb

Redo log: start with 6 files of 512 Mb

2. Use Oracle CompressionEnterprise Edition level. improved in Oracle 11g release.

Advanced compression in Oracle 11g is licensed separately

Tests are documented in Infor365 solution 22894468

3. Oracle parametersLOCK_SGA=TRUEdb_file_multiblock_read_count=8optimizer_index_caching=0 or 90optimizer_index_cost_adj=10http://www.dba-oracle.com/oracle_tips_cost_adj.htm

Recyclebin=OFF_enable_NUMA_support=TRUE filesystemio_options=setall

14 Copyright © 2011 Infor. All rights reserved.

Page 13: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

Database Tuning – DB2

1. Use DB2 Row compressionFeature of DB2 9 Storage capacity savings up to 50%

2. Set DB2_USE_FAST_PREALLOCATION=OFF Improve performance and decrease latch contention on AIXSlower tablespace creation and restore times

3. Set DB2_USE_ALTERNATE_PAGE_CLEANING=ONDB2 writes changed pages to disk, keeping ahead of Log

Sequence Number (LSN) gaps and proactively finding victims. Better utilize available disk I/O bandwidth by page cleanersBenchmarks learned that this proactive method of page

cleaning will improve performance for Infor ERP LNchngpgs_thresh db configuration parameter no longer relevant

4. Set MultiConnect=3Connection pooling mechanism Reduces number of read-only db connections to one per userSaves CPU and memory resources

16 Copyright © 2011 Infor. All rights reserved.

Take a look at

www.db2express.com

Page 14: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

Infor ERP LN Tuning (1)

1. Use Combo bshellWindows and UNIX

10 – 15% performance increase

2. Use latest available portingset and Enterprise Server (HP-UX) performance increase of 15% from 8.7b onwards.

Connection pooling (from 8.7a)

Reduced memory usage

3. Use varchar datatypeReduces data size and data growth significant

More optimal use of buffercache

Available for Oracle from portingset 8.6a

4. Adaptive Shared MemoryFill with frequently used objects and reports

Refer to Infor ERP LN Administrator’s Guide (U8854x US)

17 Copyright © 2011 Infor. All rights reserved.

“Consider custom work

sessions, as 80% of

performance problems

are resolved by coding

optimal SQL.”

Page 15: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

Infor ERP LN Tuning (2)

5. Use First Free Number cacheSize of cache determines how many numbers will be cached

for this process

Set cache to 1 or higher if possible

Shortens the lock on the FFN table and prevents locking issues on this table

6. Dynamic ScrollbarDisable per session via ttaad0100m000 from ES 8.6

Use SCROLL_LIMIT=-1 prior to ES 8.6

7. Check log files regularly Indicate the environment healthiness

Reducing errors may improve performance

Most important files are bshell and database driver log files

Can also be done via session “ttstperrlog”

18 Copyright © 2011 Infor. All rights reserved.

Page 16: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

Infor ERP LN Tuning (3)

8. Use correct db_resource settingsOLTPUse defaults as much as possible in 2-tier

dbsinit:01 Optimistic locking default from 8.6a onwards

Use Array fetch/insert; especially in 3-tier

BatchUse seperate db_resource for batches using

USR_DBS_RES=lib/defaults/db_resource.batch

bdb_max_session_schedule:250

(db2_)retained_cursors:50

Array size (fetch and insert):10

msql_opt_rows:10

db2_max_open_handles:500

9. A lot of performance problems are related to application settingsMRP run: full run vs. net changeFinance reconciliation settingsDisable unused functionality. E.G. ATP checkMore information: U9502x US - Performance Guidelines

19 Copyright © 2011 Infor. All rights reserved.

Page 17: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

Batch performance (1)

1. Run batches in host-mode; if possible

2. Schedule batches after peak working hours

3. Use parallel processing (if possible)Application mechanism to speed up a batch session by

spreading the load over multiple bshells

Every bshell consumes 1 processor core

Run a batch several times to find the optimal number of servers

System configuration might change. Check number of servers regularly

4. Use table boostersCache table data. Reading from bshell memory is much faster

than reading from database or disk

Bshell has max size of 30Mb per table (20 Mb for Baan IV)

Max memory default used is 5Mb per table booster. Increase via TCCOMDLL0201_MAX_ALLOC

21 Copyright © 2011 Infor. All rights reserved.

Page 18: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

Batch performance (2)

5. Prevent progress indicator for batchesShows the part of the workload that must be processed is

already completed

Consumes additional CPU

Disable for automatically started batches and batches without interface via tcmcs0597m000 “Performance Boosters”

22 Copyright © 2011 Infor. All rights reserved.

““Being able to fix things does not

make you a senior DBA. You become a

senior DBA by making certain that

things do not break in the first place.” -

Thomas LaRock

Page 19: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

Closing remarks

All details in the updated Infor ERP LN Performance, Tracing and Tuning Guide U9357C US

Follow also the guidelines in Performance Guidelines document (U9502x US) for application performance improvement

Latest performance information (including

documentation) via Infor365 solution 22881401 http://www.infor365.com/espublic/en/solutions/ViewSolution.asp?SolutionID=22881401

Test before you implement! Ask if you are not sure!

Please provide feedback from customer experiences, we can learn from it and help improving performance

Q/A

23 Copyright © 2011 Infor. All rights reserved.

Page 20: PERFORMANCE TUNING HIGHLIGHTS - support.infor.com

24 Copyright © 2011 Infor. All rights reserved.

[email protected]

[email protected]

“Performance is your reality.

Forget everything else.” - Harold

S. Geneen