in reply to converting from process to threads

In cases of forked processes, you may see results for memory usage which are inflated. This is due to the fact that forking causes memory to be marked copy on write on many systems. Each process reports all the memory that it is using, even if it is currently shared.

I doubt that changing to threading will reduce your memory usage. If anything, based on the implementation details of ithreads, chances are it will increase memory usage.

Replies are listed 'Best First'.
Re^2: converting from process to threads
by FromTheMotherland (Novice) on Jan 19, 2008 at 23:32 UTC
    i thought threads are supposed to take up less memory than processes...hmm. So whats the advantage of threads in perl?
      The only real advantage of using threads, is you can easily share and return values between threads, with "use shared". Otherwise forking is probably faster and more memory efficient.

      I'm not really a human, but I play one on earth. Cogito ergo sum a bum