Memory usage
Author: wl64bit
Creation Date: 7/21/2010 8:34 PM
profile picture

wl64bit

#1
The memory of the PC is cleared only after WLD is closed.
Is there any way to make WLD clear memory after closing the Strategy window but leaving the WLD running?
profile picture

Cone

#2
There probably isn't anything you or anyone can do, it's a function of .NET's garbage collector.

I have noted that re-running a large simulation without closing the Strategy Window does not clear memory from the previous run and quickly generates OutOfMemoryException when it hits the machine's memory limit in 32-bit mode. This seems to be a shortcoming of the garbage collector in 32-bit mode, whereas in 64-bit mode in other tests, I've seen memory recycled successfully only after reaching the machine's physical memory limit (8 GB on mine).
profile picture

wl64bit

#3
It looks like in my case with 64-bit, garbage collector does not recycle memory even after reaching the machine's physical memory limit.
profile picture

Eugene

#4
.NET's garbage collection algorithm is lazy like Robert says, but changed to the better in the latest .NET incarnation.
profile picture

wl64bit

#5
Does it mean that I need to get a new one?
profile picture

Eugene

#6
No, WL5 is currently based on .NET 2.0 and basically doesn't depend on the existence of other frameworks (.NET 3.5 or 4.0) - except when an Extension requires them.
profile picture

MarkStaunton

#7
Hi,

Is WL6 still based on .NET 2.0? i.e. will WL6 use a more recent .NET (and better performing) garbage collector?
profile picture

Eugene

#8
Yes, WL6.0 is still based on .NET 2.0. Most likely, a couple of forthcoming builds will be too (sadly).

In my humble opinion, switching to .NET 4.0 and introducing multi-core optimizations should be given a much higher priority than it is. :(
profile picture

MarkStaunton

#9
Yeah I agree with you. On larger back tests/ optimizations WL (and entire PC) performance drops when all physical RAM is used and more swapping takes place.When back testing I write all my trades to a sql database, where I do the analysis of the tests. As such, I don't need WL to hold my results in memory. Could I just set the object, that stores the results, to null? This way WL wouldn't be so memory hungry.
profile picture

Eugene

#10
If you visualize your results, WL has to hold them in memory.

You may try setting it to null, or explicitly calling GC.Collect(), still the best thing until .NET 4.0 is close WL and restart it when the 2.0 GC's laziness shows up.
profile picture

MarkStaunton

#11
Thanks Eugene. I'll give them a go.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).