I wrote a data conversion program that reads input from several files, munges it around, and spits it out in a single standard file format. (Standard for my company's internal systems, that is...)
In the munging process, I create a wide and shallow hash of hashes. I fill it something like this:
I will have many ${user_id}s, each of which has an average of ten ${ISBN}s, each of which has exactly one ${title}.$user_books{$user_id}{$ISBN} = $title;
I've been using it for several weeks, now, on relatively small input files - 'small' meaning 1,000 or fewer ${user_id}s. It's been very helpful where I work, and I'm getting questions along the lines of, "how many users can you convert, assuming the median number of books per user is ten?"
So, I need to know how much data I can handle. The only limitation I see is the amount of memory (real and virtual) available on the machine running the conversion, and this hash of hashes is the only long-lived thing of substantial size involved. Everything else is small, and scoped very narrowly.
I think I need to know how much memory each level of the hash requires, and then
I can just do the math - how many records can I have before I run out of memory.
Am I asking the right question? If so, can anyone help me learn how to determine
the memory requirements?
In reply to How to Calculate Memory Needs? by mrbbking
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |