Desktop productivity for business analysts and programmers

Size of work library in SAS EG

Reply
Contributor
Posts: 21

Size of work library in SAS EG

Hi,

 

I have a data size of approx 2 TB , so what should be the size of my work library when I have 4 parallel users on SAS EG.

 

I also have files like SAS_util***********_servername being created in my work library, what are these files for.

 

Regards

Amit Verma

 

Esteemed Advisor
Posts: 6,661

Re: Size of work library in SAS EG

SAS_util* is the place for utility files that are used during sorts and sql steps.

Their physical location can be controlled through the utilloc= system option.

For starters, I'd calculate the size for WORK as

(size of largest dataset) * 3 * (maximum number of concurrent users)

Activate (or have activated) the quota system for that filesystem and set reasonable quotas; otherwise one runaway step of a user can stop server functionality for all others.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 21

Re: Size of work library in SAS EG

Thanks for the guidance.

 

How do I find the size of the largest dataset , that exists in my system.

 

Regards

Amit verma

Esteemed Advisor
Posts: 6,661

Re: Size of work library in SAS EG

Using the operating system:

Determine the physical paths of your libraries.

Log on to the server (PuTTY or similar), change directory to that locations, and use dir or ls (depending on operating system) *.sas7bdat to display your datasets.

In UNIX, you can do

du -k *.sas7bdat|sort -nr|head

(display disk usage for all .sasbdat files, sort numeric reverse by first column, display only the first 10)

in a given directory.

 

Using SAS:

proc sql;
select
  max(filesize)
from dictionary.tables
group by libname
;
quit;

This requires that all libraries on your system are active in your process (libname assigned) at the time you run this.

dictionary.tables is a virtual table that is built dynamically on request.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 21

Re: Size of work library in SAS EG

Thanks for the reply.

Just a confirmation that the size that we receive from the proc output is an Kilobyte ?

Esteemed Advisor
Posts: 6,661

Re: Size of work library in SAS EG

The filesize in dictionary.tables (or sashelp.vtable, which is a view to the same dynamic resource) is in bytes; the output of my UNIX command is in Kbytes, because of the -k commandline parameter.

Without the -k, du would report disk blocks, which is not that informative, as it may be dependent on individual filesystem parameters.

If you want to make both outputs comparable, divide the value from dictionary.tables by 1024.

 

By testing I found that there may be slight differences between the filesize value reported in dictionary.tables and proc contents (proc contents has the correct one). But that is in the range of a few K and therefore negligible.

There is also a slight difference between file size and the du value, that depends on technical aspects of the filesystem interna. Also negligible.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 5 replies
  • 389 views
  • 0 likes
  • 2 in conversation