BookmarkSubscribeRSS Feed
navin1984
Calcite | Level 5
Hi,
Data increased 2 times and i am using HASH object to look up the data. SAS job is failing due to insufficient memory for HASH object. I checked MEMSIZE, it is 2 GB while in hash object i have 11 million records.

1. Is there way to calculate the size of hash object at run time?
2. Is there any way to increase the size of hash object at run time?
5 REPLIES 5
SASKiwi
PROC Star

A MEMSIZE of 2GB is a bit low these days. To give you some idea our current SAS server MEMSIZE setting is 6GB. Talk to your SAS administrator about an increased limit. At the end of the day hashes are loaded into memory so there is a limit to their size so they are no suited to very large data volumes. 

andreas_lds
Jade | Level 19

If you are using 32 bit SAS, then 2 GB is the maximum you can use. But your sas admin should must know this.

 

KachiM
Rhodochrosite | Level 12

There are ways to run programs with limited resources. Consult Paul Dorfman's papers. If you explain your issue with a constructed SAS dataset and your requirements, someone can come out with an efficient way to tackle memory issues. 

Ksharp
Super User
1) If you are running Batch way ,try add option " -memsize 0 " to maximize the memory sas used.
2) If You can edit " autoexec.sas " ,try add option " -memsize 0 " to maximize the memory sas used.
Quentin
Super User

Just want to second the suggestion for reviewing Paul Dorfman's papers (and book) on hashing.

 

Think about limiting the variables in the hash table (do you need them all?).  As a sanity check, if you load only the keys, will they fit in memory?

 

Sometimes you can hash in chunks (so when processing a dataset, load a hash table with data from a subset of rows, use the hash table, and then empty the hash table before loading it with data from the next chunk).

 

If you can't do what you want with hash tables, there are of course other approaches for lookups that are less memory intensive but may be slower / more disk IO.

 

 

 

The Boston Area SAS Users Group is hosting free webinars!
Next up: Lisa Mendez & Richann Watson present Get Tipsy with Debugging Tips for SAS® Code: The After Party on Wednesday Jul 16.
Register now at https://www.basug.org/events.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1958 views
  • 2 likes
  • 6 in conversation