<?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: Memory usage in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Memory-usage-in-SAS/m-p/524408#M142607</link>
    <description>&lt;P&gt;Don't forget the SAS procedure you are using takes up memory too. PROC PRINT is a relatively simple procedure so takes up less memory than PROC SQL which is much more complex with a lot more functionality.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jan 2019 22:56:24 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2019-01-03T22:56:24Z</dc:date>
    <item>
      <title>Memory usage in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Memory-usage-in-SAS/m-p/524320#M142578</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was trying to understand how memory utilization is done in SAS. SASHELP.CLASS dataset has fize size of 128KB and when trying to print this dataset (PROC PRINT) it is utilizing ~843KB, almost 6 time the its file size. Where as proc sql select utilizing ~3248KB.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Why 6 times more?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) Can we reduce memory usage?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options fullstimer;

proc sql;
create table test as 
select Libname,memname,filesize format=sizekmg.
from dictionary.tables 
where libname='SASHELP' and memname='CLASS';
quit;

proc print data=sashelp.class noobs;
run;

proc sql;
select * from sashelp.class;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;23         options fullstimer;
24         
25         proc print data=sashelp.class noobs;
26         run;

NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.02 seconds
      user cpu time       0.01 seconds
      system cpu time     0.00 seconds
      memory              845.78k
      OS Memory           15956.00k
      Timestamp           01/03/2019 12:11:05 PM
      Step Count                        12  Switch Count  24
      

27         
28         proc sql;
29         select * from sashelp.class;
30         quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.02 seconds
      user cpu time       0.01 seconds
      system cpu time     0.00 seconds
      memory              3249.12k
      OS Memory           19032.00k
      Timestamp           01/03/2019 12:11:05 PM
      Step Count                        13  Switch Count  24
&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Jan 2019 17:20:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Memory-usage-in-SAS/m-p/524320#M142578</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2019-01-03T17:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Memory-usage-in-SAS/m-p/524332#M142584</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/83078"&gt;@SuryaKiran&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bench marking performance on small data sets can be tricky. Look at the results I have got.&amp;nbsp;&amp;nbsp;Each Re-run gave me a different result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;24         options fullstimer;
25         
26         
27         proc print data=sashelp.class noobs;
28         run;

NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.01 seconds
      user cpu time       0.00 seconds
      system cpu time     0.00 seconds
      memory              602.37k
      OS Memory           16424.00k
      Timestamp           01/03/2019 11:47:33 AM
      Page Faults                       0
      Page Reclaims                     8
      Page Swaps                        0
      Voluntary Context Switches        4
      Involuntary Context Switches      4
      Block Input Operations            0
      Block Output Operations           0
      

29         
30         proc sql;
31         select * from sashelp.class;
32         quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.12 seconds
      user cpu time       0.01 seconds
      system cpu time     0.00 seconds
      memory              303.31k
      OS Memory           16424.00k
      Timestamp           01/03/2019 11:47:33 AM
2                                                          The SAS System                            09:57 Thursday, January 3, 2019

      Page Faults                       0
      Page Reclaims                     2
      Page Swaps                        0
      Voluntary Context Switches        25
      Involuntary Context Switches      7
      Block Input Operations            0
      Block Output Operations           0&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Jan 2019 17:55:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Memory-usage-in-SAS/m-p/524332#M142584</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2019-01-03T17:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Memory-usage-in-SAS/m-p/524347#M142589</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/223452"&gt;@r_behata&lt;/a&gt;&amp;nbsp;I'm aware that it varies, but my question is why the memory size is very high than its file size?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 18:51:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Memory-usage-in-SAS/m-p/524347#M142589</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2019-01-03T18:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Memory-usage-in-SAS/m-p/524390#M142599</link>
      <description>&lt;P&gt;Part of that is the memory requirements for holding tables in memory while building them for display in HTML/RTF/PDF other destination.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;HTML default destination for results open
184  proc print data=sashelp.class;
NOTE: Writing HTML Body file: sashtml3.htm
185  run;

NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.64 seconds
      user cpu time       0.21 seconds
      system cpu time     0.26 seconds
      memory              &lt;FONT color="#ff0000"&gt;6588.76k&lt;/FONT&gt;
      OS Memory           22772.00k
      Timestamp           01/03/2019 02:57:54 PM
      Step Count                        25  Switch Count  0


186  ods html close;
187  ods listing;
188  %put HTML Closed and List output used.;
HTML Closed and List output used.
189  proc print data=sashelp.class;
190  run;

NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.00 seconds
      user cpu time       0.00 seconds
      system cpu time     0.00 seconds
      memory              &lt;FONT color="#339966"&gt;360.37k&lt;/FONT&gt;
      OS Memory           21492.00k
      Timestamp           01/03/2019 02:57:54 PM
      Step Count                        26  Switch Count  0


191  ods listing close;

&lt;/PRE&gt;
&lt;P&gt;Different destinations and style options&amp;nbsp; actually used will affect the numbers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 22:00:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Memory-usage-in-SAS/m-p/524390#M142599</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-01-03T22:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Memory usage in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Memory-usage-in-SAS/m-p/524408#M142607</link>
      <description>&lt;P&gt;Don't forget the SAS procedure you are using takes up memory too. PROC PRINT is a relatively simple procedure so takes up less memory than PROC SQL which is much more complex with a lot more functionality.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 22:56:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Memory-usage-in-SAS/m-p/524408#M142607</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-01-03T22:56:24Z</dc:date>
    </item>
  </channel>
</rss>

