Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Perl Threads and multi-core CPUs

by jbert (Priest)
on Sep 10, 2008 at 13:43 UTC ( #710355=note: print w/ replies, xml ) Need Help??


in reply to Perl Threads and multi-core CPUs

Obviously the first things that come to mind are threads and forking. I wrote a version based on forking and it works fine but it is a RAM hog b/c when you fork, every new process is a copy of the parent and the parent in my case is quite large b/c it loads an AI model that consumes about 1GB of RAM.

You might want to check whether each child process has it's own copy of that 1Gbyte of data.

Have a look at the 'SHR' column in top to see how much memory is shared.

Otherwise, if the children don't need the AI model, you could try forking them before you load the model.


Comment on Re: Perl Threads and multi-core CPUs

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2014-09-17 01:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (55 votes), past polls