Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

How to avoid queue overload?
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=65&t=57668
Page 1 of 1

Author:  mchiuminatto [ Mon 31 May, 2021, 21:23 ]
Post subject:  How to avoid queue overload?

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 344 times

Author:  API Support [ Thu 15 Jul, 2021, 14:19 ]
Post subject:  Re: How to avoid queue overload?

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.

  Page 1 of 1