Managing Metadata Server Performance |
About %OMARUNAN and the RUNANALYSIS Option of %OMABAKUP |
To optimize the usage of memory on the metadata server, you should occasionally run the %OMARUNAN macro. This macro analyzes the handling of character variables, checking for items as unnecessary indexes, long character variables that can be stored as variable-length strings, and duplicate strings.
As an alternative to running the %OMARUNAN macro, you can set the RUNANALYSIS parameter to YES when you use %OMABAKUP to perform a backup; or select Run Analysis Procedure when you use the Backup Wizard. This causes the %OMARUNAN macro to be executed after the backup is complete and after client activity has resumed on the metadata server.
The next time %OMABAKUP or the Backup Wizard is used to perform a backup, it uses the results of the analysis to perform memory optimization tasks. To take advantage of the analysis, consider executing a second backup anytime you use the RUNANALYSIS option of %OMABAKUP, anytime you use the Run Analysis Procedure option in the Backup Wizard, or anytime you use the %OMARUNAN macro.
The RESTORE option deletes the DS_VCHAR data sets from the backup directories before restoring repositories to their registered locations.
When to Optimize Memory Usage |
It is not necessary to perform character variable analysis on a regular basis. Variable usage is unlikely to change much unless you add or delete a significant percentage of the total metadata in a repository. The analysis is most useful after metadata is first loaded into SAS metadata repositories and after significant updates are applied.
How Memory Optimization Works |
The following processing occurs when you run the %OMARUNAN macro, when you use %OMABAKUP with the RUNANALYSIS option, or when you use the Run Analysis Procedure option in the Backup Wizard:
The subprogram accesses the repository data sets in the backup destination. In each data set, it analyzes the handling of character variables. The analysis checks for such items as unnecessary indexes, long character variables that can be stored as variable-length strings, and duplicate strings.
For each repository, the subprogram stores the results of the analysis in a data set called DS_VCHAR. This data set is stored in the same directory as the backup repository data sets.
Therefore, if you run %OMABAKUP in restore mode after having used %OMARUNAN or the RUNANALYSIS %OMABAKUP option, the optimizations will be lost.
The next time %OMABAKUP is used to perform a backup, it merges the information in each repository's DS_VCHAR data set with the repository's METAIMDB data set. This merge operation occurs in the repository's registered location after the backup operation has been completed.
The next time the repository's records are loaded into the metadata server's memory, the updated information in the METAIMDB data set is used to optimize the memory usage. The optimizations are not applied to repository data sets on disk.
Choosing Whether to Use %OMARUNAN or the RUNANALYSIS Option of %OMABAKUP |
The RUNANALYSIS option executes on the metadata server host immediately after a backup, which can consume host resources at a time when client requests have resumed.
You can execute %OMARUNAN at any time. In addition, you can execute %OMARUNAN from any computer that has SAS licensed and that has a network connection to the computer where the backup files are stored.
To minimize the impact of %OMARUNAN on the metadata server computer, you can choose to do either of the following:
Direct the backups to a drive that the metadata server can access over the network, and run %OMARUNAN on that computer.
If you do not have another networked computer that has a SAS license, run %OMARUNAN on the metadata server during a period of low activity.
Using the %OMARUNAN Macro |
Because the %OMARUNAN macro analyzes backup copies of SAS Metadata Repositories, a backup copy of SAS Metadata Repositories must have been created by using either %OMABAKUP or the Backup Wizard before you run %OMARUNAN.
%OMABAKUP also creates the OMA_Varan.sas7bcat catalog that is used by %OMARUNAN. The creation of this catalog has two implications for running %OMARUNAN:
The catalog is created to the specifications of the host operating environment; therefore, you need to execute %OMARUNAN in the same operating environment in order to be able to read the catalog. That is, if the backups are created on a UNIX host, then you need to execute %OMARUNAN from another UNIX host.
The information in OMA_Varan.sas7bcat reflects the last backup that was made. That is, if a full backup was made, then OMA_Varan.sas7bcat contains information to analyze all repositories that are registered on the SAS Metadata Server. Keep this in mind when you choose backups that you want to analyze.
Because %OMARUNAN does not interact directly with the SAS Metadata Server, no special user IDs or server privileges are required to execute the macro. However, the user executing the macro needs full operating system access to the SAS Metadata Server backup destination path and all subdirectories.
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.