- Updated MCE::Shared::Queue. The following provides a comparison
for the enhancements made regarding IPC during 1.818 through 1.821,
in order to run on machines having "many" cores. I ran with 12, 96,
and 192 workers on an 8 core box.
Shared queue, dequeue 100k items.
my $Q = MCE::Shared->queue();
# Must start the manager manually when IO::FDPass is missing.
# This caveat applies to Condvar, Handle, and Queue.
MCE::Shared->start() unless $INC{'IO/FDPass.pm'};
$Q->enqueue( 1 .. 100000 );
$Q->end();
MCE->new(
max_workers => 12, 96, or 192,
user_func => sub {
while ( defined ( my $item = $Q->dequeue ) ) {
;
}
}
)->run();
MCE::Shared 1.821: 12 ~ 1.325 secs 96 ~ 5.206 secs 192 ~ 8.158 secs
MCE::Shared 1.825: ~ 0.913 secs ~ 1.068 secs ~ 1.560 secs
Results were captured on a fast 8 core system running CentOS Linux 7.
The thing to take from this is that running many workers "no longer"
results in up to 6.2x penalty regarding IPC.When IO::FDPass is missing, croak with error if constructing a Condvar
or Queue and forgotten to start the shared-manager process manually.Bumped MCE dependency to 1.825.