Desktop productivity for business analysts and programmers

Job on server after EG has been closed

Accepted Solution Solved
Reply
Contributor ckx
Contributor
Posts: 54
Accepted Solution

Job on server after EG has been closed

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


Accepted Solutions
Solution
‎03-15-2013 08:22 AM
Community Manager
Posts: 2,697

Re: Job on server after EG has been closed

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

View solution in original post


All Replies
Solution
‎03-15-2013 08:22 AM
Community Manager
Posts: 2,697

Re: Job on server after EG has been closed

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

Respected Advisor
Posts: 3,124

Re: Job on server after EG has been closed

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

Community Manager
Posts: 2,697

Re: Job on server after EG has been closed

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

Contributor ckx
Contributor
Posts: 54

Re: Job on server after EG has been closed

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

Community Manager
Posts: 2,697

Re: Job on server after EG has been closed

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

Contributor ckx
Contributor
Posts: 54

Re: Job on server after EG has been closed

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

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 451 views
  • 0 likes
  • 3 in conversation