
![]()
In addition to the ability to store multi-volume database extents in files, Version 8.2A of Progress adds the capability for storing database extents on raw devices on Unix systems. A database can be stored in a mix of raw devices and files. Although raw devices afford some advantages, they also have some disadvantages. This monigraph discusse pros and cons of raw devices.
In Unix systems, a disk can be configured to contain a single contiguous chunk of space, or it can be configured to contain multiple separate chunks of space. Each chunk of space is called a partition or section. Typically a partition would be formatted to contain a filesystem, allowing a hierchical structure of directories and files to be created. A partition that does not contain a filesystem is called a raw partition.. A database extent stored on a raw partition is called a raw extent.
The primary advantage to using raw extents is the possibility of increased performance compared to extents stored in Unix files. The performance benefits occur because:
- File system overhead and address translation is eliminated. Database block addresses map directly to raw partition addresses.
- Read operations transfer data directly from the disk controller to shared memory and write operations transfer directly from shared memory to the disk controller. The Unix buffer pool is not used, avoiding the necessity to copy data from a Unix page buffer to shared memory and vice versa.
- The Unix buffer pool and the Progress buffer pool are managed and tuned independently. This avoids buffer space conflicts between other programs and the database manager.
- When several Progress databases are used on the same system, their buffer pools are completely independent of each other.
Although the hold forth the possibility of increased performance, raw extents have several serious disadvantages. You should not take the decision to use them lightly. Among the disadvantages are:
- Raw disk partitions are cumbersome to configure and manage. You have to keep track of what is on each raw partition youself. You can easily make mistakes and destroy the contents of a raw partiton.
- The number of raw partitions available on a disk may be quite limited. For example, on Solaris 2.5, a disk can have at most 8 partitions.
- Moving raw partitions from one disk to another may be difficult or impossible.
- Raw partition sizes are fixed. Allocating more space to a partition requires backing up all the partitions on a disk, designing a new partition layout, and restoring all saved data.
- You cannot use the same operating system backup utilities to make backups of files and raw partitions.
- You may get worse performance with raw devices than you do with files. The performance difference is highly dependent on the operating system's implementation of the file system. Many modern Unix systems, like Ditical Unix, AIX 4.2, HP-UX 10, Solaris 2.6, and others have highly advanced filesystem implementations that include many performance optimizations. Older Unix systems, such as Unix System V Release 4 are somewhat less advanced and raw partitions may provide better performance on these systems.
- You may not be able to use logical volume managers with raw partitions. Not all Unix systems support logical volumes composed of raw partitions.
When you use raw extents, you have to tune the database differently than when it is stored in files. In particular:
- Use more Asynchronous Page Writer processes. As a rule of thumb, you will need at least one per physical disk that contains raw extents. This is necesssary because all write operations to raw partitions are unbuffered. The write system calls made by page writers take longer than they do with file system writes.
- Increase the before-image cluster size substantially. This is necessary because the page writers require more time to write all the buffers that are marked for checkpointing when they are writing to raw partitions. You should use a minimum of 8 megabyte clusters for a system that has significant database update activity by the application.
- Increase the size of the Progress database buffer pool to make up for the fact that the Unix buffer pool is not providing any buffering as it does with file system extents.
- Decrease (or limit) the size of the Unix buffer pool by the same amount you increased the Progress buffer pool.
Consult your system's documentation for instructions on how to create partitions. Partitions typically have names of the form /dev/rdsk/cNd0snn where:
- the "r" in "rdsk" signifies the raw character device file
- N is the logical unit number of the disk.
- nn is the partition number on the disk.
Use prostrct create to create a new multi-volume database structure. Then use procopy to copy a database from disk into the new structure or restore a backup.
Always create a variable length data extent on a filesystem. This allows for expandsion in case you run out of room in the raw partitions.
Always create a variable length bi log extent on a filesystem. This allows for expansion in case you run out of room in the raw partitions.
Make all raw partitions the same size if possible. This will simplify management and backup.
Backing up databases on raw partitions can be done in the following ways:
Use the progress backup utility. It will make backups of databases on raw partitions or a mix of raw partitions and files in exacly the same way it makes backups of databases stored completely in files. This is the most convenient method because the Progress backup utility will ensure that all extents in the database are included, even if you add new ones after the database has been created.
Copy the raw partition to a tape using dd. The dd command will not handle multiple tapes, so you may have to use multiple dd commands to copy the partition.
Copy the raw partition to a file and use an operating system backup utility to copy it to tape.
When you are using raw partitions, keep detailed notes describing what you have stored where. Do not store this information on disk. Keep paper copies somewhere safe and easily accessible.
Keep detailed instructions for making backups and also for restoring backups easily accessible. You should always do this, even if you are not using raw partitions.
![]()
Copyright 1997, Progress Software Corp., All Rights Reserved