Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

39
1 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Transcript of Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

Page 1: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

1 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Page 2: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

2 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Primavera P6 and the Oracle RDBMS: Guidelines for Initial Configuration Brian Diehl, Director, Oracle Primavera Session ID #: 15409

Page 3: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

3 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Safe Harbor

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

Page 4: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

4 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Program Agenda

• Overview •  Architecture •  Physical Database • Memory •  The Optimizer •  Everything Else

Page 5: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

5 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Overview

•  So many questions about how to get started with a Primavera P6 database

•  Too often this means just doing the same as other OLTP systems

• Most existing P6 configurations have many settings that should be changed

•  All this is also applicable to existing P6 installations

New or tune-up

Page 6: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

6 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Overview

•  Types of usage impact database configuration •  P6 is several applications in one:

–  Transaction system – Reporting system – Service engine – ETL Processor – Data Warehouse

•  Transactional system is unlike others

P6 Applications

Page 7: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

7 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

ARCHITECTURE

Page 8: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

8 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Architecture

•  Full P6 system has two, very different database

•  PMDB has the most diverse usage

•  STAR is similar to other data warehouses

P6 as a whole

PMDB

ETL

Application

Services

Reporting

OBIEE STAR

Page 9: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

9 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Architecture

•  P6 application* are a mix of: –  Fairly large queries –  Quasi-batch processes –  Transactional updates

•  Services like Publish Project perform heavy read / write on PMDB

•  Reporting –  Varies the most from site-to-

site

PMDB Usage

PMDB

ETL

Application

Services

Reporting

OBIEE STAR

*Including P6 EPPM, Professional, Progress Reporter, Team Member

Page 10: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

10 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Architecture

•  ETL process – Heavy read process when

running on PMDB – STAR updates are primarily a

bulk insert operation

• OBIEE –  Traditional star-queries – Very Adhoc

Star and ETL

PMDB

ETL

Application

Services

Reporting

OBIEE STAR

Page 11: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

11 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

PHYSICAL DATABASE

Page 12: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

12 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Physical Database

•  SAN systems cover the majority of physical database considerations – Redundancy – Striping

•  I will leave most of the physical consideration to site-specific SAN setups

Disk I/O PMDB STAR

Page 13: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

13 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Physical Database

•  Both PMDB and STAR databases have significant DML operations

•  Initial log file sizes are often too small

•  Reduce contention for log file switches with larger log files

•  Create six or more log file groups

Redo Logs Log Group 1

Redo Log 500mb Redo Log 500mb

Log Group 2 Redo Log 500mb Redo Log 500mb

Log Group 6 Redo Log 500mb Redo Log 500mb

PMDB STAR

Page 14: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

14 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Physical Database

•  Always use database archiving for production systems • Upgrading to P6 8.x

–  Initial calculation process will perform an extensive amount of DML

– Recommend disabling Archive Log during the initial calculation process

– Re-enable after the initial project calculations are complete

Archive Log PMDB

Page 15: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

15 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Physical Database

•  P6 Data Warehouse is a combination of… – Current Dimensions and Facts – History Dimensions and Facts

• Historical data cannot be recovered from the PMDB • Current Dim/Facts are truncated and re-inserted •  Archive log may not be appropriate for data warehouse • Historical tables need to be backed up regularly if

archiving is disabled

STAR Archive Log STAR

Page 16: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

16 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

MEMORY

Page 17: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

17 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Memory

•  Above all, don’t squeeze P6 database memory • Many large and unique queries are generated by P6 •  P6 applications are more DSS than OLTP

–  Fairly large buffer cache usage – More PGA memory usage than you might expect

• Database warehouse is obviously a heavy user of buffer cache

Considerations PMDB STAR

Page 18: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

18 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Memory

•  Oracle RDBMS has very advanced automatic memory management

•  In 11g, it easiest to configure total instance memory via memory_target

•  Specific parameters are still valuable as a floor value

Overall PMDB STAR

Oracle Instance (memory_target)

SGA (sga_target)

PGA (pga_aggregate_target)

Shared Pool (shared_pool)

Shared Pool (db_block_buffers)

Log buffers (log_buffer)

Sort (sort_area_size)

Hash (hash_area_size)

Page 19: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

19 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Memory

• Use memory_target (11g) or sga_target (10g) •  Allows the database to manage other memory pools •  Typical setting for a production server

– memory_target (SGA+PGA) • Minimum: 4G • Maximum: Available server memory (less system memory usage)

–  sga_target (SGA) • Minimum: sga_target=3G , pga_aggregate_target=1G • Maximum: sga_target= available server (less pga + system)

Memory and SGA Target PMDB

Page 20: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

20 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Memory

•  Set pga_aggregate_target to a minimum of 1G •  An accurate setting depends on concurrency

