ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | proactive List | August 2007 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [proactive] Application twice as slow with ProActive -- why?


I should have mentioned that I suspect it is something I am doing wrong to be getting an slow down factor of 1.8, however my code is so simple, it is hard to see what.

I changed all my asynchronous methods to return a serializable future so I can synchronize on them and use ProActive.waitFor(future) just to check the timing between method calls. I have confirmed that

sim.init(alg,asset); // takes 0.5s
sim.simulate();      // takes 10s

and the same thing without using ActiveObjects:

sim.init(alg,asset); // takes 0.2s
sim.simulate();      // takes 6s

I should emphasize I only change 3 lines of code between the two executions -- 2 "waitFor(future)" statements, and the creation of the "sim" object either via "newActive(Simulator)" or standard "new Simulator()".

This result suggests that it is *not* executing the simulation twice with ProActive, since 2x execution would take 12s. 10s is very unlikely if the cause of the slowdown is due to double execution, since there is no reason to expect a "speedup" from 6s to 5s for each iteration (even if one is superfluous).

I'm suspecting a possible cause is the misuse of "this" when using a class as an Active Object, which is somehow leading to a double dispatch of the "simulate" method, perhaps once on the Active Object and once on the stub (but see comment above why I think this can't be the case). Unfortunately I don't know how to test for this.

Looking forward to comments,

Ian

Ian STOKES-REES wrote:
I have an application which goes twice as slow with ProActive.

It takes 310 seconds to run "ProActive-free" and 560 seconds to run with ProActive. This seems strange, because it has only *very* coarse grain communications (12 communications during entire application run).

How do I find the source of the slow down?

Cheers,

Ian

Vanilla app pseudocode
======================
input: algorithm, assetSet

Simulator sim
Result    res
foreach asset in assetSet
    sim.init(algorithm,asset)
    sim.simulate()
    res.add(sim.getResult())

ProActive app pseudocode
========================
input: algorithm, assetSet, deploymentDescriptor

Nodes     nodes = activateAndReturnNodesFromDD(deploymentDescriptor)
Simulator sim   = ProActive.newActive(Simulator,nodes[0]);

foreach asset in assetSet
    sim.init(algorithm,asset)
    sim.simulate()
    res.add(sim.getResult())




--
Ian.Stokes-Rees@xxxxxxxxxxxxxxx                 T: +33 4 92 38 71 64
INRIA Sophia, France                            F: +33 4 92 38 76 44
Project OASIS/ProActive - Grid Research Team    http://inria.fr/oasis
begin:vcard
fn:Ian STOKES-REES
n:STOKES-REES;Ian
org:INRIA Sophia, France;Project OASIS/ProActive
adr:;;2004 Rte Des Lucioles BP 93;Sophia Antipolis;;06902;France
email;internet:Ian.Stokes-Rees@xxxxxxxx
title:Research Scientist
tel;work:+33 4 92 38 71 64
tel;fax:+33 4 92 38 76 44
x-mozilla-html:FALSE
url:http://www-sop.inria.fr/oasis/personnel/Ian.Stokes-Rees/
version:2.1
end:vcard



<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.