LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (October 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 2 Oct 2007 22:48:19 -0700
Reply-To:     Patrick <patrick.matter@GMX.CH>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Patrick <patrick.matter@GMX.CH>
Organization: http://groups.google.com
Subject:      Re: set memory size for sas?
Comments: To: sas-l@uga.edu
In-Reply-To:  <1191378735.155212.13810@g4g2000hsf.googlegroups.com>
Content-Type: text/plain; charset="us-ascii"

What is "extreme large"?

What sometimes helps with Proc Sort is NOEQUALS - just because there is one thing less to care about and so a chance for a "faster" sort algorithm.

Proc Sort uses by default the maximum memory available (read text below from Online-Doc). May be you want to check if the default value is still accurate (could happen if there were later upgrades to the server where SAS is running and the SAS admin didn't change the value for max memory usage).

But else: Don't worry even with large datasets as long as you have enough disk space and time. If there is not enough memory then Sort just uses disc space - which takes quite a bit longer of course.

>From Online-Doc: ----------------------------------------------- SORTSIZE= Option

Limiting the Amount of Memory Available to PROC SORT You can use the SORTSIZE= option in the PROC SORT statement to limit the amount of memory available to the SORT procedure. This option can reduce the amount of swapping SAS must do to sort the data set. Note: If you do not specify the SORTSIZE= option, PROC SORT uses the value of the SORTSIZE system option. The SORTSIZE system option can be defined on the command line or in the SAS configuration file.

Syntax of the SORTSIZE= Option The syntax of the SORTSIZE= option is as follows: SORTSIZE=memory-specification where memory-specification can be one of the following: n specifies the amount of memory in bytes. nK specifies the amount of memory in 1-kilobyte multiples. nM specifies the amount of memory in 1-megabyte multiples. nG specifies the amount of memory in 1-gigabyte multiples.

Default Value of the SORTSIZE= Option The default SAS configuration file sets this option based on the value of the SORTSIZE system option. The default for the SORTSIZE system option is MAX; however, the value of MAX depends on your operating system. To view the value of MAX for your operating environment, run the following code: proc options option=sortsize; run; You can override the default value of the SORTSIZE system option by · specifying a different SORTSIZE= value in the PROC SORT statement · submitting an OPTIONS statement that sets the SORTSIZE system option to a new value · setting the SORTSIZE system option on the command line during the invocation of SAS.

Improving Performance with the SORTSIZE= Option In general, you should set the SORTSIZE= option no larger than the amount of physical memory available to the SAS process. If the SORTSIZE= value is larger than the amount of available memory, then the operating system will be forced to page excessively. If the SORTSIZE= value is too small, then not all of the sorting can be done in memory, which also results in more disk I/O. When the SORTSIZE= value is large enough to sort the entire data set in memory, you can achieve optimal sort performance. If the entire data set to be sorted will not fit in memory, SAS creates a temporary utility file to store the data. In this case, SAS uses a sort algorithm that is tuned to sort using disk space instead of memory. Note: You can also use the SORTSIZE system option, which has the same effect as the SORTSIZE= option in the PROC SORT statement.


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