<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Testing script concurrently that fully saturates all CPUs in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Testing-script-concurrently-that-fully-saturates-all-CPUs/m-p/771055#M39626</link>
    <description>&lt;P&gt;I'm not quite sure what you mean by&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;I&amp;nbsp;am trying to create a complex script that fully saturates all CPUs capacity and it still doesn't create a huge impact on CPU processing.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Can you expand on this?&lt;/P&gt;</description>
    <pubDate>Wed, 29 Sep 2021 02:28:49 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2021-09-29T02:28:49Z</dc:date>
    <item>
      <title>Testing script concurrently that fully saturates all CPUs</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Testing-script-concurrently-that-fully-saturates-all-CPUs/m-p/771052#M39625</link>
      <description>&lt;P&gt;Hi SAS experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our project is to upgrade CPUs from 6 cores to 16 cores and we want to show our stakeholders the improvement before and after the upgrade complete.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefore, I&amp;nbsp;am trying to create a complex script that fully saturates all CPUs capacity and it still doesn't create a huge impact on CPU processing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I would really appreciate if you can give me some directions here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
/* Start timer */
%let _timer_start = %sysfunc(datetime());



%MACRO LOOPCOMN (Output=, String1= , String2= , String3=);
DATA COMPGED_&amp;amp;OUTPUT ;
X= &amp;amp;String1;
Y= &amp;amp;String2;
Z= &amp;amp;String3;
Cost1 = compged(X,Y);
Cost2 = compged(Y,Z);
Cost3 = compged(X,Z);
Calculation1 = SUM(( compged(X,Y)),(compged(Y,Z)));
result1=soundex(X);
result2=soundex(Y);
result3=soundex(Z);

  call symput('var1',Cost1);
  call symput('var2',Cost2);
  call symput('var3',Cost3);

RUN;

%MEND ;
%LOOPCOMN 
(Output = Test1,
 String1= 'kjfkjdsfkjhsdkjfkjshkjdshkjshkjhkjhkjhkhkjhgkjfdhkjfdhkjhkjhgkjhdfkjghfdkjhkjhkurwhyiwuh', 
 String2= 'uriufkjvcbvijivkjnienijninuijnlkjnvijnr kjnkjnkjrnijnkjnvrnj ourjoijvkmlkmntrobtr' ,
 String3= 'sdfbksjgbaorgtpaorkalsjdbvnaklijfgiUAToijfelMBNVCkjfgaiurghODFLDKJGNIUEARHOijflgkjbhg')
;
%LOOPCOMN 
(Output = Test2,
 String1= 'kjfkjdsfkjhsdkjfkjshkjdshkjshkjhkjhkjhkhkjhgkjfdhkjfdhkjhkjhgkjhdfkjghfdkjhkjhkurwhyiwuhuriufkjvcbvijivkjnienijninuijnlkjnvijnr kjnkjnkjrnijnkjnvrnj ourjoijvkmlkmntrobtr', 
 String2= 'uriufkjvcbvijivkjnienijninuijnlkjnvijnr kjnkjnkjrnijnkjnvrnj ourjoijvkmlkmntrobtraorgtpaorkalsjdbvnaklijfgiUAToijfelMBNVCkjfgaiurghODFLDKJGNI' ,
 String3= 'sdfbksjgbaorgtpaorkalsjdbvnaklijfgiUAToijfelMBNVCkjfgaiurghODFLDKJGNIUEARHOijflgkjbhgrjoijvkmlkmntrobtraorgtpaorkalsjdbvnaklijfgiUAToijfelMBNVCkjfgkjfkjdsfkjhsdkjfkjshkjdshkjshkjhkjhkjhkhkjhgkjfdhkjfdhkjhkjhgkjhdfkjghfdkjhkjhkurwhyiwuhuriu')
;


%macro loop( start= , end= , by= ) ;

%local i;
%do i = 1 %to %eval(%sysfunc(Ceil(%sysevalf((&amp;amp;end - &amp;amp;start ) / &amp;amp;by ) ) ) +1) ;
   %let value=%sysevalf(( &amp;amp;start - &amp;amp;by ) + ( &amp;amp;by * &amp;amp;i )) ;
   %if &amp;amp;value &amp;lt;=&amp;amp;end %then %do;
      %put &amp;amp;value;
   %end;
%end ;
%mend loop ;

%loop(start = 1 , end = 10000000 , by = .000000125 )

data T;
do I=1 to 100000; 
A=sha256(prxchange('s/a/b/',-1,repeat('a',2000))); end;
run;

/* Stop timer */
data _null_;
  dur = datetime() - &amp;amp;_timer_start;
  put 30*'-' / ' TOTAL DURATION:' dur time13.2 / 30*'-';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 00:08:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Testing-script-concurrently-that-fully-saturates-all-CPUs/m-p/771052#M39625</guid>
      <dc:creator>CloudyMind</dc:creator>
      <dc:date>2021-09-29T00:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Testing script concurrently that fully saturates all CPUs</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Testing-script-concurrently-that-fully-saturates-all-CPUs/m-p/771055#M39626</link>
      <description>&lt;P&gt;I'm not quite sure what you mean by&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;I&amp;nbsp;am trying to create a complex script that fully saturates all CPUs capacity and it still doesn't create a huge impact on CPU processing.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Can you expand on this?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 02:28:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Testing-script-concurrently-that-fully-saturates-all-CPUs/m-p/771055#M39626</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-09-29T02:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Testing script concurrently that fully saturates all CPUs</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Testing-script-concurrently-that-fully-saturates-all-CPUs/m-p/771060#M39627</link>
      <description>&lt;P&gt;What type of&amp;nbsp; "improvements" are you expecting? As a general rule additional CPUs are not going to speed up your SAS processing. It will allow you to run more simultaneous jobs without maxing out your CPU usage.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rather than develop an artificial test, I'd suggest you make use of one of your regular production jobs that takes at least 5-10 mins to run. Modify it so it doesn't output anything permanent, then run it in batch mode. Make a note of the % CPU used. Then run the same job again twice at the same time, three times, four times, etc. Running six instances of the same job simultaneously should heavily load a SAS app server with only six processors. Run more instances if it doesn't.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Repeat this process after the CPU upgrade and you should now see a much reduced % CPU usage. Again you can run many more instances of your test job to confirm how many it can now cope with.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 03:53:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Testing-script-concurrently-that-fully-saturates-all-CPUs/m-p/771060#M39627</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-09-29T03:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Testing script concurrently that fully saturates all CPUs</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Testing-script-concurrently-that-fully-saturates-all-CPUs/m-p/771070#M39630</link>
      <description>&lt;P&gt;Whenever you read and/or write data, the I/O subsystem most likely becomes the limiting factor. Unless you run mostly CPU intensive regression jobs or do all processing in-memory (CAS), look at improving your storage first.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 05:42:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Testing-script-concurrently-that-fully-saturates-all-CPUs/m-p/771070#M39630</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-09-29T05:42:37Z</dc:date>
    </item>
  </channel>
</rss>

