Re: forks.pm vs. ithreads?

[email protected] (A . Bergman)
Newsgroups perl.ithreads
Message-ID <[email protected]>
On fredag, mar 21, 2003, at 17:39 Europe/Stockholm, Chen, Allen wrote:

> Hi everyone,
>
> Some have been wondering if anyone has used ithreads in a production
> application yet.  Well, I have on a fairly hefty application (125+ 
> threads)
> on a hefty box (4-cpu linux with 4G physical RAM).  It's working well,
> although the memory leak problem is very apparent.  I've ended up 
> restarting
> the program once a day to prevent it from dying in an inelegant manner.
>

The memory leaks should be fixed with perl 5.8.1 release.

> Anyway, I'm very interested in Elizabeth's forks.pm module.  I'm 
> wondering
> how it compares to ithreads.  I see that forks is much better with 
> memory,
> but how about performance?  Besides memory usage, is there any reason 
> to use
> one over the other?
>

I would say without benchmarking that memory usage is much better since 
it does copy on write, but since it uses sockets to communicate shared 
variables they aren't really, for all purposes shared but more like 
distributed.

> And one last question: will Thread::Queue and Thread::Semaphore work 
> with
> forks.pm?
>

No idea.

Arthur
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.