官术网_书友最值得收藏!

Using Configuration Advisor

The configuration advisor will help you configure the best settings for the database mission, using this server's hardware configuration. You can then accept or cancel the proposed settings.

Getting ready

Obtain as much information as possible on the database size, future growth, number of concurrent users, and so on.

How to do it...

  1. Select database Configuration Advisor....

    Go to the left pane of Control Center, and expand the databases node. Right-click on the NAV database, and select Configuration Advisor....

    How to do it...
    • A first screen will ask you to confirm whether this is the database you want to configure; then, click Next.
    How to do it...
  2. Choose how much memory you want to allocate to this database.

    You will see a slider bar and the amount of physical memory available on the server. Allow around 300-500 MB for the operating system, or ask your system administrator how much space is needed. Then, you will have to divide the remaining space for each of the active databases. Click Next.

    How to do it...
    • In our example, I have two gigabytes available for system memory, so I leave 500 MB for the operating system; that leaves me with 1,500 MB available. The NAV database is quite small, so even 175 MB would be enough. Now, click Next.
  3. Select type of work load.

    For an OLTP database, select Transactions (order entry), and click Next.

    How to do it...
    • Choose your typical transaction's characteristics.On this screen, we estimate the load on the database. We never really know how many queries we may encounter per unit of work, so it's safe to select More than 10 (long transactions). Estimate or obtain the number of transactions per minute on the database; 3000 transactions a minute should be fairly representative of a production OLTP database. Click Next.
    How to do it...
  4. Choose the database's priority between performance and recovery:

    For OLTP, we would recommend choosing performance. We will leave the setting on both, for this scenario. This will choose the best values to balance between transaction performance and recovery time.

  5. Tell the advisor if the database contains data:

    If you have loaded data since the database has been created, select yes and click Next.

  6. Estimate the number of applications connected to the database:

    Enter the number of local and remote applications and click Next.

    How to do it...
  7. Select the appropriate isolation level for your database:

    Click Next. I chose the default value, Cursor stability, to minimize lock duration.

    How to do it...
  8. Review the proposed configuration recommendations.

    You can take some time to review the proposed configuration recommendations; when you are ready to continue, click Next.

  9. Schedule this as a task or do it right now.

    You can choose to create a task with the proposed configuration recommendations, and schedule this task for another time frame.

    Or, select Run now... and click Next.

    Review the actions that will apply the new settings and click Finish. You will see the progress indicator and the results of the action.

How to do it...

How it works...

The configuration advisor takes the current setting for the database configuration and optimizes those parameters to suit the database for OLTP processing. Commands used are: get database or get database manager (db/dbm) configuration (cfg) and update database or update database manager (db/dbm) configuration (cfg).

We suggest you copy the results into a script and run it manually through the command line, for historic and documentation purposes. You might want to track performance improvements with parameter change history.

There's more...

The configuration advisor is not only used for a newly created database; you might just as well run this utility on an existing database. For an existing database, you want to make sure table and index statistics are fairly recent. See the Collecting object statistics and the RUNSTAT utility recipe in Chapter 13,DB2 Tuning and Optimization

Main configuration characteristics of OLTP databases

Since an OLTP database requires many users to frequently read small amounts of data, it is best to allow more memory for buffer pools and less for sorts.

Log archiving is used in order to enable online and/or table space backups without quiescing the database. It is also required if you wish to set up HADR, so that archived logs can be sent over to the DR site.

Recommendations:

  • Smaller extents
  • Less prefetch
  • Small page size
  • Separate indexes and data
  • Multiple buffer pools

Main configuration characteristics of DSS databases

Since a DSS database requires a few users to read a large amount of data, it is best to allow more memory for sorts and less for buffer pools. Data is usually extracted from production OLTP databases, so your backup strategy may be different.

Recommendations:

  • Large extent size
  • Prefetch across all devices
  • Large page size (32 KB)
  • Spread tables and indexes across all devices
  • Single buffer pool
  • Allow 50 percent of useable memory to buffer pools and 50 percent to SHEAPTHRES

Main configuration characteristics of mixed processing databases

We have both the advantages and the inconvenience of both configurations. Perhaps the best approach here would be to optimize the database for transaction processing during the day and DSS processing, or analytic processing, outside daytime hours.

This may require down time between settings.

Another solution would be to somehow throttle the resources to ensure optimal response for OLTP while permitting let's say 25 percent of CPU time and disk I/O activity for OLAP.

We recommend having separate resources for different missions, when possible. Have one or several machines for use in a partitioned database for DSS processing and one separate machine for OLTP processing. Avoid having one machine for multiple missions as this may result in a single point of failure.

See also

主站蜘蛛池模板: 桂东县| 大邑县| 临洮县| 托里县| 乌鲁木齐县| 武陟县| 桐城市| 天气| 同德县| 隆德县| 峡江县| 沧州市| 邵阳市| 汽车| 来凤县| 长子县| 苏尼特右旗| 米林县| 安丘市| 阿拉尔市| 潜江市| 晋州市| 顺昌县| 台江县| 前郭尔| 抚顺县| 五莲县| 蓝田县| 康乐县| 麻栗坡县| 肥西县| 和平区| 育儿| 平安县| 江华| 策勒县| 临泽县| 贵阳市| 芦山县| 武汉市| 漳平市|