|Date: ||Tue, 20 Aug 2002 07:53:53 -0400|
|Reply-To: ||Michael Raithel <RAITHEM@WESTAT.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Michael Raithel <RAITHEM@WESTAT.COM>|
|Subject: ||Re: BUFNO etc|
|Content-Type: ||text/plain; charset="iso-8859-1"|
Drew Goodchild posted the following interesting question:
>Has anyone had any experience fine tuning the various buffer options
>(BUFNO etc) for SAS 8.2 running on AIX 4.3 (or similar)
>We have some *fairly* large datasets that we read/write/manipulate.
>Performance is ok, but could be improved (how many times have you
>So, if anyone has come across the optimum (or close) set of options,
>can you please let me know (I'll stick you on my Christmas card list).
Drew, I wouldn't mind getting a Christmas Card from across the Dark and
Stormy Atlantic, so here are some of my comments about BUFNO:-)
I have made a pretty good career out of Tuning SAS Applications in the MVS
Environment. One of my big tricks is to use BUFNO. By ramping it up, past
the default (of 3), you can vastly improve the sequential processing of SAS
data sets on MVS. This is true because, on MVS, the SAS System uses
proprietary code that chains I/O's together, so that multiple buffers are
filled in a single I/O.
Consequently, on MVS, if you have 3 buffers, the SAS System will attempt to
fill all 3 with a single I/O. If you double the number of buffers, via
BUFNO, SAS will attempt to fill all 6 with a single I/O. There is a
break-even number of BUFNO such larger quantities do not produce further
reductions in I/O's. That break-even point is generally system dependent.
Also, as somebody will undoubtedly be quick to point out, BUFNO buffers are
carved out of your address space's memory and hence, larger values of BUFNO
mean more memory is needed by your application. The amount of buffer memory
needed will be:
BUFNO * BUFSIZE
With all of that said, I have not applied BUFNO to SAS applications running
under AIX. However, I would not be surprised if it worked in a similar
_GREAT_ fashion. I would advise experimentation and, of course, letting the
List know if it is fruitful!
Hmmm... thinking about this: you might also consider the BUFSIZE option for
large SAS data sets. The BUFSIZE option allows you to specify the SAS data
set page size for a given SAS data set. This can only be done once, when
the SAS data set is created, and lasts forever--well, nothing lasts forever;
it lasts until the SAS data set is destroyed. As we all know, observations
live on SAS data set pages, and when we increase the SAS data set page size
(using BUFSIZE), more observations can live together in peaceful harmony on
the larger page. Under MVS, the SAS System attempts to move sas data pages
during an I/O. So, the larger the page size, the more happy, harmonious
observations are moved in an I/O from DASD or TAPE into the buffers in
memory. Consequently, larger BUFSIZEs can also lead to great reductions in
I/O's for SAS programs. Again, this is at the cost of computer memory.
Drew, best of luck to you as you take control of the performance of your SAS
applications running under AIX! Oh, and E-mail the Christmas card to the
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"
Author: Tuning SAS Applications in the MVS Environment
Every great advance in science has issued from a new audacity
of imagination. - John Dewey