Question

FME Warning: Failed to free sufficient memory (while 30GB of memory are free)

  • 6 September 2023
  • 3 replies
  • 60 views

FME shows the following warning during the translation:

2023-09-06 10:24:29|5015.8|  0.3|WARN  |Failed to free sufficient memory to reach the process usage limit. To improve stability and performance please increase the memory available to FME. Available memory can be increased by adding physical RAM, increasing swap space, or closing other applications

I'm using FME(R) 2022.2.1.0 (20221202 - Build 22776 - WIN64) on Windows 10 22H2 Build 19045.2006. I have 64 GB of memory. FME uses about 10 GB during that translation and 50% of RAM are free. Why does FME show this warning when there should be enough free space?

 

FME says it's trying to free memory because it doesn't have enough memory, right? Why does FME fail to free memory? How can FME achieve that goal? What does it do to free memory?

 

And what is the process usage limit?

 

Also I get these log messages and I feel like optimizing memory usage takes up very much time. Does the "Optimizing Memory Usage" message have to do with the warning above? I haven't seen that message before. What does "... Last line repeated 4 times ..." mean?

2023-09-06 11:06:00|7507.0|  0.0|INFORM|Aggregator_7 (AggregateFactory): Finished processing group 5741500 / 7591222
2023-09-06 11:06:00|7507.1|  0.1|INFORM|ResourceManager: Optimizing Memory Usage.  Please wait...
2023-09-06 11:06:05|7512.0|  4.9|INFORM|... Last line repeated 30 times ...
2023-09-06 11:06:05|7512.0|  0.0|INFORM|Aggregator_7 (AggregateFactory): 75.74% complete
2023-09-06 11:06:05|7512.0|  0.0|INFORM|Aggregator_7 (AggregateFactory): Finished processing group 5750000 / 7591222
2023-09-06 11:06:05|7512.0|  0.0|INFORM|ResourceManager: Optimizing Memory Usage.  Please wait...
2023-09-06 11:06:11|7517.2|  5.2|INFORM|... Last line repeated 33 times ...
2023-09-06 11:06:11|7517.2|  0.0|INFORM|Aggregator_7 (AggregateFactory): Finished processing group 5759000 / 7591222
2023-09-06 11:06:11|7517.4|  0.2|INFORM|ResourceManager: Optimizing Memory Usage.  Please wait...
2023-09-06 11:06:11|7517.5|  0.1|INFORM|Aggregator_7 (AggregateFactory): 75.87% complete
2023-09-06 11:06:11|7517.5|  0.0|INFORM|ResourceManager: Optimizing Memory Usage.  Please wait...
2023-09-06 11:06:16|7522.4|  4.9|INFORM|... Last line repeated 30 times ...
2023-09-06 11:06:16|7522.4|  0.0|INFORM|Aggregator_7 (AggregateFactory): Finished processing group 5767500 / 7591222
2023-09-06 11:06:16|7522.4|  0.0|INFORM|ResourceManager: Optimizing Memory Usage.  Please wait...
2023-09-06 11:06:16|7523.1|  0.7|INFORM|... Last line repeated 4 times ...

 


3 replies

Userlevel 3
Badge +13

Hello there @dsign-world​, are you able to review the suggestions mentioned under the 'Optimizing Memory Usage' section of the Performance Tuning in FME: Memory Management article and see if you can tweak anything? If none of the listed suggestions help resolve the memory issue, please feel free to reach out with an update! A few other things you can try: disable feature caching (article), or purge temporary files (doc). Happy to help, Kailin

Hello there @dsign-world​, are you able to review the suggestions mentioned under the 'Optimizing Memory Usage' section of the Performance Tuning in FME: Memory Management article and see if you can tweak anything? If none of the listed suggestions help resolve the memory issue, please feel free to reach out with an update! A few other things you can try: disable feature caching (article), or purge temporary files (doc). Happy to help, Kailin

I had to load a big table in FME and I required all of its columns, so there was no way to optimize that (other than not using FME and using SQL instead). I reduced the amount of data as soon as possible inside the workspace.

The question is, why does FME start optimizing memory usage when most of my RAM is free? The FME Memory Management article says that FME starts optimizing memory usage once it reaches the upper limit mentioned in the log. But I didn't save the complete log unfortunately.

System Status: 64.00 GB of physical memory available
System Status: 256.00 GB of virtual memory available
FME Configuration: Start freeing memory when the process exceeds 192.00 GB or address space exceeds 16777216.00 TB
FME Configuration: Stop freeing memory when the process is below 144.00 GB and address space is below 16777216.00 TB

But it seems like FME usually has a much larger amount of memory available before it is supposed to start optimizing memory usage.

Userlevel 3
Badge +13

I had to load a big table in FME and I required all of its columns, so there was no way to optimize that (other than not using FME and using SQL instead). I reduced the amount of data as soon as possible inside the workspace.

The question is, why does FME start optimizing memory usage when most of my RAM is free? The FME Memory Management article says that FME starts optimizing memory usage once it reaches the upper limit mentioned in the log. But I didn't save the complete log unfortunately.

System Status: 64.00 GB of physical memory available
System Status: 256.00 GB of virtual memory available
FME Configuration: Start freeing memory when the process exceeds 192.00 GB or address space exceeds 16777216.00 TB
FME Configuration: Stop freeing memory when the process is below 144.00 GB and address space is below 16777216.00 TB

But it seems like FME usually has a much larger amount of memory available before it is supposed to start optimizing memory usage.

Hello @dsign-world​, thanks for replying! I got some additional information on how memory management works in FME, hopefully this will help answer some of your questions. Unfortunately the initial memory limit logged is not necessarily always accurate when we start optimizing memory. FME will start freeing memory when that limit is reached, but we may also start freeing memory before that limit is reached if we detect that the system is potentially in a low memory state. Are you using a Windows machine by chance?

 

On Windows, FME Form will check for a low memory state based on how close the system commit total is compared to the system commit limit (this page has a short description of these values).

 

Before requesting a workspace for testing, it might be helpful if you can save and share a complete logfile with FME_DEBUG enabled. You can enable FME Debug Logging under Tools > FME Options > Translation > Log Message Filter. This will tell FME Form to log additional debug messages regarding what decisions it's making around memory. 

 

If you feel like FME is not being aggressive enough with memory, you could potentially try adjusting it's approach with the FME_ENGINE_MEMORY_REDLINE setting (as described in this article), though that's not something we generally recommend (it also may not actually help, as changing that setting doesn't impact the "low memory state" check that we may be hitting). I know there is a lot of information here, so no rush getting back to me! All the best, Kailin. 

Reply