This chapter provides information about managing ObjectStore on UNIX systems. For complete information, you should consult the first six chapters in this book along with this chapter.
os_database::open("/usr3/fauntleroy/my_file_db")You can also specify a relative pathname.
ObjectStore treats links in the usual manner.
Automount pathnames are acceptable. If you are using automount, the pathname you specify cannot include the automount prefix, usually /tmp_mnt. Referring to the file with this prefix does not cause automount to keep it mounted and can cause the file to appear deleted.
Unless you set up a database to be a Server-remote database (see Chapter 5, Using Locator Files to Set Up Server-Remote Databases), you must store file databases on a host that is running an ObjectStore Server. ObjectStore determines which Server to use based on the NFS mountings of the client that creates the database.
File Name Expansion
When you specify a rawfs database name, ObjectStore commands use wildcard ( *, ?, {}, and [] ) name expansion.
sax::/charlie\*.Where you specify a file database name, the shell performs wildcard expansion. This means that it does not usually matter whether wildcards have preceding escape characters (back slashes). For example, the following two commands have an identical effect:
osls -d /oshome/bin/osse* osls -d /oshome/bin/osse\*In the first case, the shell expands the wildcard, and the expansions are all passed to osls; osls determines that they represent file pathnames, and passes them on to the shell command ls. In the second case, the shell passes the unexpanded string to osls, which determines that it represents a file pathname, and passes it to the shell command ls, which then does the expansion.
$OS_ROOTDIR/bin/utility-name
Where the input name is a file database name, the commands (except oscp and osmv) pass the name on to the corresponding system command. Those commands that modify an individual database file in any way (oschgrp, oschmod, oschown, osmv, and osrm) attempt to verify that the file being operated on is in fact a database, by calling os_database::lookup() on the path before operating on it. This verification is only done, however, if neither -f (force) nor -R (recursive) is specified. If the force or recursive flag is specified, the paths are simply passed to the shell without further checking. This means, for example, that
osrm /foo/barremoves /foo/bar only if it is a database, while
osrm -f /foo/barremoves /foo/bar regardless of what type of file it is.
Note: ObjectStore utilities return a zero to indicate success and a nonzero value to indicate otherwise.
When you run osconfig, the utility prompts you for the name of the Server log file. If you do not accept the default, this also results in a modification to the Server parameters.
Log File: /support2/local/ostore/sun4.r300/.log Partition0: /support2/local/ostore/sun4.r300/.part0 Authentication Required: Unix Login
The pathname of the Server executable is $OS_ROOTDIR/lib/osserver. See the installation instructions for setting OS_ROOTDIR).
$OS_ROOTDIR/lib/osserver [options]
Description
After starting, the Server displays the message Server started on the system (host) console to let you know that it is ready to accept requests from clients on the network. Debug mode
Output from debug mode can be very useful to Object Design personnel trying to help you solve a problem. When you no longer need the debug output, shut down the Server and restart it without the debug option. Running the Server in debug mode slows it down but does not affect clients. You should run the Server in debug mode only when you are experiencing a problem. In most cases, you want to specify -d 50 so you can obtain all possible information. Use -i and -I with
Be sure to move all data out of the log before you initialize it. See ossvrchkpt: Moving Data Out of the Server Transaction Log. Be sure to back up all data in the rawfs before you initialize it. See osbackup: Backing Up Databases.
caution
When you initialize the transaction log, anything in the log is lost. The Server resizes the log to the values specified by the Log Data Segment Initial Size and Log Record Segment Initial Size Server parameters. When the log is in the rawfs, this frees space for use by other files. When the log is in the native file system, this reallocates space dedicated to the transaction log. The size of the log does not change.
Initializing when you
If you have a rawfs, specifying the -i or -I option with osserver initializes the rawfs and the transaction log. When you specify -i, ObjectStore responds with
have a rawfs
The entire ObjectStore file system on this host is about to be initialized, thus destroying any data currently in it. Unless you have a backup of the ObjectStore file system, it will be impossible to recover the old contents once the initialization is started. Are you sure that you want to reinitialize the ObjectStore file system?When you specify -I, this message does not appear.
You have asked for initialization which will create a new transaction log, deleting any old log that might exist, thus destroying any recovery data in the old log. This might leave some file databases in a broken state. Are you sure that you want to create a new log?When you specify -I, this message does not appear.
Creating a Rawfs
Maintaining a rawfs provides a fast, convenient way to manage all ObjectStore databases at your site.
On SGI with XFS, file partitions can be greater than 2 GB.
The maximum number of partitions for a single Server is 32.
PartitionN: type pathname {expandable | nonexpandable}It is unnecessary to specify more than one file in the same partition.
Partition0: UNIX /usr1/one expandable Partition1: UNIX /usr2/two expandable Partition2: UNIX /usr3/three nonexpandable Partition3: PARTITION /dev/rsd4x
To reinitialize the entire rawfs, see Reconfiguring the Rawfs.
Setting Cache Manager Parameters
If a Cache Manager is not already running, the Cache Manager starts automatically when a client application starts.
If the environment variable OS_CACHE_DIR is set, ObjectStore uses that directory. Cache and commseg files should be in the same directory.
Make sure that this directory exists. The Cache Manager does not automatically create it.
If the environment variable OS_COMMSEG_DIR is set, ObjectStore uses that directory. Cache and commseg files should be in the same directory.
Cache Manager hard limit (NNNNN) exceeded by request for MMMMM bytes of cache and/or commsegThis parameter allows you to prevent ObjectStore files from using too much disk space.
The default of 0 means that no limit is enforced.
Object Design expects that few users will ever need this parameter. It is provided for the very unlikely situation in which you have something in your default mount table that ObjectStore cannot parse.
This parameter allows you to prevent ObjectStore cache files from using too much disk space.
The default of 0 means that no limit is enforced.
Note that the Cache Manager file permissions setting can also be affected by the umask of the shell that started the Cache Manager. For this reason, you should set the umask to 0 when using this parameter.
Cache Directory: /support2/local/ostore/tmp Commseg Directory: /support2/local/ostore/tmp Mount Table Pathname: /new/mount/pathname Hard Allocation Limit: 10000000
On UNIX, an ObjectStore cache is a memory mapped file. Now, suppose you have a system where the size of this memory mapped file is a significant percentage of the system's real memory. In this situation, an application that is performing memory mapping for a large file and subsequently doing a lot of processing that does not involve the memory mapped file can suffer a much poorer performance than if the application had not memory mapped the file - that is, if the application used straight UNIX file I/O.
The reason for this is that overall system swapping is increased by the presence of the semiactive memory mapped file. That is, the application is not using or reusing the cached database pages frequently enough to benefit from a large cache file.
An example of such an application is a program that populates a database by inserting a large number of objects into a collection. In this case, with the exception of the actual collection object, the pages in the cache are not being reused. Such a program benefits from having a small cache (for example, 2 MB) because the objects are not being revisited and overall UNIX system swapping is low.
A program that would benefit from having a large cache would be one that accesses a large number of objects (pages) and then reaccesses the same objects before replacing the objects (pages) in the cache with other objects (pages) fetched from the database. Of course, as the cache size starts to become a larger and larger percentage of the size of the machine's physical memory, more and more system swapping occurs and the performance gain of a large cache file begins to be lost.
The important issue with a large database is knowing how to properly cluster and segment it to achieve maximum performance. Properly designing a database so that it is clustered/segmented to achieve maximum performance is usually very application specific.
See OS_CACHE_SIZE for information on setting the cache size.
Description of ObjectStore Directories
The ObjectStore directory structure appears in the following illustration. You must set OS_ROOTDIR to Toplevel.
Finding Files Containing ObjectStore Messages
When an ObjectStore daemon process sends output to stdout or stderr, ObjectStore routes the output to a corresponding file, as follows:
Cache Manager | /tmp/ostore/osc4_out |
Server | /tmp/ostore/oss_out |
If the file does not already exist, ObjectStore creates it; if the file does exist, ObjectStore appends the new information.
Using Tapes with the osbackup Utility
When you execute the osbackup utility, you can use standard UNIX tape drives, including quarter-inch cartridge and 8mm cartridge drives. Some standard tape formats and sizes are
Format | Capacity in Megabytes |
QIC-11 | 30 |
QIC-24 | 60 |
QIC-150 | 150 |
QIC-525 | 525 |
EXB-8200 | 2200 |
EXB-8500 | 5000 |
ObjectStore Use of /tmp/ostore
ObjectStore uses /tmp/ostore as the default location for the following files:
AIX Considerations
The following information provides additional considerations for ObjectStore Release 5 on AIX. Using SCSI Tape Drives
When using tapes with the osbackup and osrestore utilities, you have several choices of how to configure SCSI tape drives as output devices on the RISC System/6000. These choices offer tradeoffs between convenience and performance.
This situation does not occur when Use Device Buffers is set to no, and it is not necessary to specify a tape size to the osbackup command.
The use of variable-size blocks on QIC-120 or QIC-150 media is apparently unique to IBM. If you write variable-size blocks on such a tape, you will not be able to read it on another system.
You can also use fixed-size records, which can facilitate tape duplication under certain circumstances.
To use fixed-size records, you must either set block_size in bytes in SMIT or with chdev, or use the -b control argument to osbackup to specify the block size in 512-byte sectors. Note that the osbackup command option overrides the SMIT setting, unlike utilities such as tar, where the SMIT setting takes precedence.
The block size must be 512 bytes or less. The osbackup utility cannot work when the block size is greater than 512 bytes.
-root=server_host_nameto the exportfs command or to the line in the /etc/exports file. server_host_name is the name of the host of the ObjectStore Server.
Failing to perform both steps can cause permission errors.
# lsattr -E -l sys0 -a maxuproc
maxuproc 40 Maximum # of processes allowed per user TrueTo increase the maxuproc parameter, enter the following command:
# chdev -l sys0 -a maxuproc=200
sys0 changedWhen the number of processes allowed per user is too low, you might receive the following error:
No handler for exception: permission to access this database was denied re /usr/lpp/ostore/lib/liboscol.ldb while looking up file database /usr/lpp/ostore/lib /liboscol.ldb (host "aix_server1") gmake: *** [AIX/os_schema.C] Error 1 aix_server1> ps -efl | grep ostore 260801 S root 19379 3967 0 60 20 12892 516 Feb 23 - 0:00 /usr/lpp/ostore/lib/cmgr3 -AIX_SRC 200801 S pbergstr 32347 41739 1 60 20 11051 88 6052824 14:01:27 pts/15 0:00 grep ostore 262801 S pbergstr 40254 3967 0 60 20 9e3 1372 14:00:31 - 0:00 / usr/lpp/ostore/lib/osserver -AIX_SRC aix_server1>
Updated: 03/26/98 20:44:42