performancesimulationnetlogohpcbehaviorspace

Addressing Performance Dip in Long-Term NetLogo Simulations


I'm using a slurm HPC infrastructure to run NetLogo models on and am experiencing a performance issue that occurs consistently after approximately 4'500'000 ticks.

The model starts to exhibit a noticeable and, as observed, empirically predictable slowdown. I have increased RAM from 30 GB to 60 GB per model and despite efforts to manage NetLogo resources, by clearing the shortest path cache every 100'000 ticks and handling data exports in batches, clearing lists at the same frequency.

Here are my questions:

  1. Has anyone faced similar performance issues in long-term simulations in Netlogo?
    - If so, how did you address them?
  2. Are there any recommended strategies or adjustments to combat such performance dips in extensive simulations?

Below, you'll find a figure where a black line indicates the minimal progression needed for the models to all complete a scope of simulated evolution within the 5-day time frame quota, allocated by the HPC.

I have ways to bring random (green) to the performance of stationary. However, as you can see, eventually all will be too slow...

P.S.: a level of transparency of the graphed lines is governed by the number of agents traversing the street network in the models (so the more transparent, the less agents, the better the performance - although they all suffer the hit at 4'500'000 ticks )

enter image description here


Solution

  • To me it looks like something in your model is changing over time to slow it down--there are more turtles or they are doing more calculations, and the patrol strategy affects it. The fact that the change in execution speed changes consistently with patrol strategy indicates that the cause is a change in what the agents are doing.

    You could use the profiler extension to at least see if the amount of time spent in each procedure changes over time, which could give clues to what is changing. Have it write out its report and reset itself every 1,000,000 ticks or so and run it with high and low values of patrol strategy. See what changes over time: if the time spent in all procedures increases, then maybe the problem is with NetLogo; but I think you'll see that the time spent in 1-2 procedures is increasing because of some change in what the agents do.