Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Out of Memory Error -- Possible Leak?

by runrig (Abbot)
on Dec 13, 2005 at 23:50 UTC ( [id://516477]=note: print w/replies, xml ) Need Help??


in reply to Out of Memory Error -- Possible Leak?

You are close to running out of memory before you hit the foreach loop. You should probably start thinking about using some sort of database rather than keeping all that data in memory.
  • Comment on Re: Out of Memory Error -- Possible Leak?

Replies are listed 'Best First'.
Re^2: Out of Memory Error -- Possible Leak?
by Anonymous Monk on Dec 14, 2005 at 00:02 UTC

    Actually this originally was in a database, but the performance.... Benchmarking suggested it would take 5 months to complete, and since this was to be an annual task we're aiming to get it down to two or three weeks. Since DB access was the second biggest cost, it appeared to be an obvious place to tune, so this is an attempt to *replace* the DB look-ups and to a space/time trade-off.

      I can't say I've ever even tried to put that much data into memory at once, but I have dealt with some large collections. You might try chunking up the original data and storing it in temporary tables you can iterate through so you have less to work with at one time. If your database provides something like LOAD DATA INFILE, you can make use of it to dramatically reduce transaction times when it's time to put all the data back.

      That all said, if it were mine to do the single word that would keep me awake at night is "cluster".

      Good luck and have fun with it!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://516477]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-24 05:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found