in reply to Re^3: Useful number of childs revisited
in thread Useful number of childs revisited [SOLVED]

karl@host:~$ ./buk.pl 8 processes: 8 fork: 11.0194890499115 karl@host:~$ ./buk.pl 16 processes: 16 fork: 10.0188848972321 karl@host:~$ ./buk.pl 32 processes: 32 fork: 8.01892495155334

«The Crux of the Biscuit is the Apostrophe»

Replies are listed 'Best First'.
Re^5: Useful number of childs revisited
by BrowserUk (Patriarch) on May 08, 2015 at 13:30 UTC

    I think the problem is: P::FM doesn't start the next process exactly when the previous ends because the sleep granularity used is 1 whole second.

    Try setting  $pm->set_waitpid_blocking_sleep(0); and re-run the 4,8,16.32,50...


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
    In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
      "...P::FM doesn't start the next process exactly..."

      It seems so :-)

      karl@host:~$ ./buk.pl 4 processes: 4 fork: 7.16779208183289 karl@host:~$ ./buk.pl 8 processes: 8 fork: 7.21501088142395 karl@host:~$ ./buk.pl 16 processes: 16 fork: 7.43911504745483 karl@host:~$ ./buk.pl 32 processes: 32 fork: 7.09555101394653 karl@host:~$ ./buk.pl 50 processes: 50 fork: 6.84368109703064 karl@host:~$ ./buk.pl 100 processes: 100 fork: 6.94914984703064 karl@host:~$ ./forker.pl 4 numbers: 2000 processes: 4 fork: 19.2249510288239 for: 33.1473791599274 karl@host:~$ ./forker.pl 50 numbers: 2000 processes: 50 fork: 19.63889503479 for: 33.3032410144806

      Thank you very much and best regards, Karl

      «The Crux of the Biscuit is the Apostrophe»