The usage of Perl Threads is negligible like the Perl Threads Community, should we use Perl Threads? Is it robust enough and trustful in order to be used in production environments? Do we have support from the community? What we do when we have a Multi Core CPU Server with 64 "CPUs" and when we run a threaded simple Perl program, with 16 Threads, only using simple REGEX's, without sharing nothing to avoid LOCKs, and the CPU stats shows lots of locks with a CPU usage of 20% and higer values for VCX's? And we say WTF? I've to reimplement my code? or replace REGEXs with some ingenious code, or avoid Modules/Classes, or avoid implementing functions or ... or avoid writing a single line of code!!Yeah change the Programming Language is also an option...
You may say that Threads is only useful for latency-bound problems not for throughput-bound problems. Ok, in that case the only thing I have to do is to put the Perl Program Running, go to my house and take a long, very long snap, while my Perl program uses only one "CPU" when I'm having "64" available.
--------------------------------------- OS=Fedora 10 , Perl version = 5.10.0 --------------------------------------- $ perl -MThread::Queue::Any -e 'print $Thread::Queue::Any::VERSION."\n +"' 0.09 $ perl -Mthreads -e 'print $threads::VERSION."\n"' 1.73 $ perl -MThread::Queue -e 'print $Thread::Queue::VERSION."\n"' 2.11 Results: - TEST QUEUE:21(seconds) - TEST QUEUE Any:8(seconds) --------------------------------------- OS=Fedora 7 (Running on coLinux) , Perl version = 5.8.8 --------------------------------------- $ perl -MThread::Queue::Any -e 'print $Thread::Queue::Any::VERSION."\n +"' 0.09 $ perl -Mthreads -e 'print $threads::VERSION."\n"' 1.72 $ perl -MThread::Queue -e 'print $Thread::Queue::VERSION."\n"' 2.11 Results: - TEST QUEUE:14(seconds) - TEST QUEUE Any:20(seconds) --------------------------------------- OS=Solaris 10, Perl version = 5.8.8, CPU Intel --------------------------------------- $ perl -MThread::Queue::Any -e 'print $Thread::Queue::Any::VERSION."\n +"' 0.09 $ perl -Mthreads -e 'print $threads::VERSION."\n"' 1.72 $ perl -MThread::Queue -e 'print $Thread::Queue::VERSION."\n"' 2.11 Results: - TEST QUEUE:11(seconds) - TEST QUEUE Any:13(seconds) --------------------------------------- OS=Solaris 10, Perl version = 5.8.8, CPU Intel --------------------------------------- $ perl -MThread::Queue::Any -e 'print $Thread::Queue::Any::VERSION."\n +"' 0.09 $ perl -Mthreads -e 'print $threads::VERSION."\n"' 1.73 $ perl -MThread::Queue -e 'print $Thread::Queue::VERSION."\n"' 2.11 Results: - TEST QUEUE:11(seconds) - TEST QUEUE Any:13(seconds) --------------------------------------- OS=Solaris 10, Perl version = 5.8.8, CPU Ultra SPARC --------------------------------------- $ perl -MThread::Queue::Any -e 'print $Thread::Queue::Any::VERSION."\n +"' 0.09 $ perl -Mthreads -e 'print $threads::VERSION."\n"' 1.73 $ perl -MThread::Queue -e 'print $Thread::Queue::VERSION."\n"' 2.11 Results: - TEST QUEUE:52(seconds) - TEST QUEUE Any:27(seconds)
«A contentious debate is always associated with a lack of valid arguments.» -- Show respect to be respected.
In reply to Re: Thread::Queue vs Thread::Queue::Any
by gulden
in thread Thread::Queue vs Thread::Queue::Any
by gulden
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |