Portfolio Backtester Memory Management Issues

Questions about MultiCharts .NET and user contributed studies.
clonardo
Posts: 16
Joined: 27 Sep 2013
Has thanked: 1 time
Been thanked: 1 time

Portfolio Backtester Memory Management Issues

Postby clonardo » 08 Nov 2013

Hi,

I've been using MultiCharts for a few months now, and have an issue that I have encountered in 8.7, 8.8 Beta 1, and 8.8 Beta 2. This has occurred on two different computers- one an 8-core Xeon with 36gb of RAM, and the other a 16-core Xeon with 128gb of RAM.

I am using about 5 years of minute data for my backtest, loaded from ASCII mapping. Even on a small portfolio of <10 securities, I am finding that as the number of simulations that have elapsed increases, the memory usage increases ad infinitum.

If I run an optimization greater than a few dozen iterations on the 36gb machine, or somewhat more than that on the 128gb machine, memory will end up completely utilized, the Portfolio Backtester will start paging from disk, and even with the high-performance SSDs installed in both machines, it will pretty much never finish at this point.

It's clear that there is a garbage collection issue somewhere. I am seeing the memory usage in MCPortfolio.exe increase boundlessly- the study server seems to be behaving. After iteration, there is no need to reload market data to memory, so I am puzzled as to how/why this is happening. None of the objects that are created by my study are particularly large, and any remaining objects from execution of the study should be disposed of after completion of that iteration.

When I write iterative code that creates large objects (unrelated to and outside of MultiCharts), memory usage will creep up during an iteration and then drop when that iteration completes and garbage is collected or objects are manually destroyed. Up, down; up, down. I would expect the same to be happening here- not just up; up; up, and away.

Has anyone else observed similar problems? Thanks.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Portfolio Backtester Memory Management Issues

Postby Henry MultiСharts » 11 Nov 2013

Hello clonardo,

Are you able to replicate this behavior with 1 instrument using prebuilt signals?
If you are able to do that then please send me (support@multicharts.com) the following information for further investigation:
- workspace you are using;
- data you are using;
- in PowerLanguage editor->File->Export->export the studies you are using in the workspace you are providing.
If the case cannot be replicated using prebuilt signals:
Please try to narrow down the amount of instruments and simplify the code to have this behavior replicated. Once you have a simplified case please send me the required details and we will study it.

If the file size is >10 mb please upload it to any file sharing hosting and send me the download link.


Return to “MultiCharts .NET”