<?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 needed for Hash object in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Memory-needed-for-Hash-object/m-p/22890#M3745</link>
    <description>Thanks KSharp and PeterC for your responses.&lt;BR /&gt;
&lt;BR /&gt;
I'll be loading a dataset with 32 million records into a hash object. one key and one data. please see below if my parameters for hash_test&lt;BR /&gt;
&lt;BR /&gt;
%hash_test(rows=32000000,keycnt=1,&lt;BR /&gt;
           k1len=8,k1typ=n,&lt;BR /&gt;
           datacnt=1,d1len=8,d1typ=n&lt;BR /&gt;
           ) ; run;&lt;BR /&gt;
&lt;BR /&gt;
I tried running the macro hash_test and got the ff stats:&lt;BR /&gt;
&lt;BR /&gt;
XMLRMEM available =                  610,404,352&lt;BR /&gt;
&lt;BR /&gt;
Actual table size:                 1,024,000,000 bytes&lt;BR /&gt;
Row          size:                            32 bytes&lt;BR /&gt;
Optimal   HASHEXP:                            25&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Given an optimal hashexp of 25, does that mean that it actually won't fit the hash object since max hashexp is 16?&lt;BR /&gt;
&lt;BR /&gt;
Please correct me if I am wrong.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
    <pubDate>Thu, 10 Mar 2011 12:53:47 GMT</pubDate>
    <dc:creator>milts</dc:creator>
    <dc:date>2011-03-10T12:53:47Z</dc:date>
    <item>
      <title>Memory needed for Hash object</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Memory-needed-for-Hash-object/m-p/22887#M3742</link>
      <description>Hi All,&lt;BR /&gt;
&lt;BR /&gt;
Does anyone know how much memory needs to be set for memsize when i need to create a hash object whose source is a data set containing more than 32M records? Isn't it that the max size of hash object depends on the memory a machine has? Please correct me if I am wrong on this one.&lt;BR /&gt;
&lt;BR /&gt;
I encountered a memory error regarding this. Currently memsize set in sasv9.cfg is 2G.&lt;BR /&gt;
&lt;BR /&gt;
Help is much appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Milton</description>
      <pubDate>Mon, 07 Mar 2011 03:35:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Memory-needed-for-Hash-object/m-p/22887#M3742</guid>
      <dc:creator>milts</dc:creator>
      <dc:date>2011-03-07T03:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Memory needed for Hash object</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Memory-needed-for-Hash-object/m-p/22888#M3743</link>
      <description>Hi.&lt;BR /&gt;
&amp;gt;Isn't it that the max size of hash object depends on the memory a machine has? &lt;BR /&gt;
&lt;BR /&gt;
I am not sure whether The size of hash object is  depend on the memory.But you can expand buckets of hash table to speed, The max size of hash table buckets is 2^16,&lt;BR /&gt;
You can specify " hashexp: 16 " to maximize  which can promote the speed.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: Ksharp</description>
      <pubDate>Mon, 07 Mar 2011 04:51:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Memory-needed-for-Hash-object/m-p/22888#M3743</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-03-07T04:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Memory needed for Hash object</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Memory-needed-for-Hash-object/m-p/22889#M3744</link>
      <description>have a look at usage note &lt;BR /&gt;
34193 - How to determine how much memory my hash table will require&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/34/193.html" target="_blank"&gt;http://support.sas.com/kb/34/193.html&lt;/A&gt;&lt;BR /&gt;
This Note is about the data you will put in the hash, rather than the environment. If 2G is not enough for your hash, you can set memsize to 0 to make all memory available.&lt;BR /&gt;
the "fine" manual page to read is at &lt;A href="http://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#win-sysop-memsize.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#win-sysop-memsize.htm&lt;/A&gt; &lt;BR /&gt;
 &lt;BR /&gt;
peterC</description>
      <pubDate>Mon, 07 Mar 2011 16:39:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Memory-needed-for-Hash-object/m-p/22889#M3744</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-03-07T16:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Memory needed for Hash object</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Memory-needed-for-Hash-object/m-p/22890#M3745</link>
      <description>Thanks KSharp and PeterC for your responses.&lt;BR /&gt;
&lt;BR /&gt;
I'll be loading a dataset with 32 million records into a hash object. one key and one data. please see below if my parameters for hash_test&lt;BR /&gt;
&lt;BR /&gt;
%hash_test(rows=32000000,keycnt=1,&lt;BR /&gt;
           k1len=8,k1typ=n,&lt;BR /&gt;
           datacnt=1,d1len=8,d1typ=n&lt;BR /&gt;
           ) ; run;&lt;BR /&gt;
&lt;BR /&gt;
I tried running the macro hash_test and got the ff stats:&lt;BR /&gt;
&lt;BR /&gt;
XMLRMEM available =                  610,404,352&lt;BR /&gt;
&lt;BR /&gt;
Actual table size:                 1,024,000,000 bytes&lt;BR /&gt;
Row          size:                            32 bytes&lt;BR /&gt;
Optimal   HASHEXP:                            25&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Given an optimal hashexp of 25, does that mean that it actually won't fit the hash object since max hashexp is 16?&lt;BR /&gt;
&lt;BR /&gt;
Please correct me if I am wrong.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Thu, 10 Mar 2011 12:53:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Memory-needed-for-Hash-object/m-p/22890#M3745</guid>
      <dc:creator>milts</dc:creator>
      <dc:date>2011-03-10T12:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Memory needed for Hash object</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Memory-needed-for-Hash-object/m-p/22891#M3746</link>
      <description>&amp;gt;Given an optimal hashexp of 25, does that mean that it actually won't fit the hash object since max hashexp is 16?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Yes.Your "hashexp of 25" is identified with 16,because hash table's max buckets is 2^16.&lt;BR /&gt;
From your file's size is 1G, I think it is no problem to load your data with your computer.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Fri, 11 Mar 2011 05:18:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Memory-needed-for-Hash-object/m-p/22891#M3746</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-03-11T05:18:07Z</dc:date>
    </item>
  </channel>
</rss>

