Oracle8i Parallel Server Administration, Deployment, and Performance Release 2 (8.1.6) Part Number A76970-01 |
|
This appendix describes a case study that presents a methodology for designing systems optimized for Oracle Parallel Server.
The case study presented in this appendix provides techniques for designing new applications for use with Oracle Parallel Server. You can also use these techniques to evaluate existing applications and determine how well suited they are for migration to Oracle Parallel Server.
This case study assumes you have made an initial database design. To optimize your design for Parallel Server, follow the methodology suggested here.
Part III, "Oracle Parallel Server Design and Deployment", for detailed information on this methodology.
See Also:
This case study demonstrates analytical techniques in practice. Although your applications will differ, this example helps you to understand the process. The topics in this section are:
The case study is about the fictitious "Eddie Bean" catalog sales company. This company has many order entry clerks processing telephone orders for various products. Shipping clerks fill orders and accounts receivable clerks handle billing. Accounts payable clerks handle orders for supplies and services the company requires internally. Sales managers and financial analysts run reports on the data. This company's financial application has three business processes operating on a single database:
Tables from the Eddie Bean database include:
Various application users access the database to perform different functions:
Operation of the Eddie Bean application is fairly consistent throughout the day: order entry, order processing, and shipping occur all day. These functions are not for example, segregated into separate one-hour time slots.
About 500 orders are entered per day. Each order header is updated about 4 times during its lifetime. So we expect about 4 times as many updates as inserts. There are many selects, because many employees are querying order headers: people doing sales work, financial work, shipping, tracing the status of orders, and so on.
There are on average 4 items per order. Order items are never updated: an item may be deleted and another item entered. The ORDER_HEADER table has four indexes. Each of the other tables has a primary key index only.
Budget and forecast activity has a much lower volume than the order tables. They are read frequently, but modified infrequently. Forecasts are updated more often than budgets, and are deleted once they go into actuals.
The vast bulk of the deletes are performed as a nightly batch job. This maintenance activity does not, therefore, need to be included in the analysis of normal functioning of the application.
Begin by analyzing the existing (or expected) access patterns for tables in your database. Then decide how to partition the tables and group them according to access pattern.
List all your high-activity database tables in a worksheet like the one shown in Table A-2:
Table Name | Daily Access Volume | |||||||
Read Access | Write Access | |||||||
Select | Insert | Update | Delete | |||||
Operations | I/Os | Operations | I/Os | Operations | I/Os | Operations | I/Os | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
To complete this worksheet, estimate the volume of each type of operations. Then calculate the number of reads and writes (I/Os) the operations entail.
For each type of operation to be performed on a table, enter a value reflecting the normal volume you would expect in a day.
For each value in the Operations column, calculate the number of I/Os that will be generated using a worst-case scenario.
The SELECT operation involves read access, and the INSERT, UPDATE and DELETE operations involve both read and write access. These operations access not only data blocks, but also any related index blocks.
For example, Figure A-1 illustrates read and write access to data in a large table in which two levels of the index are not in the buffer cache and only a high level index is cached in the System Global Area.
In this example, assuming that you are accessing data by way of a primary key, a SELECT requires three I/Os:
An INSERT or DELETE statement requires at least five I/Os:
One UPDATE in this example entails seven I/Os:
In the case study, the number of I/Os per operation differs from table to table because the number of indexes differs from table to table.
Table A-3 shows how many I/Os are generated by each type of operation on the ORDER_HEADER table. It assumes that the ORDER_HEADER table has four indexes.
Operation | SELECT | INSERT | UPDATE | DELETE |
Type of Access |
read |
read/write |
read/write |
read/write |
Number of I/Os |
3 |
14 |
7 |
14 |
Table A-4 shows how many I/Os generated per operation for each of the other tables in the case study, assuming each of them has a primary key index only.
Operation | SELECT | INSERT | UPDATE | DELETE |
Type of Access |
read |
read/write |
read/write |
read/write |
Number of I/Os |
3 |
5 |
7 |
5 |
For this analysis, you can disregard the fact that changes made to data also generate rollback segments, entailing additional I/Os. These I/Os are instance-based. Therefore, they should not cause problems with your Oracle Parallel Server application.
Table A-5 shows rough figures reflecting normal use of the application in the case study.
You can make the following conclusions from the data in this table:
Begin by analyzing the existing (or expected) access patterns for tables in your database. Then partition the tables and group them according to access pattern.
For each table with a high volume of write access, analyze the transaction volume per day for each type of user.
Use worksheets like the one in Table A-6:
Table Name: | |||||||||
Type of User | No.Users | Daily Transaction Volume | |||||||
Read Access | Write Access | ||||||||
Select | Insert | Update | Delete | ||||||
Operations | I/Os | Operations | I/Os | Operations | I/Os | Operations | I/Os | ||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Begin by estimating the volume of transactions by each type of user and then calculate the number of I/Os required.
The following tables show transaction volume analysis of the three tables in the case study that have high write access levels: ORDER_HEADER, ORDER_ITEMS, and ACCOUNTS_PAYABLE.
Table A-7 shows rough estimates for values in the ORDER_HEADER table in the case study.
You can make the following conclusions from the data in this table:
Deletes are performed as a maintenance operation, so you do not need to consider them in this analysis. Furthermore, the application developers realize that sales managers normally access data for the current month, whereas financial analysts access mostly historical data.
Table A-8 shows rough estimates for values in the ORDER_ITEMS table in the case study.
The following conclusions can be drawn from this table:
The ORDER_HEADER table has more writes than ORDER_ITEMS because the order header tends to require more changes of status, such as address changes, than the list of available products. The ORDER_ITEM table is seldom updated because new items are listed as journal entries.
Table A-9 shows rough figures for the ACCOUNTS_PAYABLE table in the case study. Although this table does not have a particularly high level of write access, we have analyzed it because it contains the main operation that the accounts payable clerks perform.
You can make the following conclusions from the data in this table:
Deletes are performed as a maintenance operation, so you do not need to consider them in this analysis.
In the case study, the large number of order entry clerks doing heavy insert activity on the ORDER_HEADER and ORDER_ITEM tables should not be separated across machines. You should concentrate these users on one node along with the two tables they use most. A good starting point is to set aside one node for the OE clerks, and one node for all other users as illustrated in Figure A-2.
This system is probably well balanced across nodes. The database intensive reporting done by financial analysts takes a good deal of system resources, whereas the transactions run by the order entry clerks are relatively simple.
Attempting to use load balancing by manipulating the number of users across the system is typically useful, but not always critical. Load balancing has a lower priority for tuning than reducing contention.
In the case study it is also clear that accounts payable data is written exclusively by accounts payable clerks. You can thus effectively partition this data onto a separate instance as shown in Figure A-3.
When all users needing write access to a certain part of the data are concentrated on one node, the PCM locks all reside on that node. In this way, lock ownership is not moving between instances.
Based on this analysis, you have two design options as described under the following headings.
You can set up your system as shown in Figure A-3 with all order entry clerks on one instance to minimize contention for exclusive PCM locks on the tables. This allows sales managers and financial analysts to get up-to-the-minute information. Since they do want data that is predominantly historical, there should not be too much contention for current records.
Alternatively, you could implement a separate temporary table for ORDER_ITEM/ ORDER_HEADER. This table is only for recording new order information. Overnight, you could incorporate changes into the main table against which all queries are performed. This solution would work well if it is not required that financial analysis have current data. This is probably an acceptable solution only if they are primarily interested in looking at historical data. This would not be appropriate if the financial analysts needed up-to-the-minute data.
You need to consider index partitioning if multiple nodes in your system are inserting into the same index. In this situation, you must ensure that different instances insert into different points within the index.
See Also:
|
For many applications, the DBA needs to decide whether to use high or low granularity locking for particular database files.
You should design for the worst case scenario that would use high granularity locking. Then, in the design or monitoring phases, if you discover a situation where you have too many locks, or if you suspect false pings, you should try low granularity locking.
Begin with an analysis at the database level. You can use a worksheet like the one shown in Table A-10:
Block Class | Relevant Parameter(s) | Use High or Low Granularity Locking? |
|
|
|
|
|
|
|
|
|
|
|
|
Next, list the files and database objects in a worksheet like the one shown in Table A-11. Decide which locking mode to use for each file.
Filename | Objects Contained | Use High or Low Granularity Locking? |
|
|
|
|
|
|
|
|
|
|
|
|
See Also:
Chapter 9, "Setting Instance Locks" for more information about applying locks to data files. |
Up to this point, you conducted an analysis using estimated figures. To finalize your design you must now either prototype the application or actually implement it. By observing the actual system, you can tune it further.
To do this, try the following techniques:
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|