BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ckx
Quartz | Level 8 ckx
Quartz | Level 8

Could someone clarify what happens to SAS jobs on a server after Enterprise Guide has been closed?

Normally, it seems that when you shutdown or terminate EG from the task manager that the SAS processes you initiated on the server are terminated. For example, if you've written a SAS program that writes output to a network location, the output is not created, even though the server could complete the process after you'd given the run command.

But we've found that in some cases, processes can continue to run on the server, not creating output in fact but eating CPU cycles. At some point, the server crawls to a slow and the IT department needs to kill these runaway processes or even reboot the server. Can anyone explain how and when this occurs? We suspect it's related to EG being terminated using task manager while CPU-intensive processes like proc mixed are being run on the server. Perhaps there are sever settings that could prevent or correct this problem?

We're using EG 4.3 with SAS 9.2, most client PCs are running WinXP, a few run Win7.

Thanks for any help,

John Hendrickx

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

Think of the connection between EG and the SAS server like a phone conversation.

For the most part, it's a dialogue.  EG "talks" (sends information, programs) to SAS, and SAS talks back (sends log, results).

If you close EG, that's like "hanging up".  EG does issue a Close command to SAS, but even if EG terminates "unnaturally" (killed process), SAS will realize there is no listener and will close on its own.

But if the EG user asks SAS to solve a tough problem (big MIXED model, long SQL query) it might be a while before SAS can respond with the answer.  Then if the EG user "hangs up the phone" (closes EG or kills the SEGuide.exe process), SAS won't realize that until it's ready to respond to the request...at which time it will realize there is no listening client any longer, and will shut down.

An EG user can close SAS even when SAS is busy.  See this post for details:

Cancelling a SAS job gone awry - The SAS Dummy

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

View solution in original post

6 REPLIES 6
ChrisHemedinger
Community Manager

Think of the connection between EG and the SAS server like a phone conversation.

For the most part, it's a dialogue.  EG "talks" (sends information, programs) to SAS, and SAS talks back (sends log, results).

If you close EG, that's like "hanging up".  EG does issue a Close command to SAS, but even if EG terminates "unnaturally" (killed process), SAS will realize there is no listener and will close on its own.

But if the EG user asks SAS to solve a tough problem (big MIXED model, long SQL query) it might be a while before SAS can respond with the answer.  Then if the EG user "hangs up the phone" (closes EG or kills the SEGuide.exe process), SAS won't realize that until it's ready to respond to the request...at which time it will realize there is no listening client any longer, and will shut down.

An EG user can close SAS even when SAS is busy.  See this post for details:

Cancelling a SAS job gone awry - The SAS Dummy

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Haikuo
Onyx | Level 15

Hi Chris,

I have been following your blog, and it has been tremendously helpful. I do have a SAS server related question, in regarding resource management. Say if EG User A fires up one big job_a which will chew up all of the resources, after that, EG User B launches  job_b from a different location, and both jobs are not batch jobs, they are ad-hoc interactive SAS job by nature. In this case, will SAS server put job_b on hold in Que until job_a finished or SAS server can be managed in a way that it will rearrange the resource (CPU, RAM etc), so job_b can run at the same time? If yes, how? if no, then is there an utility to alarm SAS admins that this is happening ( say CPU is at 99% for more than 10 minutes by one job, etc)? 

Sorry OP, for borrowing your platform.

Haikuo

ChrisHemedinger
Community Manager

Haikuo,

Each EG user/session gets its own SAS session (SAS process).  So if one SAS process consumes all of the resources, that will affect the other users.  EG doesn't perform any "cross-user" job scheduling to balance this.

There are approaches for server process load-balancing, some at the SAS level and some at the OS level.

I've linked to some resources here that might help you decide how to manage this:

Performance-enhancing SAS notes - The SAS Dummy

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
ckx
Quartz | Level 8 ckx
Quartz | Level 8

A user who turned out to be responsible for bogging down our server thinks the problems were caused by him not rebooting his laptop for a few days. Before rebooting, just running a data step in EG would cause problems, after rebooting everything including his proc mixed programs ran smoothly.

Could operating system instability play a role in some way? I can see how instability might affect the EG client performance. Could that somehow be related to runaway processes on the server? I can't see how but I thought I'd ask.

Have a nice weekend,

John Hendrickx

ChrisHemedinger
Community Manager

I don't see how rebooting the client PC would make a difference.  But closing an EG session, thus ending the SAS session and clearing all options and scratch data, might have an impact.

I always recommend closing EG when you're done using it.  Unless you are working with a long running project, there is no advantage to keeping it open for days at a time.  Your SAS session can accumulate files you don't need in temp space, and your SAS process, even while idle, can consume resources on the server. 

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
ckx
Quartz | Level 8 ckx
Quartz | Level 8

Hi Chris, Thanks for the helpful answer! The issue seems to be that proc mixed can sometimes take a long time to finish and consume a lot of resources, which takes us to Haikuo's question. The link on how to cancel a SAS program in EQ is very useful, much easier to explain than the "Click on the tiny red "stop" button".

Many thanks,

John Hendrickx

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 6 replies
  • 2671 views
  • 0 likes
  • 3 in conversation