Greetings,

I reached my goal in reaching below 2M per worker. Testing involved running 200 workers with and without threads for the MCE demonstration and without threads for MCE::Hobo.

MCE::Flow

use strict; use warnings; use threads; # comment out for child processes use MCE::Flow; use MCE::Shared; use Time::HiRes 'time'; my $n = MCE::Shared->scalar(0); my $s = time; sub task { # do something, plenty time to see top my $v; $v = $n->incr() for 1 .. 933; } mce_flow { max_workers => 200 }, \&task; MCE::Flow::finish; printf "duration: %0.3f\n", time - $s; print $n->get(), "\n"; __END__ main process, shared-manager process, and 200 workers # with threads: e.g. use threads 498M MCE 1.827, MCE::Shared 1.824 437M MCE 1.828, MCE::Shared 1.825 <- big reduction 399M MCE 1.829, MCE::Shared 1.826 <- more reduction # without threads MCE 1.829, MCE::Shared 1.826: ~ 1744K per worker

MCE::Hobo

use strict; use warnings; use MCE::Hobo; use MCE::Shared; use Time::HiRes 'time'; my $n = MCE::Shared->scalar(0); my $s = time; sub task { # do something, plenty time to see top my $v; $v = $n->incr() for 1 .. 933; } MCE::Hobo->create(\&task) for 1 .. 200; MCE::Hobo->waitall; printf "duration: %0.3f\n", time - $s; print $n->get(), "\n"; __END__ main process, shared-manager process, and 200 workers MCE::Shared 1.826: ~ 1356K per worker

Well, I never imagined for MCE::Hobo to consume less than 1.4M per worker, let alone MCE::Flow running below 2M. MCE 1.829 and MCE::Shared 1.826 will be released later this week.

Regards, Mario


In reply to Re^2: Prima + MCE::Hobo demonstration by marioroy
in thread Prima + MCE::Hobo demonstration by marioroy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.