Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

How to avoid queue overload?
 Post subject: How to avoid queue overload? Post rating: 0   New post Posted: Mon 31 May, 2021, 21:23 
User avatar

User rating: 0
Joined: Tue 03 Feb, 2015, 16:25
Posts: 2
Location: Uruguay, Punta del Este
Hi

I have built a "strategy" that feeds tick, renko, candle, range and tick bars to a Redis database. The strategy is subscribed to all the majors (7 currencies). For each feed (renko, range and tick bar) three time frames are being processed. Probably is a little too much for a strategy to deal with so I'm receiving these messages in the console printing.

What are the possible solutions for this?

I'm running the strategy from a 8 threads 16GB RAM (see Capture.PNG)

a) split processing in different strategies?
b) split more and process one currency one time frame?
c) other?
d) More processing power?
e) None of the above?


Strategy thread queue overloaded with tasks. Ticks in queue - 7, bars - 521, other tasks - 78
Strategy thread queue overloaded with tasks. Ticks in queue - 8, bars - 530, other tasks - 78


This strategy is intended to run as a standalone process (jar) out of JForex.

Thanks

Marcello Chiuminatto
Image


Attachments:
Capture.PNG [10.96 KiB]
Downloaded 337 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: How to avoid queue overload? Post rating: 0   New post Posted: Thu 15 Jul, 2021, 14:19 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Greetings.

Strategy callback methods (onTick, onBar, onFeedData) are executed in single thread.
To prevent strategy thread queue overload, execute long running operations in background threads.
https://www.dukascopy.com/wiki/en/devel ... /threading

Regards.


 

Jump to:  

  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com