"no memory" when running genetic algorithm tests - page 2

 

Rafael Caetano Pinto:
...

NOTICE: the memory problem related to download several symbol history data in background remains.

I got a answer, a Metaquotes developer is investigating.
 
I have this same issue - was there ever a fix/solution for this? It seems that the strategy tester takes a long time to flush the memory. On a small optimization it ran the first pass and then the next 2 fail. The 4 pass ran successfully and then the next 2 passes failed, with the 7th pass also running successfully.
 

As an update as this may help other people - this issue has made my computer crash many times while trying to run the optimization. I started removing newer code to see if that would help and eventually rolled back to code from last month that I knew worked (I document everything so can see all the optimizations I ran with this code, so knew it worked before). I ran this same code and it too failed. This indicated to me that the issue was not with my code, so I decided to try the code in a different MT5 instance, on the same machine (I have a few). To my surprise when running the latest code it used hardly any memory on a standard back test and used less than 42GB on the same optimization that maxed out the memory and eventually crashed the machine on the other terminal. The builds are different. The one that works is "Version: 5.00 build 2981 21 Jun 2021" and the one that does not is "Version: 5.00 build 3069 11 Oct 2021". I therefore conclude that this is an issue with this build and maybe some others.

Sorry, if this is not directly related to the original topic - I originally thought it was and now I am not sure it is.

 
fobot #:

As an update as this may help other people - this issue has made my computer crash many times while trying to run the optimization. I started removing newer code to see if that would help and eventually rolled back to code from last month that I knew worked (I document everything so can see all the optimizations I ran with this code, so knew it worked before). I ran this same code and it too failed. This indicated to me that the issue was not with my code, so I decided to try the code in a different MT5 instance, on the same machine (I have a few). To my surprise when running the latest code it used hardly any memory on a standard back test and used less than 42GB on the same optimization that maxed out the memory and eventually crashed the machine on the other terminal. The builds are different. The one that works is "Version: 5.00 build 2981 21 Jun 2021" and the one that does not is "Version: 5.00 build 3069 11 Oct 2021". I therefore conclude that this is an issue with this build and maybe some others.

Sorry, if this is not directly related to the original topic - I originally thought it was and now I am not sure it is.

For temporary solution, we can restart meta trader, or restart computer, or re-install Meta trader will fix it
 
Nguyen Phuong Hoang #:
For temporary solution, we can restart meta trader, or restart computer, or re-install Meta trader will fix it

Or disable and re-enable the agents/cores, so you don't have to restart.

Another tip, use resource monitor to figure out how much memory each agent uses and only enable that amount of cores that fit. You should look at the column "commit"

For instance, I can use about 6 of the 16 cores with 64 gb ram. 

Any higher, I get the status failed, and/or in the log: 

2023.08.21 19:37:02.044 Core 01 2 optimization passes returned to queue as not processed

As you can see in the screenshot below, not all memory is used up, but I suspect that the MT5 terminal calculates the needed memory based on the committed memory (the physical AND virtual memory) instead on the working set (the actual physical memory). Because 6 * ~10 gb (the committed memory) = 64 gb. When it is exceeded, the agent returns with a failed.


Reason: