Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TipmyPip, AndrewAMD), 911 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
High memory usage on lower timeframes #485423
03/09/22 11:31
03/09/22 11:31
Joined: Jan 2022
Posts: 58
N
NorbertSz Offline OP
Junior Member
NorbertSz  Offline OP
Junior Member
N

Joined: Jan 2022
Posts: 58
Dear all,

I started to use multiple Zorro S instances (2.44). As you see on the attached picture this is my VPS's task manager, and my question is about the huge memory usage. The running script is exactly the same on all Zorro instances: they connect to a MT4 terminal (one MT4, one chart open with the Zorro EA.). They are in Trade mode.

The only difference between them is the timeframe: 1, 5, 15, 60, 240.
The highest memory usage is connected to the 1 minute timeframe instance, and the lowest to the 240 minutes.

I found this thread:
https://opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=478604
but I don't use the PRELOAD flag.

In the code:
Code
function run(){
	set(LOGFILE);
	//BarPeriod = 60; //selected with the UI
	LookBack = screenSize * 2 + 20;

(screenSize is a constant, set 200)

So it should only load 420 candles per timeframe, the 1.87 GB RAM on 1 minutes chart is insane.

Additional informations: this huge memory usage is this high at the first moment of the trading, and it's not increasing time-by-time. So i'm pretty sure it's not a memory leak in the code.

Could you help me how is it possible and how can I avoid this phenomenon?
Thank you!

Attached Files zorro_memory.png
Last edited by NorbertSz; 03/09/22 11:37.
Re: High memory usage on lower timeframes [Re: NorbertSz] #485426
03/09/22 11:42
03/09/22 11:42
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
https://zorro-project.com/manual/en/asset.htm

Under 'remarks' on this page is a formula to estimate memory requrement per asset. Obviously, it's far away from > 1 GB. So something else in your script is probably the culprit. You can use the memory() function for getting the real memory footprint at any bar.

Re: High memory usage on lower timeframes [Re: jcl] #485436
03/10/22 05:01
03/10/22 05:01
Joined: Feb 2022
Posts: 21
T
TrumpLost Offline
Newbie
TrumpLost  Offline
Newbie
T

Joined: Feb 2022
Posts: 21
Watching this thread. Hope you get an answer.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1