Jump to content

Very high memory (RAM) usage

Recommended Posts

I am having trouble running a Tuflow model created by others. I have run similar sized/complex models before without much problem so I don’t think it is a hardware issue.  I have got the simulation started but it is running extremely slowly. I left it running for 4 days and it was taking 6 hours of real time for 1 minute of simulation time, so that on the 4th day it had only run 15 mins of a 2hr simulation.

Running a coarser model (increasing cell size, timestep etc.) doesn’t seem to speed up the simulation. I have checked the .tlf and it seems to be a memory allocation issue.  The 2d ‘Boundary Conditions’ memory is over 8GB, (memory allocation screenshots attached) everything else seems to be ok.

Can anyone let me know why this would be so big and how to reduce its size?

For info I am running  2013-12-AC-iDP-w64 Tuflow version on a 64 bit PC with 8GB RAM: Intel(R) Xeon(R) CPU E3-1220 v3 @ 3.10GHz)

2d memory.JPG

Share this post

Link to post
Share on other sites

.....I have found the cause of the high memory usage: Each building roof was modelled with an SA flow boundary, with over 900 SA inputs in the model. As a temporary fix (until we add more RAM to the PC), when I remove a large proportion of these SA boundaries (outside the catchment and specific area of interest), the model runs much faster, using only 4GB of RAM. 

Share this post

Link to post
Share on other sites


I'm just wondering if this might be one of the few times in life where an ST boundary might be helpful? It's applying a source of flow over time, but importantly the specified flow is added to every selected cell. So if you're scaling your basic inflow by roof area to get all these 900 SA inflows, you cold instead just scale once to get the flow per cell and specify the same boundary name for all your roofs. Should do the job?

If that's not what you're doing, I'm curious to know more!

Good luck,


Share this post

Link to post
Share on other sites

Hi, thanks for the response.

For info the model is using the direct rainfall method over an urban catchment.  All buildings footprints have been removed from the active model however SA boundaries (rainfall v time, using Read GIS SA RF) are used around the perimeter of each building to allow for the runoff from the building roof.


Share this post

Link to post
Share on other sites

Good question and thanks eirianc and peteraylett for the discussion above, 

It may not be directly relevant to your specific problem, but I've seen issues like this when applying a large number of SA polygons using the Read GIS SA RF == or Read GIS SA ALL == commands which, can often be caused by one large SA polygon.

For example, imagine if you had a model with the following setup:

  • Total of 3000 SA or SA RF polygons.
  • One polygon contains 10,000 2D cells.
  • All remaining 2999 polygons are of equal size and contain only 500 2D cells.

At model startup, when TUFLOW allocates its boundary memory it's calculated based on the total number of polygons x the number of cells in the largest polygon.


i.e. in this example case, 3000 polygons x 10,000 cells worth of memory = 30,000,000 cells that are allocated.

So, if you were to split your largest boundary polygon into a series of smaller ones, you can immediately save a fair chuck of memory as follows: 

  • Total  of 3000 SA or SA RF polygons.
  • Four polygons containing 2,500 2D cells.
  • All remaining 2996 polygons are of equal size and contain only 500 2D cells.

  i.e. 3000 polygons x 2,500 cells worth of memory = 7,500,000 cells that are allocated. And so on.

It's likely that in future releases of TUFLOW we'll throw a warning or check when this behavior occurs so you can make some mods to amend your polygons.

Please let me know if you had any further thoughts or queries about the above. Cheers, Mitch.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...