Determining the Size of the Database › Placing Areas in Files
Placing Areas in Files
Guidelines
You can assign all areas in a database to a single file or you can distribute areas over several files. The following table provides some guidelines for assigning areas to files.
The relationship between areas and files can be defined as one-to-one, one-to-many, many-to-one, or many-to-many. Each arrangement has its advantages and disadvantages.
Relationship
|
Advantages
|
Disadvantages
|
One area to one file
|
- Allows ease of maintenance
- Facilitates recovery
- Provides maximum flexibility in assigning areas to buffers
|
- If used with VSAM, this arrangement can require excessive VSAM memory requirements (GETVIS).
|
One area to many files
|
- Minimizes head/channel contention by spreading dataover multiple packs
- Optimizes processing of large and/or highly active areas
|
|
Many areas to one file
|
- Recommended for small, stable areas that are not used often
|
- Restricts buffer allocations
- Complicates DBA maintenance
|
Many areas to many files
|
|
- Severely restricts buffer allocations
- Complicates DBA maintenance
- Minimizes flexibility in data set placement on disk
- Complicates recovery procedures
- Should be avoided
|
Processing considerations
When assigning areas to files, you should keep in mind the following processing considerations.
Input/output seek time
Follow these guidelines for minimizing seek time:
- If you need to keep all (or several) areas online, you can reduce seek time by mapping each area into files allocated across all the disk volumes.
- Place the most frequently accessed data set (database file) near the middle cylinder on a disk volume. The access arm begins a seek operation from the position where it completed the last operation; therefore, the distance the arm must travel will, on the average, be less to reach a cylinder in the middle of the disk surface.
- Place the smallest data sets that are accessed equally often near the center of the disk volume.
- When concurrently active data sets must be accessed by the same access mechanism, place them adjacent to one another.
- If possible, place small, concurrently active data sets on the same cylinder.
For more specific guidelines, consult your hardware vendor publications for the hardware devices used at your installation.
Access-arm contention
To reduce contention for use of the access arm, you can place concurrently active data sets under different access mechanisms.
Minimizing seek time
If you need to keep all areas online, you can reduce seek time by mapping the areas into files allocated across all the disk volumes. For example, you can allocate nine files, three on each volume, and map each area across all three volumes. This reduces the number of cylinders across which the disk heads must move to process any one application, as shown below.
The diagram below shows how entities used for one application can be distributed over all volumes to limit head movement.
Sizing considerations
As you assign areas to files, you need to keep in mind the following sizing considerations:
- For each page, there must be only one corresponding block of the same size.
- Pages in one area must be numbered as one continuous range of integers (you select the starting number); blocks in one file must be numbered as one continuous range of integers, starting with the number one.
- Page ranges must not overlap.
- Page size can vary from area to area but not within an area; block size can vary from file to file but not within a file. Areas with different page sizes cannot be mapped into one file, and one area cannot be mapped across files with different block sizes.
- If an area is so large that it requires more than a single physical disk device and the access method is non-VSAM, the area must be mapped to multiple files where the size of each file is no larger than the capacity of a single device.
- If VSAM is being used as the underlying access method for the database, an area of over 4GB must be mapped to multiple VSAM files.
Copyright © 2014 CA.
All rights reserved.
|
|