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 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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