Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^6: statistics of a large text

by perl_lover_always (Acolyte)
on Feb 10, 2011 at 11:13 UTC ( #887413=note: print w/ replies, xml ) Need Help??


in reply to Re^5: statistics of a large text
in thread statistics of a large text

Since you are more expert in memory usage and related issues, I have a question. Why when I store my 5 gb of file which has about 7m records of two columns, and I make two hashesh from two different files in the same format and size, even with a large ram (50gb) I run out of memory?


Comment on Re^6: statistics of a large text
Re^7: statistics of a large text
by BrowserUk (Pope) on Feb 10, 2011 at 12:44 UTC

    What does perl -V output on your system?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      This is perl, v5.8.8 built for x86_64-linux-thread-multi
Re^7: statistics of a large text
by BrowserUk (Pope) on Feb 10, 2011 at 14:13 UTC
    Why when I store my 5 gb of file which has about 7m records of two columns, and I make two hashesh from two different files in the same format and size, even with a large ram (50gb) I run out of memory?

    Assuming that your OS and Perl allow you full access to the full 50GB, you should not be running out of memory.

    On a 64-bit system, a HoAs with 7 million keys and an average of 10 numbers per array requires ~3.5 GB. For two, reckon on 10 GB max.

    I'm not aware of any restrictions or limits on the memory a 64-bit Perl can address, which leave you OS. Linux can apply per-process (and per-user?) limits to memory and cpu usage. I don't know what the commands are for discovering this information, but meybe that is somewhere you should be looking.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      I have no idea since I can access the whole memory (all 50 GB) Do you think it has something to do with my code?

        Time to ask your systems administrator to check if there are any limitations in place. Check ulimit -a and man limits.conf.

        I have no idea since I can access the whole memory (all 50 GB)

        How do you know you can access the whole of memory?

        What happens if you run this code?:

        perl -e' $x = chr(0) x ( 1024**3 * 12 ) '

        That will attempt to allocate a single 12GB lump of memory. If it fails, then try adjusting the 12 to a lower value to discover how much memory Perl can actually allocate.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
        Do you think it has something to do with my code?

        It is beginning to look that way. Can you post the latest version of your code?


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2014-07-31 08:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (247 votes), past polls