swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swarm-Support] Solution to EZgraph line colors and a question


From: Ken Cline
Subject: Re: [Swarm-Support] Solution to EZgraph line colors and a question
Date: Fri, 19 Aug 2005 08:43:39 -0700 (PDT)

Wrt your performance questions... One obvious question is whether
you are exceeding the capabilities of your system?  That is, is
your OS no longer able to keep everything in memory and starting
to do a lot of "paging"?

It could also be the Java VM that's affecting performance.  Have
you tried changing the heap size?

Another thought... Are your actions being scheduled for the same
(model) time?  If so, what is the ConcurrentGroupType set to for
the Schedule?  If you randomizing concurrent actions, that could
chew up alot of CPUs.

Finally, I'd recommend searching the mail archive for postings by
Marcus that address ways to improve performance.  I recall that
he's discussed it a few times.  In fact, I think I have one of
those messages saved... yup, see below.

Hope that helps.
Ken

--- "Marcus G. Daniels" <address@hidden> wrote:
> To: address@hidden
> Subject: Re: swarm-Java performance
> From: address@hidden (Marcus G. Daniels)
> Date: 04 Apr 2002 15:43:43 -0700
> 
> >>>>> "PP" == Petros Petrou <address@hidden> writes:
> 
> PP> Could you please tell me if there is anything else I could
> PP> possibly do to improve Java's performance for Swarm applications?
> 
> The first and most important thing is to profile your model.  Basic
> Java profiling is a good start, and will be sufficient in most cases.
> Understand where time is going. 
> 
> For full information about what is happening you need a version of
> Swarm compiled with `-pg' and your model compiled to native code with
> profiling in gcj.  I think there are some remarks to swarm-support
> about that dated about middle of last year.
> 
> A couple tips:
> 
>   o Learn to use the FActionForEach{Homogeneous,Heterogeneous} callout
>     interfaces.  This feature avoids cross-language object lookup
>     costs by invoking your target Java objects and arguments directly.
> 
>     In general, avoid passing generic object arguments to Swarm interfaces
>     at all.  The FCall/FArguments interfaces make it possible to construct
>     calls direct to Java.  (Instead of sending a generic message that
>     needs to then be forwarded on from inside Java.)
> 
>     [There is nothing hackish about using FCall/FArguments interfaces or
>     the FAction activity variants.  It generalizes to any language.]
> 
>   o Avoid use of swarm.collections in favor of pure Java collections.
>     Memory use will be more efficient this way and there will not be
>     constant conversions between Swarm's idea of a Java object (as a proxy)
>     and the real Java objects.
> 

--- Dinis Gökaydin <address@hidden> wrote:

> Hello again Swarm Support,
> 
> First I would like to share with the Java users the (almost) 
> heuristically found solution to the EZgraph colors problem I had posted 
> previously. The problem is that Java users like myself don't have a clue 
> to what createBegin() and createEnd() are. Reading some previous posts 
> and noticing by chance that the two aforementioned methods still existed 
>   in SwarmJava I came up with this. Dunno if it's the best way to do it 
> but it works.
> 
> -------------------------------------------------------
> String[] colors = {"color_1","color_2"};
> 
> name_of_your_graph = new EZGraphImpl();
>       
> _whatever_= new EZGraphCImpl(name_of_your_graph);
>               
> _whatever_.createBegin(getZone());
> _whatever_.setAxisLabelsX$Y("x_label","y_label");
> _whatever_.setColors$count(colors,2);
> _whatever_.setGraphics(true);
> _whatever_.setTitle("name_of_your_graph");
> _whatever_.createEnd();       
> -------------------------------------------------------
> 
> I also have a question. Taking advantage of dynamic scheduling I came up 
> with a way to speed up my program considerably.
> 
> I was happy about myself for a while, but then I encountered a problem. 
> My scheme demads a first scheduling step for every agent with 
> at$createActionTo$message() at time 0. I was handling 10000 agents then, 
> and it takes 20sec to build and schedule them. Great - I thought to 
> myself - then 100000 will take 200sec, or 3min20sec. Nope... It takes 
> 26min42sec!! My deep mathematical insight tells me this is not linearly 
> increasing :-)
> 
> By the way,it takes (cough) one second to build 100000 agents without 
> the at$createActionTo$message() step. Anyone has any idea why this is 
> happening and has a simple solution before I start creating multiple 
> 10000 schedules? This would a real problem since I am aiming for 1000000 
> agents. I don't even know if swarm can handle 1exp6 agents...
> 
> Thank you very much,
> 
> Dinis Gökaydin
> _______________________________________________
> Support mailing list
> address@hidden
> http://www.swarm.org/mailman/listinfo/support
> 


_________________________________________________________
 Ken Cline                             W: (443) 287-2636
 address@hidden


reply via email to

[Prev in Thread] Current Thread [Next in Thread]