View Full Version : ninjatrader memory handling and optimization
scriabinop23
05-17-2007, 07:47 PM
am running ninjatrader 6.0 and am noticing a few interesting memory management issues, mostly related to running optimizations:
1) when running multi input variable optimizations (like 5 or 6) with input ranges for every variable, i am prone to getting outofmemory type crash errors. i find that by increasing the intervals (decreasing total # of scenarios) tends to resolve this, but of course makes my optimizations perhaps less accurate to past results.
2) When doing the above, i also notice ninjatrader tends to get to process memory size in task manager of 300mb-400mb. Then after I close the strategy analyzer (i assume this is the source of the consumption), that application memory size stays the same. Sometimes I'm best off closing and re-opening the application. Often when things get unreliable as well, quitting the application doesn't end the process, and I must force kill it, and then restart.
3) i am running vista ultimate w/ 2 gb of memory, just FYI.
any ideas?
NinjaTrader_Dierk
05-18-2007, 01:56 AM
1) NT should not report OutOfMemory if task manager states that there still is memory. I suggest isolating the issue. of course you always can drive it to a point where there is no more memory available (just by loading too much data).
2) Since .NET is a garbage collection system you would not see as NT frees memory.
scriabinop23
05-18-2007, 07:49 PM
1) NT should not report OutOfMemory if task manager states that there still is memory. I suggest isolating the issue. of course you always can drive it to a point where there is no more memory available (just by loading too much data).
2) Since .NET is a garbage collection system you would not see as NT frees memory.
Here's one that just happened when I was running strategy analyzer. Multi variable optimize triggered it, but the array was no where near as large as ones I had previously run. Rebooting the application fixed it.
The Ninjatrader app was about 630MB in memory when this happened. Attached is task mgr and the crash text. Actually occurred in the newest 6.0 v2 release. And yes, the report came from .NET framework. If you hit continue, the application doesn't actually 'crash' - just a failure of the requested function occurs.
NinjaTrader_Dierk
05-18-2007, 10:47 PM
Thanks for feedback. We're looking into it.
Could you please PM me (dierk AT ninjatrader DOT com):
- your actual strategy
- screenshot of the strategy, optimization settings
Thanks
NinjaTrader_Dierk
05-19-2007, 08:08 AM
There was a bug related to .NET garbage collection. We provided a fix and a custom build. Please:
- uninstall NT6 via control panel
- clear your browser cache
- install custom build from here: www.ninjatrader-support.com/ninjatrader/nt6.custom/NinjaTrader.Install.msi
Please let us know how it goes.
Thanks for your support on that matter.
scriabinop23
05-19-2007, 10:11 AM
There was a bug related to .NET garbage collection. We provided a fix and a custom build. Please:
- uninstall NT6 via control panel
- clear your browser cache
- install custom build from here: www.ninjatrader-support.com/ninjatrader/nt6.custom/NinjaTrader.Install.msi (http://www.ninjatrader-support.com/ninjatrader/nt6.custom/NinjaTrader.Install.msi)
Please let us know how it goes.
Thanks for your support on that matter.
Done. Now when I attempt to run the optimizer it immediately finishes and no results come out. I've noticed this happen in the past occasionally. No errors either. Also restarted the NT application twice to attempt redo, and same thing happens. When I had this trouble in the past, restart would fix it. Perhaps I should make sure I'm running the latest .NET framework updates? Backtest with fixed variables DOES work, just not the optimizer. I looked at the output window and it looks like the optimizer doesn't even get to the stage of invoking the backtester.
NinjaTrader_Dierk
05-20-2007, 12:35 AM
You need to have .NET 2.0 runtime installed to tun NT.
Do you have a reproducible scenario? I tried the setup you sent me but it would takes hours to complete. Do you have something which completes within a few minutes?
If so, then please:
- send me again screenshot or settings
- send me your zipped DB
Thanks
scriabinop23
05-20-2007, 10:34 PM
You need to have .NET 2.0 runtime installed to tun NT.
Do you have a reproducible scenario? I tried the setup you sent me but it would takes hours to complete. Do you have something which completes within a few minutes?
If so, then please:
- send me again screenshot or settings
- send me your zipped DB
Thanks
Now its working fine... I did attempt to 'reinstall' .NET 3.0 from the Microsoft website, and rebooted. Maybe redoing .NET and/or the reboot took care of the issues entirely.
I'll keep my eye on it.
Thanks.
NinjaTrader_Dierk
05-21-2007, 01:51 AM
You need to have .NET 2.0 runtime installed to tun NT. .NET 3.0 is not sufficient.
scriabinop23
05-22-2007, 11:00 AM
You need to have .NET 2.0 runtime installed to tun NT. .NET 3.0 is not sufficient.
well it seemed i already had that of course; otherwise the application wouldn't have run. I guess .net 3.0 is an extra package?
didn't seem like 3.0 was a very sizeable download.
NinjaTrader_Dierk
05-22-2007, 11:46 AM
.NET 3.0 is the next .NET generation. You can have multiple .NET generations installed on the same machine the same time.