in reply to Re: Mail::SendMail and fork
in thread Mail::SendMail and fork

Thanks for the reply. i missed to mention that I'm running perl in Windows. Moreover will this fork handle more than 10k processes at once?!!!

Replies are listed 'Best First'.
Re^3: Mail::SendMail and fork
by Corion (Patriarch) on Apr 01, 2009 at 08:30 UTC

    fork is a bad idea on Windows, and it's a bad idea on any system to try to fork 10000 processes at once. Take a look at Parallel::ForkManager or a simple thread-based solution that runs (say) 5 or 10 worker threads and feeds them from a queue.

      Thanks! I suppose ForkManager is also uses Fork function, not sure. Basically I'm testing Mail scalability, it would be good if I can stress the server with 50000 mails per day sending mails in parallel...
        Even using threads, those sorts of numbers will cause tremendous context switching issues.

        50000 mails per day is not the same as 50000 all at once. If a mail takes one second in the system, 50000 is only two per second if evenly distributed throughout the day (which it won't be, I know). What is your peak?