Hi,
I've been using SAS 9.4 for a while, and I am trying out SAS Enterprise Guide. However, my EG is running proc bglimm a lot slower than SAS 9.4. I have EG 8.3 (64-bit) and SAS 9.4 (32-bit) on the same local Windows 11 laptop machine.
Here is a test case:
data ADSU;
call streaminit(1);
do USUBJID = 1 to 20;
do AVISIT = 1 to 3;
AVAL = rand('bernoulli', 0.8);
output;
end;
end;
run;
ods graphics off; ods exclude all; ods noresults;
proc bglimm data = ADSU nbi = 500 nmc = 200000 thin = 7 nthreads = 3
seed = 1 outpost = post plots = none;
class USUBJID AVISIT;
model AVAL = AVISIT /
dist = binary link = logit cprior = normal(var = 1);
random intercept / sub = USUBJID type = un nooutpost;
options validvarname=v7;
run;
ods graphics on; ods exclude none; ods results;
It take about 4x's longer to run this proc bglimm test case in EG than in SAS 9.4.
SAS 9.4 log below
NOTE: Copyright (c) 2016 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M7)
NOTE: This session is executing on the W32_10PRO platform.
NOTE: Analytical products:
SAS/STAT 15.2
SAS/ETS 15.2
SAS/OR 15.2
SAS/IML 15.2
SAS/QC 15.2
NOTE: Additional host information:
W32_10PRO WIN 10.0.22621 Workstation
NOTE: SAS initialization used:
real time 0.99 seconds
cpu time 0.18 seconds
NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened instead.
NOTE: All profile changes will be lost at the end of the session.
NOTE: Unable to open SASUSER.PROFILE. WORK.PROFILE will be opened instead.
NOTE: All profile changes will be lost at the end of the session.
1 data ADSU;
2 call streaminit(1);
3 do USUBJID = 1 to 20;
4 do AVISIT = 1 to 3;
5 AVAL = rand('bernoulli', 0.8);
6 output;
7 end;
8 end;
9 run;
NOTE: The data set WORK.ADSU has 60 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
10
11 ods graphics off; ods exclude all; ods noresults;
12 proc bglimm data = ADSU nbi = 500 nmc = 200000 thin = 7 nthreads = 3 seed = 1
NOTE: Writing HTML Body file: sashtml.htm
13 outpost = post plots = none;
14 class USUBJID AVISIT;
15 model AVAL = AVISIT /
16 dist = binary link = logit cprior = normal(var = 1);
17 random intercept / sub = USUBJID type = un nooutpost;
18 options validvarname=v7;
19 run;
NOTE: Generating the burn-in samples.
NOTE: Beginning sample generation.
NOTE: Beginning calculation of summary and diagnostics statistics.
NOTE: The data set WORK.POST has 28572 observations and 5 variables.
NOTE: PROCEDURE BGLIMM used (Total process time):
real time 18.23 seconds
cpu time 2.71 seconds
20 ods graphics on; ods exclude none; ods results
EG 8.3 log below
1 The SAS System 17:07 Wednesday, December 6, 2023
1 ;*';*";*/;quit;run;
2 OPTIONS PAGENO=MIN;
3 %LET _CLIENTTASKLABEL='Program';
4 %LET _CLIENTPROCESSFLOWNAME='Standalone Not In Project';
5 %LET _CLIENTPROJECTPATH='';
6 %LET _CLIENTPROJECTPATHHOST='';
7 %LET _CLIENTPROJECTNAME='';
8 %LET _SASPROGRAMFILE='';
9 %LET _SASPROGRAMFILEHOST='';
10
11 ODS _ALL_ CLOSE;
12 OPTIONS DEV=PNG;
13 GOPTIONS XPIXELS=0 YPIXELS=0;
14 %macro HTML5AccessibleGraphSupported;
15 %if %_SAS_VERCOMP_FV(9,4,4, 0,0,0) >= 0 %then ACCESSIBLE_GRAPH;
16 %mend;
17
18 data ADSU;
19 call streaminit(1);
20 do USUBJID = 1 to 20;
21 do AVISIT = 1 to 3;
22 AVAL = rand('bernoulli', 0.8);
23 output;
24 end;
25 end;
26 run;
NOTE: The data set WORK.ADSU has 60 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
27
28 ods graphics off; ods exclude all; ods noresults;
29 proc bglimm data = ADSU nbi = 500 nmc = 200000 thin = 7 nthreads = 3 seed = 1
30 outpost = post plots = none;
31 class USUBJID AVISIT;
32 model AVAL = AVISIT /
33 dist = binary link = logit cprior = normal(var = 1);
34 random intercept / sub = USUBJID type = un nooutpost;
35 options validvarname=v7;
36 run;
WARNING: No output destinations active.
NOTE: Generating the burn-in samples.
NOTE: Beginning sample generation.
NOTE: Beginning calculation of summary and diagnostics statistics.
NOTE: The data set WORK.POST has 28572 observations and 5 variables.
NOTE: PROCEDURE BGLIMM used (Total process time):
real time 1:09.18
cpu time 8.78 seconds
37 ods graphics on; ods exclude none; ods results;
38
39
40
2 The SAS System 17:07 Wednesday, December 6, 2023
41
42 %LET _CLIENTTASKLABEL=;
43 %LET _CLIENTPROCESSFLOWNAME=;
44 %LET _CLIENTPROJECTPATH=;
45 %LET _CLIENTPROJECTPATHHOST=;
46 %LET _CLIENTPROJECTNAME=;
47 %LET _SASPROGRAMFILE=;
48 %LET _SASPROGRAMFILEHOST=;
49
50 ;*';*";*/;quit;run;
51 ODS _ALL_ CLOSE;
52
53
54 QUIT; RUN;
55
I have read some other threads in the community that suggest the results format might be part of the issue. I believe I already turned off all results format (see screenshot below).
Does anyone have any ideas about what might be going on and, if possible, how to speed up EG 8.3?
Thanks,
Bryan
Thanks everyone for the help.
BillSawyer figured it out for me through a SAS support case. The speed difference between EG 8.3 and Base SAS 9.4 was eliminated by changing the sas.exe priority level to "high" using task manager (temporary) or editing Windows registry (more permanent).
Here is the temporary fix (i.e., have to do it every time you open EG):
1.) close BASE SAS.
2.) open EG and expand Local server so that it is active and checked green.
3.) from Windows command line/search enter: task manager then select Run as Admin
4.) in Task Manager click the Details tab
5.) from there right-click on sas.exe and choose Priority and choose High
Here is a link on how to do the more permanent fix (i.e., do not have to do it every time you open EG):
Thanks again!
Open Windows Task Manager and track CPU usage, memory and IO when running your tests - do there appear to be any constraints? It would be worth trying a few other PROCs or SAS programs to see if this is a more general problem or not.
SASKiwi,
The only difference I notice is in the CPU usage. Running the test case directly with SAS 9.4, the "SAS 9.4 for Windows (32 bit)" uses about 6% - 10% CPU. But running the test case with EG 8.3, the "SAS 9.4 for Windows (32 bit)" process uses only about 1% - 4% CPU. The EG 8.3 process itself used hardly any CPU.
Here is another test I ran using proc glimmix.
data ADSU;
call streaminit(1);
do USUBJID = 1 to 5000;
do AVISIT = 1 to 3;
AVAL = rand('bernoulli', 0.8);
output;
end;
end;
run;
ods graphics off; ods exclude all; ods noresults;
proc glimmix data = ADSU;
class USUBJID AVISIT;
model AVAL = AVISIT /
dist = binary link = logit;
random intercept / sub = USUBJID type = un;
options validvarname=v7;
run;
ods graphics on; ods exclude none; ods results;
Again, SAS 9.4 is about 4x's faster than EG 8.3.
SAS 9.4 time output below
NOTE: The covariance matrix is the zero matrix.
NOTE: PROCEDURE GLIMMIX used (Total process time):
real time 6.40 seconds
cpu time 4.20 seconds
EG time output below
NOTE: PROCEDURE GLIMMIX used (Total process time):
real time 31.12 seconds
cpu time 13.70 seconds
Maybe there is a constraint in EG 8.3 that is not occurring in SAS 9.4?
Your new tests suggest it is not a procedure-specific issue. Maybe you could run one of your programs in batch mode as well to see what a "no-interface" timing would be. My suspicion is that there is an overhead with EG in both transmitting SAS jobs and receiving the job results but I'm surprised that it is that much slower.
Does your EG reside on the same computer that is running SAS 9.4? Or are you now connecting to a server hosting EG?
ballardw,
Yes, both SAS 9.4 and EG 8.3 are installed directly on my local Windows machine.
@Hopeful wrote:
ballardw,
Yes, both SAS 9.4 and EG 8.3 are installed directly on my local Windows machine.
That doesn't completely answer the question. Enterprise Guide must be installed on PC. But for it to run SAS code it has to connect to a SAS session. If you have SAS installed on the same machine as you are running EG you COULD have connected to that version of SAS. But you could also have connected to another version of SAS that is running somewhere else on a different machine. It just depends on how your EG session is setup.
If they are running on the same machine then perhaps running EG is using up system memory and it is making the job run slower? Did you try running a program that is more I/O bound than proc bglimm? Do you also see the same performance difference?
Tom,
When running my proc bglimm test in EG, EG 8.3 only uses 106 MB and SAS 9.4 for Windows uses 22 MB (all to sas.exe). When running my proc bglimm test in SAS 9.4, SAS 9.4 for Windows uses 129 MB (38 MB are specific to sas.exe). My local machine has 128 GB RAM, and my entire system (all apps and background processes) only use 15-20% of Memory while running the tests.
As far as I can tell, my EG 8.3 is connected to my local SAS 9.4 (see screenshots below). Could you suggest a simple test for “a program that is more I/O bound than proc bglimm?”
Hi Hopeful,
With all default EG settings (Tools > Options > click Reset All)
your glimmix sample runs for me with consistent real and cpu times of 16-17 seconds, both directly from base SAS and also from EG 8.3 running against the same local base SAS.
So, I am seeing consistent and expected results.
You might consider running the code below from the two environments to compare the logs to see if there are any related differences:
%put _all_;
proc options;
run;
I use WinMerge to do a line-by-line file comparison to find discrepancies.
If no progress is made and you want to dig a bit deeper into this issue, I will be glad to assist if you want to open a new Case with SAS Technical Support.
Regards,
Bill
Thanks everyone for the help.
BillSawyer figured it out for me through a SAS support case. The speed difference between EG 8.3 and Base SAS 9.4 was eliminated by changing the sas.exe priority level to "high" using task manager (temporary) or editing Windows registry (more permanent).
Here is the temporary fix (i.e., have to do it every time you open EG):
1.) close BASE SAS.
2.) open EG and expand Local server so that it is active and checked green.
3.) from Windows command line/search enter: task manager then select Run as Admin
4.) in Task Manager click the Details tab
5.) from there right-click on sas.exe and choose Priority and choose High
Here is a link on how to do the more permanent fix (i.e., do not have to do it every time you open EG):
Thanks again!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.