– Recommend between 5 and 10 MB per concurrent user –  ex. 100 users would have PGA setting between 500M and 1G

•  This is the shared process memory pool of database sessions

PGA Aggregate PMDB

Page 21: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

21 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Memory

•  P6 can be a particularly heavy user of SQL cache in the shared pool

•  A low value for shared_pool may cause excessive thrashing

• Minimum value for shared_pool of 1G •  (With _target settings, this will be the minimum allocation

to the shared_pool)

Shared Pool PMDB

Page 22: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

22 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Memory

•  A single block size is fine for P6 PMDB • Default block size of 8k is perfect •  Setting for db_block_buffers / db_cache_size

–  Leave this at default of 0 –  Let the instance use the bulk of memory for buffers

•  ** To do this successfully, you must set all the other pool sizes to a minimum value

Block buffers and block size PMDB

Page 23: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

23 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Memory

• Queries on data warehouse may be very large, aggregate operations

• Minimum memory – Memory/SGA: 8G (more if available) – Shared Pool: 1G – PGA: 500M

• Use larger blocks for the STAR database –  32K

Data Warehouse Memory STAR

Page 24: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

24 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Memory

•  log_buffers: 10m (10,485,760) •  streams_pool_size: N/A •  java_pool_size: N/A •  large_pool_size: Set as needed for your site-specific

requirements, otherwise, leave as default

Other Memory Settings PMDB STAR

Page 25: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

25 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

THE OPTIMIZER

Page 26: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

26 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

The Optimizer

•  Statistics related to the optimizer can have the largest affect on P6 performance

•  Statistics management is different for new system vs. existing installation

•  The default database behavior (i.e. gathering statistics every night) is not advised

Considerations PMDB STAR

Page 27: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

27 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

The Optimizer

•  A new P6 database has little or no data •  The percentage change in the data may be large from

day-to-day • Gather optimizer statistics daily or weekly during the first

few months of usage

New P6 Installations PMDB

Page 28: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

28 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

The Optimizer

• Re-gathering of statistics on a mature system can cause unexpected performance degradation

•  At a minimum, lock statistics on ADMUSER schema or disable daily statistics job

• Changes to statistics should only be made: – With a backup of the previous statistics (dbms_stats) – …and testing of application with new statistics

•  Support can provide scripts to better manage statistics

Statistics Maintenance PMDB

Page 29: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

29 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

The Optimizer

•  optimizer_index_caching and optimizer_index_cost_adj – While these are older settings, we recommend not using the

defaults –  optimizer_index_caching=90 –  optimizer_index_cost_adj=1

•  Parallel Query – Set parallel maximum queries lower for PMDB –  parallel_max_servers < 4 (even as low as 0)

Other Settings PMDB

Page 30: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

30 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

The Optimizer

• Updating of statistics for STAR can be performed daily •  Ideally this is after the ETL process • Higher degrees of parallelism (DOP) will benefit DW

queries •  In general, default optimizer settings are Ok for STAR

Star Optimization STAR

Page 31: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

31 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

EVERYTHING ELSE

Page 32: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

32 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Everything Else

•  Primarily we use DBCA for new database – Choose General Purpose (PMDB) or Data Warehouse (STAR)

• Character Set: Choose Unicode AL32UTF8

New Database Instance PMDB STAR

Page 33: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

33 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Everything Else

•  For most parameters, we take the defaults •  open_cursors = 500 •  Sessions and processes

– Depends on expected concurrency – Processes = 300 – Sessions = 300

Other Parameters PMDB STAR

Page 34: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

34 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Everything Else

•  Shared vs. Dedicated Server – Always use dedicated server for P6

• Create a user profile for PRIVUSER / PUBUSER – Either 1) Disable password expiration – Or 2) Set password expirations and plan for reset

•  Flashback query – Undo retention can be a lifesaver (or, a least, a career saver) – Default is only 15 minutes (900) – Set to at least 2 hours (7200)

Miscellaneous PMDB STAR

Page 35: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

35 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

APPENDIX

Page 36: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

36 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Appendix

•  Blog: https://blogs.oracle.com/priminout/ – Block size choice:

https://blogs.oracle.com/priminout/entry/pmdb_block_size_choice – Re-thinking Optimizer Statistics:

https://blogs.oracle.com/priminout/entry/rethinking_oracle_statistics_and_p6

– Exporting Schema Statistics: https://blogs.oracle.com/priminout/entry/exporting_schema_statistics

•  P6 Analytics Blog: https://blogs.oracle.com/P6Analytics/

Links

Page 37: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

37 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Q&A

Page 38: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

38 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Page 39: Primavera p6 and the oracle rdbms - Oracle Primavera Collaborate 14

39 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.