BookmarkSubscribeRSS Feed
naveenraj
Quartz | Level 8

Hi All,

 

We have a SAS DI job that runs for 1 hour the day after server restart. On all subsequent runs the job is taking more than 4 hours till the server is restarted again. On checking the job logs, it is showing that jobs are long running at points where threaded sort is used. Can someone help me understand why after server restart the job runs fine for 1 time and then it is long running afterwards. Any pointers to help me trouble soot will be helpful

 

Thanks,

Naveen

2 REPLIES 2
hashman
Ammonite | Level 13

@naveenraj:

There may be a number of reasons. Sort performance depends mainly on the availability of sufficient sort work space and also memory if your SORTSIZE= system option is set up to take advantage of it. Just speculating, it could be that upon restarting the server, the sort work space is freed up since there're no other processes running yet, your job is competing with them for either work space or memory.

 

Kind regards

Paul D.    

ChrisNZ
Tourmaline | Level 20

A sort can take place in two ways:

- In memory (called "internal" sort). That's the fastest by far but requires ... memory.

You need the SORTSIZE option set properly, and memory available.

- If not enough RAM is available, the sort takes place on disk.

In this case, other processes using the disks can lead to more random (and therefore slower) access requests, due to concurrent read or write operations and due to fragmentation.

 

So to go back to your question:

1. Add the details option on proc sort to see what type of sort takes place

2. You'll then know what resource bottleneck is causing the issue.

3. Free more RAM if you can to try and run an internal sort if that's not the case.

4. If an internal sort is ruled out, faster hardware (solid state disks) helps tremendously. There is no excuse for the WORK area of SAS servers to not be SSD these days.

5. Splitting the WORK space and the UTIL space (option UTILLOC)  onto separate IO subsystems is also a good idea.

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 538 views
  • 0 likes
  • 3 in conversation