in reply to Re^5: Strange memory leak using just threads
in thread Strange memory leak using just threads
If you search you will find that this subject was discussed here before a lot of times. Yes, perl threads leaking memory on Linux, and yet it seems nobody especially concerned about this. If your Perl program supposed to work on Linux there's no much sense to use threads. Perl threads is not the same thing as POSIX threads. Actually on Linux creating a new process with fork is usually cheaper than creating a new Perl thread both in terms of speed and memory. If you need to handle multiple IO streams, you should use POE, AnyEvent (this one BrowserUk wouldn't recommend I guess), or IO::Select in simple cases, and it will be more efficient than using threads. If you want to perform some CPU intensive operations, than multiprocess model will allow you to use several CPUs, and it is more scalable than multithread model. So what is the reason why are you want to use threads?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Strange memory leak using just threads (forks.pm)
by tye (Sage) on Sep 21, 2010 at 04:52 UTC | |
by BrowserUk (Patriarch) on Sep 21, 2010 at 05:30 UTC | |
by zwon (Abbot) on Sep 21, 2010 at 05:54 UTC | |
by BrowserUk (Patriarch) on Sep 21, 2010 at 06:06 UTC | |
by zwon (Abbot) on Sep 22, 2010 at 08:15 UTC | |
|