MetaTester taking up all available memory - page 2

 
GEORGI GEORGIEV:

I am trying to optimize an EA, which works on M1 bars for 10-20 years ago and can't really do that, because the PC always crashes, because all the RAM gets filled up.


Try using only one agent and see how much RAM is used by metatester. If you are using "Every tick" or "Every tick based on real ticks" it will use many times more RAM than "Open prices only" for example.

My guess is that you'd need about 8GB/Thread for that long time period with every tick simulation.

 
GEORGI GEORGIEV:

Hello everyone,

I have tried researching this, but didn't find a solution that works. I am using a 16-core AMD CPU with 64GB of RAM.

The problem with the tester agents is that it feels like they never release any memory and always take up all the available memory until the PC crashes. Aside of the 64GB of RAM, I have tried to allocate 300GB pagination file on the HDD to be used in case the RAM is not enough, and guess what - it filled it up too.

I am trying to optimize an EA, which works on M1 bars for 10-20 years ago and can't really do that, because the PC always crashes, because all the RAM gets filled up.

I tried using local agents only - same result. Tried to ZeroMemory all the variables - same result. I don't know what to try anymore to make it work. Feels like a problem with the MetaTester. I'm using the latest built - 2361. I completely understand that I am trying to test M1 bars for 20 years ago, which is a lot of bars to test, but the memory usage just goes higher, it never gets released between the passes.

Any idea how can I solve this issue?

Thank you!

Have you tried to reduce the period of M1 bars that you use? For example from 20 years down to 1 year? If so, did you notice any difference in memory (RAM) usage? If it does, then it might indicate that you re trying to load too much data at once.
 

Found the issue! I am actually not deleting many of the objects I'm creating. The weird thing is that the compiler obviously doesn't detect that, because it doesn't issue a warning as it usually do.

Now it uses about 30GB of memory for 16 threads, which is normal I guess. Thank you all for your help!

Reason: