How to release memory after massive CopyRates()? - page 4

 

I currently have the same issue. I'm loading 900 symbols, and terminal64.exe eats as much memory as available. That's 47 gigabytes in my case.

I've found that it is not a critical issue, because the memory will be swapped to the pagefile when appropriate.

Still, I would like to know how to free up the cache (which is a good thing) manually, which allows better resource management for my programs.

(edit: I monitor memory-/and disk usage with the resource monitor during loading)

(edit2: I also use spacesniffer to watch how the history is used. Only after closing the terminal, terminal64.exe remains active for a while, dumping it's cache to the history files, causing the history files to grow in size. This possibly indicates that the data in memory is not persistent until closing the terminal. Which is not a favorable situation in case the terminal closes due to abnormal termination.)

 
Dave Bieleveld #:

I currently have the same issue. I'm loading 900 symbols, and terminal64.exe eats as much memory as available. That's 47 gigabytes in my case.

I've found that it is not a critical issue, because the memory will be swapped to the pagefile when appropriate.

Still, I would like to know how to free up the cache (which is a good thing) manually, which allows better resource management for my programs.

(edit: I monitor memory-/and disk usage with the resource monitor during loading)

(edit2: I also use spacesniffer to watch how the history is used. Only after closing the terminal, terminal64.exe remains active for a while, dumping it's cache to the history files, causing the history files to grow in size. This possibly indicates that the data in memory is not persistent until closing the terminal. Which is not a favorable situation in case the terminal closes due to abnormal termination.)

It's unfortunately not possible. The cache is cleared after 30 minutes.
 
Hello, good day, I have the same problem with "CopyRates" but this time taken to metatester.ex5

On the host, ram usage is normal and is released appropriately.

but on the servers, "extra agents" the ram gets stuck.

I'm on the latest build.


Host:

 

Local Farm:


 
Alain Verleyen #:
It's unfortunately not possible. The cache is cleared after 30 minutes.

I also have the same problem and any other "trader/programmer" will have the same problem as well.

This looks like a deliberate move by MetaQuotes to prevent users from doing "mass" calculations.


Creating a function to clean up the EA memory is not a problem. Such a function could be called from the program when the symbol changes, which would cause the memory to be almost empty all the time.

Statements in the documentation such as: "To save resources, data on a timeframe are stored and saved in RAM only if necessary. If not called for a long time..." mean nothing and are senseless.

What does "if necesary...." mean? "Necessary" for whom? I guess the user/programmer knows better than MetaQuotes when he no longer needs historical data in RAM for a particular symbol. True...?

Moreover, "...for a long time..." also makes no sense. For me, the data storage time in RAM  ends when the symbol changes and I DO NOT NEED TO KEEP THEM IN RAM "...for a long time...". Let them go to HDD, I've enough terabytes on it.

The existence of this problem for so long proves that MetaQuotes acted on purpose, for the purposes I wrote about at the beginning.

By the way: my RAM didn't clean itself even after 40-50 minutes of stopping CopyTimes(...) and I'm not going to prove it. It's just as I wrote.