2

I'm currently using ArcGIS 10.3.1 on a 64 bit windows 7 machine.

When I run the following model, every iteration adds about 20 consistent megabytes into the ArcMap sessions memory until it eventually runs out.

I've tried adding a 'delete' function for in_memory. The output shows this works, but the 20 megabytes still keeps adding up.

It's the same thing that happens if you do several processes in ArcMap and eventually the memory gets used up, even if you're not storing extra datasets in the project.

Any ideas on how to eliminate this problem so the memory won't run out?

Model

HERE'S THE OUTPUT REPORTING RESULTS:

Executing (Iterate Field Values): IterateFieldValues C:\Projects\Yakima_Basin_Study_0410\KtoKPipeline_KachessInactive\Kachess_Capacity_Table_Contours\Kachess_Capacity_1015\Kachess_Capacity_1015.gdb\IterationTable0316 Iteration Double true false 0 Start Time: Wed Mar 30 06:24:39 2016 Succeeded at Wed Mar 30 06:24:39 2016 (Elapsed Time: 0.19 seconds) Executing (Surface Volume): SurfaceVolume C:\Projects\Yakima_Basin_Study_0410\KtoKPipeline_KachessInactive\Kachess_Capacity_Table_Contours\Kachess_Capacity_1015\TIN_KACDam_BORDatum_0316 C:\Projects\Yakima_Basin_Study_0410\KtoKPipeline_KachessInactive\Kachess_Capacity_Table_Contours\Kachess_Capacity_1015\Kachess_Capacity_Output_Files\KACDam.txt BELOW 2133.01 1 0 Start Time: Wed Mar 30 06:24:43 2016 Completed Surface Volume: 2D Area=117053561.15555 3D Area=132153865.43817 Volume=19787611237.973 Succeeded at Wed Mar 30 06:25:02 2016 (Elapsed Time: 19.57 seconds) Executing (Delete): Delete in_memory Workspace Start Time: Wed Mar 30 06:25:12 2016 Succeeded at Wed Mar 30 06:25:12 2016 (Elapsed Time: 0.01 seconds) Executing (Iterate Field Values): IterateFieldValues C:\Projects\Yakima_Basin_Study_0410\KtoKPipeline_KachessInactive\Kachess_Capacity_Table_Contours\Kachess_Capacity_1015\Kachess_Capacity_1015.gdb\IterationTable0316 Iteration Double true false 0 Start Time: Wed Mar 30 06:25:12 2016 Succeeded at Wed Mar 30 06:25:12 2016 (Elapsed Time: 0.02 seconds) Executing (Surface Volume): SurfaceVolume C:\Projects\Yakima_Basin_Study_0410\KtoKPipeline_KachessInactive\Kachess_Capacity_Table_Contours\Kachess_Capacity_1015\TIN_KACDam_BORDatum_0316 C:\Projects\Yakima_Basin_Study_0410\KtoKPipeline_KachessInactive\Kachess_Capacity_Table_Contours\Kachess_Capacity_1015\Kachess_Capacity_Output_Files\KACDam.txt BELOW 2133.02 1 0 Start Time: Wed Mar 30 06:25:14 2016 Completed Surface Volume: 2D Area=117057436.47809 3D Area=132158168.43332 Volume=19788781792.957 Succeeded at Wed Mar 30 06:25:27 2016 (Elapsed Time: 12.63 seconds) Executing (Delete): Delete in_memory Workspace Start Time: Wed Mar 30 06:25:37 2016 Succeeded at Wed Mar 30 06:25:37 2016 (Elapsed Time: 0.01 seconds) Executing (Iterate Field Values): IterateFieldValues C:\Projects\Yakima_Basin_Study_0410\KtoKPipeline_KachessInactive\Kachess_Capacity_Table_Contours\Kachess_Capacity_1015\Kachess_Capacity_1015.gdb\IterationTable0316 Iteration Double true false 0 Start Time: Wed Mar 30 06:25:37 2016 Succeeded at Wed Mar 30 06:25:37 2016 (Elapsed Time: 0.02 seconds)

  • 1
    Would you be able to include the result of running your model tool as text rather than as a picture, please? That way its contents are available to future searches. There is an edit button beneath your question that you can use to revise it. – PolyGeo Mar 29 '16 at 21:25
  • 1
    Use arcpy.Delete_management("in_memory") – FelixIP Mar 29 '16 at 22:23
  • If you haven't already, I'd suggest you install Background Geoprocessing x64 so that you take take advantage of any extra RAM you might have. x86 is limited to ~2GB. – Paul Mar 30 '16 at 16:17
1

Enabling 64 bit background geoprocessing seems to have solved the issue. It's not due to allowing more RAM to be comsumed than in a 32 bit ArcMap session.

The original problem was that one iteration of the model would use around 700 mb of memory, then release around 680 mb, leaving 20 mb as just dead memory (used but not actively doing anything). With each iteration this 20 mb would add up until the limit was exceeded.

Using the 64 bit background geoprocessing seems to release all the memory at the end of each iteration, therefore it never comes close to exceeding the overall limit.

For people, like me, who just use model builder occasionally here's a few basic steps to enable your model to run in the background 64 bit environment: 1) Go to the 'geoprocessing' drop down list> Pick 'geoprocessing options'> Click 'enable' for background processing. 2) Right click on your model> Select 'properties'> On the 'general' tab click off 'always run in foreground' 3) Right click each element of your model> Choose 'model parameter' if it allows you to. 4) Run your model as a tool by double clicking on it. Do not run it in edit mode.

I never finished trying the use of arcpy.Delete_management("in_memory") in a python code, since the 64 bit background geoprocessing worked. I would guess running the model as a python script with this suggestion would probably have worked if using the 64 bit geoprocessing or if it was run outside of the ArcMap GUI.

Thanks for everyones suggestions.

0

As 32 bit (x86) is uses up <4gb of ram, I would ensure you are running 64 bit background geoprocessing.

You could export your model into a python script and utilize arcpy.Delete_management("in_memory").

If you want to keep it simple, you can close arc catalog after running the model a few times. But this isn't the clever way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.