Oracle® Internet Directory Administrator's Guide,
10g Release 2 (10.1.2) Part No. B14082-01 |
|
![]() Previous |
![]() Next |
The term "garbage" refers to any data not needed by the directory but still occupying space on it. This unwanted or obsolete data can eventually fill up the disk and decrease directory performance. The process of removing this unwanted data from the directory is called garbage collection.
This chapter contains these topics:
About the Oracle Internet Directory Garbage Collection Framework
Enabling and Disabling Logging for Oracle Internet Directory Garbage Collectors
A garbage collector is a background database process that removes unwanted data from the directory. The Oracle Internet Directory garbage collection framework provides a default set of garbage collectors, and enables you to modify them.
This section contains these topics:
This section describes the components that make up the Oracle Internet Directory garbage collection framework, namely, the garbage collection plug-in and the garbage collectors themselves.
Garbage collection in Oracle Internet Directory relies on a garbage collection plug-in that receives requests to manage garbage collectors. This plug-in is installed with Oracle Internet Directory, and is enabled by default. The entry for this plug-in is cn=plugin,cn=subconfigsubentry
.
This plug-in has three triggers:
The DN of the plug-in trigger used to create a garbage collection job is: cn=Add PurgeConfig,cn=plugin,cn=subconfigsubentry
.
The DN of the plug-in trigger used to modify a garbage collection job is: cn=Modify PurgeConfig,cn=plugin,cn=subconfigsubentry
.
The DN of the plug-in trigger used to delete a garbage collection job is: cn=Delete PurgeConfig,cn=plugin,cn=subconfigsubentry
.
See Also: "Garbage Collection Schema Elements" for a list and descriptions of the attributes of the garbage collection plug-in |
Garbage collectors are background database processes that are invoked by the garbage collection plug-in. You can set and manage these behaviors of a garbage collector:
The subtree in which it purges data
The time it starts
The age of the data you want it to purge
How often it runs
The type of data you want it to purge
The number of entries to purge at a time
A default installation of Oracle Internet Directory includes these predefined garbage collectors:
Audit log garbage collector—Cleans up obsolete entries created for auditing the directory. The container for this garbage collector is cn=auditlog purgeconfig,cn=purgeconfig,cn=subconfigsubentry
.
Change log garbage collector—Cleans up the consumed change log entries in the directory. The container for this garbage collector is cn=changelog purgeconfig, cn=purgeconfig,cn=subconfigsubentry
.
General statistics garbage collector—Cleans up obsolete entries created by Oracle Internet Directory Server Manageability for monitoring general statistics of the directory. The container for this garbage collector is cn=general stats purgeconfig, cn=purgeconfig,cn=subconfigsubentry
.
Health statistics garbage collector—Cleans up obsolete entries created by Oracle Internet Directory Server Manageability for monitoring health statistics of the directory. The container for this garbage collector is cn=health stats purgeconfig, cn=purgeconfig,cn=subconfigsubentry
.
Security and refresh events garbage collector—Cleans up obsolete entries created by Oracle Internet Directory Server Manageability for monitoring security and refresh events of the directory. The container for this garbage collector is cn=secrefresh events purgeconfig, cn=purgeconfig,cn=subconfigsubentry
.
System resource events garbage collector—Cleans up obsolete entries created by Oracle Internet Directory Server Manageability for monitoring system resource events of the directory. The container for this garbage collector is cn=sysresource events purgeconfig, cn=purgeconfig,cn=subconfigsubentry
.
Tombstone garbage collector—Cleans up obsolete entries marked as deleted in the directory. The container for this garbage collector is cn=tombstone purgeconfig, cn=purgeconfig,cn=subconfigsubentry
.
Note: Oracle recommends that you not delete any of the predefined garbage collectors. Deleting one or more of them can result in the proliferation of obsolete data, eventually exhausting all the available disk space.You may, however, modify predefined garbage collectors to customize their behavior. |
Figure 22-1 shows an example of a garbage collector operation that purges change log entries.
As the example in Figure 22-1 shows, the garbage collection process is as follows:
An LDAP client sends to the directory server a request for a particular garbage collection operation. The operation could be, for example, to purge the entries of tombstones, change logs, or audit logs.
The directory server passes the request to the garbage collection plug-in.
The garbage collection plug-in sends the request to the garbage collection engine in the Oracle Internet Directory-designated database.
The garbage collection engine triggers the corresponding garbage collector—in this case, the change log garbage collector. The garbage collector runs as a background database process according to the parameters specified in its configuration set entry.
Garbage collector entries, each with attributes specifying how it is to behave, are located in the entry cn=purgeconfig
, which is located immediately below the entry cn=subconfigsubentry
.
See Also: Table B-10, "Garbage Collection Configuration Parameters" for a description of each garbage collector attribute |
Figure 22-2 shows the location of these entries.
The change log garbage collector purges change logs that are not needed by any party. This prevents the change log from becoming too large. Change log purging takes place in Oracle Internet Directory in two ways:
You enable change number-based purging by setting the orclpurgetargetage
attribute of the change log garbage collector container entry to a greater-than-zero integer value (in hours). When change number-based purging is enabled, it behaves as follows:
If replication is configured, it respects replication change log processing.
If there are any change log subscribers enabled, it respects their change log processing status.
This is the default method. To use this method, you configure the change log garbage collector container entry as follows
Delete the attribute orclpurgetargetage
.
Set the attribute orclpurgetargetage
to 0.
When time-based purging is enabled, it behaves as follows:
It respects replication change log processing status if replication is configured.
If there are any change log subscribers enabled, it discards their change log processing status.
Note: The container for the change log garbage collector iscn=changelog purgeconfig, cn=purgeconfig,cn=subconfigsubentry .
|
This section contains these topics:
To modify a garbage collector:
In the navigator pane, expand in succession Oracle Internet Directory Servers, directory server instance, Garbage Collection Management, then select the garbage collector you want to configure. The Garbage Collector Window appears in the right pane.
In the Garbage Collector window, enter the values for this garbage collector. These fields are described in Table C-9.
Choose Apply.
This section provides examples of how to modify garbage collectors by using command-line tools. The garbage collection attributes that you can modify are listed in "Garbage Collection Schema Elements".
Suppose that you want the tombstone garbage collector to run immediately. The LDIF would look like this:
dn: cn=tombstone purgeconfig, cn=purge config, cn=subconfigsubentry changetype:modify replace: orclpurgenow orclpurgenow: 1
Load this entry with ldapmodify.
ldapmodify -h hostname -p port# -D username -w passwd \
-f file_name_of_defined_entry
Suppose that you want to disable changelog garbage collector.
dn: cn=changelog purgeconfig, cn=purgeconfig, cn=subconfigsubentry changetype: modify replace: orclpurgeenable orclpurgeenable: 0
Load this entry with ldapmodify.
ldapmodify -h hostname -p port# -D username -w passwd \
-f file_name_of_defined_entry
This section contains these topics:
Enabling Logging for Oracle Internet Directory Garbage Collectors
Disabling Logging for Oracle Internet Directory Garbage Collectors
If you enable logging for garbage collectors, then the directory server writes the information into a file in the file system. This information includes:
The job identifier
A job description of the garbage collector
The number of entries purged
To enable logging of garbage collection information:
Set the orclpurgedebug
attribute to 1.
Set the orclpurgefilename
attribute to a valid file name for the log file
Set the orclpurgefileloc
attribute to the path name of the directory in which the log file is located.
Enable PL/SQL I/O. To do this:
In the database initialization file, include the following:
UTL_FILE_DIR=PATH_NAME
where PATH_NAME
is the one you specified in Step 3.
Restart the database.
See Also: The section on the UTL_FILE_DIR parameter type in the Oracle Database Reference |