<?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: Using parallel procesing (threads, cpucount) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-parallel-procesing-threads-cpucount/m-p/194792#M36625</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Trying to answer strictly:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"Is there anyway of seeing if my process runs parallel (log, option...)?"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;You already noticed the first way, by comparing real with CPU time. This is not however 100% reliable, so by setting the option MSGLEVEL=I, you will get a NOTE in the log that tells that the processing is using multiple threads:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: Multiple concurrent threads will be used to summarize data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"Is there bay other way to change paralellization options?"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Besides CPUCOUNT, not to my knowledge. I guess SAS uses threads when appropriate. However, you could if got access to OS tool be able to monitor your SAS process, but I can't really see the point if you are not having serious problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I read behind the lines, you wish to optimize your code. Besides threads, summarization needs memory, so increasing MEMSIZE/SORTSIZE&amp;nbsp; might help.&lt;/P&gt;&lt;P&gt;You said you are dong this over 50 millions datasets. DO you mean 50 million row datasets (not actually 50 M datasets, right - otherwise you have a serious structure problem &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; ). So if you wish to run multiple MEANS, do that in parallel, each wit CPUCOUNT=4. DO this using either MP CONNECT, or by having them executed in seperate SAS sessions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 05 Jul 2015 13:41:06 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2015-07-05T13:41:06Z</dc:date>
    <item>
      <title>Using parallel procesing (threads, cpucount)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-parallel-procesing-threads-cpucount/m-p/194791#M36624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use parallel processing in order to know the way to get better performance.(SAS EG 6.1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am doing a proc means over a 50 millions (no many fields) datasets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know much about parallel processing but I thinks the default option may be threads=YES. I suppose that because real time &amp;lt; cpu time (the half more or less), then I suppose that the procedure is executed with paralelization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anyway of seeing if my process runs parallel (log, option...)??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to modify the parallization options using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPTIONS THREADS=YES CPUCOUNT=8;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tested with 2,4,6 and 8 CPUs and the exec times remains very similar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there bay other way to change paralellization options?, is this usefull or SAS by default run parallel when needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice will be greatly apreciatted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options fullstimer;&lt;/P&gt;&lt;P&gt;OPTIONS THREADS=YES CPUCOUNT=8;&lt;/P&gt;&lt;P&gt;options mlogic mprint mtrace symbolgen;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let fecha_ini = %sysevalf(%sysfunc(date()) - 20);&lt;/P&gt;&lt;P&gt;%put fecha_ini = &amp;amp;fecha_ini;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data ventas(drop = i);&lt;/P&gt;&lt;P&gt;do i = 1 to 50000000;&lt;/P&gt;&lt;P&gt;cod_articulo = byte(80 + round(10*ranuni(1)))||put(round(ranuni(1)*100),z4.);&lt;/P&gt;&lt;P&gt;cod_centro = byte(65 + round(2*ranuni(1)))||put(round(ranuni(1)*5),z2.);&lt;/P&gt;&lt;P&gt;hc_venta = round(20*ranuni(1),.01);&lt;/P&gt;&lt;P&gt;fc_venta = &amp;amp;fecha_ini. + round(10*ranuni(1)) ;&lt;/P&gt;&lt;P&gt;format fc_venta ddmmyyn8.;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc means data=ventas noprint nway;&lt;/P&gt;&lt;P&gt;class cod_centro cod_articulo;&lt;/P&gt;&lt;P&gt;var hc_venta;&lt;/P&gt;&lt;P&gt;output out=ag_ventas(drop=_type_ _freq_)&lt;/P&gt;&lt;P&gt;sum(hc_venta) = suma_ventas ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;By default (no user option):&lt;/P&gt;&lt;P&gt;real time 2.29 segundos&lt;/P&gt;&lt;P&gt;user cpu time 5.57 segundos&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cpucount=4&lt;/P&gt;&lt;P&gt;real time 2.29 segundos&lt;/P&gt;&lt;P&gt;user cpu time 5.57 segundos&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cpucount=6&lt;/P&gt;&lt;P&gt;real time 2.30 segundos&lt;/P&gt;&lt;P&gt;user cpu time 5.54 segundos&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cpucount=8&lt;/P&gt;&lt;P&gt;real time 2.31 segundos&lt;/P&gt;&lt;P&gt;user cpu time 5.58 segundos&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 22:40:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-parallel-procesing-threads-cpucount/m-p/194791#M36624</guid>
      <dc:creator>juanvg1972</dc:creator>
      <dc:date>2015-07-02T22:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using parallel procesing (threads, cpucount)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-parallel-procesing-threads-cpucount/m-p/194792#M36625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Trying to answer strictly:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"Is there anyway of seeing if my process runs parallel (log, option...)?"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;You already noticed the first way, by comparing real with CPU time. This is not however 100% reliable, so by setting the option MSGLEVEL=I, you will get a NOTE in the log that tells that the processing is using multiple threads:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: Multiple concurrent threads will be used to summarize data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"Is there bay other way to change paralellization options?"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Besides CPUCOUNT, not to my knowledge. I guess SAS uses threads when appropriate. However, you could if got access to OS tool be able to monitor your SAS process, but I can't really see the point if you are not having serious problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I read behind the lines, you wish to optimize your code. Besides threads, summarization needs memory, so increasing MEMSIZE/SORTSIZE&amp;nbsp; might help.&lt;/P&gt;&lt;P&gt;You said you are dong this over 50 millions datasets. DO you mean 50 million row datasets (not actually 50 M datasets, right - otherwise you have a serious structure problem &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; ). So if you wish to run multiple MEANS, do that in parallel, each wit CPUCOUNT=4. DO this using either MP CONNECT, or by having them executed in seperate SAS sessions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Jul 2015 13:41:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-parallel-procesing-threads-cpucount/m-p/194792#M36625</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-07-05T13:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using parallel procesing (threads, cpucount)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-parallel-procesing-threads-cpucount/m-p/194793#M36626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using parallel processing is one of the many techniques to improve turn around times for processes.&lt;/P&gt;&lt;P&gt;As a rule of thumb do that in this order of precedence:&lt;/P&gt;&lt;P&gt;1/ look at your used algorithm. Doing anything that is not necessary needed is waste/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Understand the possible bottlenecks. &lt;/P&gt;&lt;P&gt;2/ choose of possible available solutions like already programmed ones the one that is most&amp;nbsp; appropriate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The difficulty is getting to know the ones you do not know without losing too much time.&lt;/P&gt;&lt;P&gt;3/ re-evaluate sas options.&amp;nbsp; It should be part of the installation/configuration but there can be missed a lot.&lt;/P&gt;&lt;P&gt;4/ re-evalutate operating system and hardware options it should be part of the design and set up but also there a lot could have gone wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With proc means you are IO-bound as that is the bottleneck you cannot go faster as one pass for all. The cpucount / threading will not help at SAS only the operating system will do some thing as IO can be done delayed/predicted (caching). &lt;A href="http://support.sas.com/documentation/cdl/en/proc/67327/HTML/default/viewer.htm#p0oufi1pwdkqxun1a0myma8mn0a7.htm" title="http://support.sas.com/documentation/cdl/en/proc/67327/HTML/default/viewer.htm#p0oufi1pwdkqxun1a0myma8mn0a7.htm"&gt;Base SAS(R) 9.4 Procedures Guide, Third Edition&lt;/A&gt; (proc means threading on input data).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you would have many smaller datasets and the weighted options is functionally acceptable. you could imaging to pre-calculated on all those datasets generating a weighted variable with intermediate results. and then combine those results (less data) use the weight. That is similar to a map/reduce approach.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Jul 2015 14:15:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-parallel-procesing-threads-cpucount/m-p/194793#M36626</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2015-07-05T14:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using parallel procesing (threads, cpucount)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-parallel-procesing-threads-cpucount/m-p/194794#M36627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for youre help Linus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously I have 50 miilons row dataset not 50 millions datasets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't see the numbers of threads of my process in my log, although I have used &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt; MSGLEVEL=I as you said.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;Here my log:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR&lt;/P&gt;&lt;P&gt;21&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;22&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GOPTIONS ACCESSIBLE;&lt;/P&gt;&lt;P&gt;23&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; options msglevel=I;&lt;/P&gt;&lt;P&gt;24&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;25&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc means data=ventas noprint nway;&lt;/P&gt;&lt;P&gt;26&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class cod_centro cod_articulo;&lt;/P&gt;&lt;P&gt;27&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var hc_venta;&lt;/P&gt;&lt;P&gt;28&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output out=ag_ventas(drop=_type_ _freq_)&lt;/P&gt;&lt;P&gt;29&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(hc_venta) = suma_ventas ;&lt;/P&gt;&lt;P&gt;30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: Multiple concurrent threads will be used to summarize data.&lt;/P&gt;&lt;P&gt;NOTE: There were 50000000 observations read from the data set WORK.VENTAS.&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.AG_VENTAS has 11110 observations and 3 variables.&lt;/P&gt;&lt;P&gt;NOTE: PROCEDIMIENTO MEANS used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.06 segundos&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; user cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24.60 segundos&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.64 segundos&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; memory&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10951.64k&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OS Memory&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30928.00k&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Timestamp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 05/07/2015 09:57:58 p.m.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Step Count&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp; Switch Count&amp;nbsp; 97&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Page Faults&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Page Reclaims&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2887&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Page Swaps&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Voluntary Context Switches&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 34630&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Involuntary Context Switches&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17563&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Block Input Operations&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Block Output Operations&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 776&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Jul 2015 22:06:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-parallel-procesing-threads-cpucount/m-p/194794#M36627</guid>
      <dc:creator>juanvg1972</dc:creator>
      <dc:date>2015-07-05T22:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using parallel procesing (threads, cpucount)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-parallel-procesing-threads-cpucount/m-p/194795#M36628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Elapse is 2.5 times CPU, so you have at least 3 threads.&lt;/P&gt;&lt;P&gt;Since I see you are using unix, the easiest is to look at the processes spawned using for example the ps command, and count the sas processes. A more comprehensive way is to look at how the value of CPUCOUNT affects performance for your process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example where the number of CPUs and the number of class variables vary:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG happy="" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This chart is taken from my book&lt;SPAN lang="EN-GB"&gt;: &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ABodyCopy"&gt;&lt;SPAN lang="EN-GB"&gt;&lt;A class="jive-link-external-small" href="http://www.amazon.com/High-Performance-SAS-Coding-Christian-Graffeuille/dp/1512397490"&gt;High-Performance SAS Coding: Christian Graffeuille: 9781512397499: Amazon.com: Books&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ABodyCopy"&gt;&lt;SPAN lang="EN-GB"&gt;&lt;A class="jive-link-external-small active_link" href="http://www.amazon.com/High-Performance-SAS-Coding-Christian-Graffeuille/dp/1514362317/"&gt;High-Performance SAS Coding: Polychrome: Christian Graffeuille: 9781514362310: Amazon.com: Books&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ABodyCopy"&gt;&lt;SPAN lang="EN-GB"&gt;&lt;SPAN __jive_emoticon_name="_happy.gif'"&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 05:44:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-parallel-procesing-threads-cpucount/m-p/194795#M36628</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2015-07-06T05:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using parallel procesing (threads, cpucount)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-parallel-procesing-threads-cpucount/m-p/194796#M36629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chris, There are major differences between threads and forks. It something fundamental for system concepts. &lt;BR /&gt;A nice descritpion of that is at &lt;A href="http://www.geekride.com/fork-forking-vs-threading-thread-linux-kernel/"&gt;http://www.geekride.com/fork-forking-vs-threading-thread-linux-kernel/&lt;/A&gt;&amp;nbsp; . The forking is the one the spawner does, that is creating new visisble sas sessions.&lt;BR /&gt;The OS session manager (workload balancing) will see sessions as the major anchors points (one kind of&amp;nbsp; table) wihtin each sessions threads being run.&amp;nbsp; By the sharing nature of threads that is less likely being well possible.&amp;nbsp; &lt;A href="http://www.thegeekstuff.com/2011/04/ps-command-examples/"&gt;http://www.thegeekstuff.com/2011/04/ps-command-examples/&lt;/A&gt;&amp;nbsp; (see the pid/tid difference at example 6)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes you can see some effects as the more spread used of cpu's instead a very skewed (single) usage. In a multi-users environment with many users active and having many cpu's that is different than a desktops single user approach.&amp;nbsp; For fun the OS geek is assuming the application bein the SAS-system.&amp;nbsp;&amp;nbsp; SAS applications however are built on the SAS-system. The confusion is that SAS developers are not seeing that much of the OS-level like threading/forking. However designing efficient code they shoud understand the basics of those.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 15:42:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-parallel-procesing-threads-cpucount/m-p/194796#M36629</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2015-07-06T15:42:38Z</dc:date>
    </item>
  </channel>
</rss>

