LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 22 Feb 2006 09:26:16 -0500
Reply-To:   Michael Raithel <michaelraithel@WESTAT.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Michael Raithel <michaelraithel@WESTAT.COM>
Subject:   Re: "BUFSIZE" for catalogs
Content-Type:   text/plain; charset="us-ascii"

Dear SAS-L-ers,

Steven Dubnoff posted the following:

> I have asked this before, but I think I may not have stated > the problem clearly enough. The system option BUFSIZE > controls the size of a data page in SAS datasets. Is there > an analogous option for catalogs? Or, failing that, anyway, > under Windows, to control the size of the on disk storage > page for catalog files. >

Steven, I remember seeing this question about a week ago, though I cannot remember if you were the one who posted it. I see that the ever-prolific Peter Crawford has already answered the question (use the CBUFSIZE option). However, I think you might find some additional information helpful. So, allow me to ramble...

There are three options that control the performance of SAS catalogs:

CBUFSIZE - The size (in bytes) of a SAS catalog page. SAS stores catalogs entries on a catalog page. The page is the unit that is moved between disk and storage, via I/O's, when the catalog is processed. It is only when the catalog page is in a buffer in computer memory that SAS can access the objects stored on that catalog page. The bigger the CBUFSIZE, the more catalog entries are potentially moved between disk and memory with each I/O.

The CBUFSIZE option has been experimental for a while. It used to be that you could only invoke it by specifying:

OPTIONS $CBUFSIZE=whatever-value-you-wanted;

...or by entering the following in a config file:

-CBUFSIZE whatever-value-you-wanted

I am not totally clear on the history, but it appears that it is now ready for Prime Time. However, it does not show up in a "regular" run of PROC OPTIONS. You must run either of the following to see the current value:

proc options option=cbufsize internal; run ; /* As Peter indicated */

or:

proc options internal; run ; /* To view it among many and sundry other options */

When considering using CBUFSIZE, make sure that you specify it well-ahead of the part of the program where you create a new catalog. A catalog's page size is set when the catalog is first created and cannot be changed for the life of the catalog.

CBUFNO - Is the number of catalog page buffers to allocate in memory for each SAS catalog that is opened. By increasing the number of buffers available for catalog pages, you can reduce the overall number of I/O's associated with processing catalog objects. I have found CBUFNO=5 (the default is one) to be a good all-around number to use. Note that catalog buffers are carved out of memory; so if you are memory constrained, you will want to tread softly with this option.

CATCACHE - Is the number of SAS catalogs that may be kept open at one time during the execution of a SAS program. The default is zero, which means that SAS opens a catalog (when necessary), uses its objects, and then SAS closes the catalog. If that catalog is needed again, later on in the program, SAS must reopen it, re-use it, and re-close it. The default value can result in wasted computer resources as SAS constantly opens and closes the same catalog or group of catalogs. It can be especially inefficient when there is a lot of catalog processing; say with replaying cataloged SAS Graphs or with SAS/AF and SAS/FSP applications.

I have found it difficult to come up with a rule of thumb for the value of CATCACHE. So, I just set it to OPTIONS CATCACHE=5; and call it a day. You might want to experiment with this option, and maybe, someday, tell the list what you have determined regarding a good all-around value.

Steven, best of luck as you catalog the possibilities of making your SAS catalogs more efficient!

I hope that this suggestion proves helpful now, and in the future!

Of course, all of these opinions and insights are my own, and do not reflect those of my organization or my associates. All SAS code and/or methodologies specified in this posting are for illustrative purposes only and no warranty is stated or implied as to their accuracy or applicability. People deciding to use information in this posting do so at their own risk.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Michael A. Raithel "The man who wrote the book on performance" E-mail: MichaelRaithel@westat.com

Author: Tuning SAS Applications in the MVS Environment

Author: Tuning SAS Applications in the OS/390 and z/OS Environments, Second Edition http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=58172

Author: The Complete Guide to SAS Indexes http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=60409

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Be true to your work, your word, and your friend. - Henry David Thoreau +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Back to: Top of message | Previous page | Main SAS-L page