Staggering Data Lags with Investor/RT and DTN - Any and All Help Would Be Appreciated

Discussion in 'Data Sets and Feeds' started by cwb1014, Apr 10, 2009.

  1. cwb1014


    I don't know whether this is a software or a hardware problem or a combination of the two, but I'm hoping there are some experts here who can give me some guidance. I'm running Investor/RT (IRT) with DTN's IQFeed data feed. I am running them on a Windows XP Pro system with a 3.16 GHz Core2Duo and 4 GB RAM. I also run Interactive Broker's TWS on the same system. I trade stocks and lately have been noticing staggering lags between the time stamps (i.e., the times the trades were executed as reported by the exchanges) on the ticks I receive from DTN and the time they show up in IRT, especially in the first and last half-hours of the regular trading session.

    As an example, in the last half-hour yesterday, I was only monitoring 23 symbols and yet my average lag for each instrument was roughly 30 seconds, making it impossible to trade effectively off of charts. Making this all the more troubling is that yesterday's trading volume was below average. During this time, IQFeed was taking up roughly 50% of my processor with IRT and IB taking up roughly 15% each. So that you'll know, at all other times during the session, my lags run in the vicinity of 1-3 seconds, with the processor loads substantially reduced (total load of these 3 components would be in the vicinity of 25 - 35%).

    It seems clear that the problem here is generally a function of the vastly increased tick flows during the first and last half-hours, but what specifically the problem is I don't know. Is DTN's software (IQConnect, which takes the data in the packets it receives and converts them to a form usable by IRT) taking too long to do its job when tick rates increase dramatically or is IRT not capable of taking the data up fast enough from IQConnect at these times for it to be delivered on a timely basis to IRT's charts? Would a more powerful computer solve the problem and, if so, what kind of system would I need to get this down to manageable levels?

    I'd also be interested in knowing whether anyone else here has experienced these types of lags while monitoring similar or greater numbers of symbols during these times. If so, how have you dealt with it? If not, what charting software are you using with what data feeds and what kind of lags are you experiencing during these and other times? Finally, if anyone here has any general suggestions as to how to resolve the problems I'm experiencing with these staggering lags, I sure would appreciate your letting me know.

    Since some of you may be wondering why I don't just use IB's data feed, which is compatible with IRT, it's because I want to have access to IRT's volume breakdown features, which are very inaccurate with IB's feed, because IB's feed does not transmit every tick (it aggregates ticks at the same price) while DTN's does.

    Many thanks in advance for any help that anyone may be able to offer here.

    Best regards,


  2. gttrader


    I usually monitor about 40 symbols using DTN IQfeed and MultiCharts and don't experience any lag compared to my IB feed on another PC. MultiCharts does use about 30-40% of my quad core processor when the market is fast. Does IRT multi thread using both cores? I think it's probably an IRT/IQ integration issue rather than the data feed.
  3. FGBL07


    There are some details missing from your description.

    What kind of internet connection do you use? I assume it is not the problem?

    What calculations do you perform within your charting software? "Heavyweight" indicators may impose quite a heavy load.

    Do you use any kind of security software, like firewalls, virus scanners etc? I do not use any of these (kicked them out) but I use a router with integrated firewall.

    Your processor load looks way too high and the hardware itself (assuming there no bugs in your setup) should be more than sufficient.

    You should check your software configuration.

    My previous PC was an AMD something (1400Mhz Single CPU!) and I was running eSignal Data Manager, Charting software plus TWS. My Cpu load was nowhere near yours and I only had delays when eSignal lagged. But I'm monitoring very few future symbols only, maybe a dozen. At one time I was monitoring all SP100 stocks and that caused some load.
  4. cwb1014


    IRT is not multi-threaded. Are MultiCharts? Do you have any sense of what aspect of the IRT/IQ interface would be causing these problems? Thanks for your insights and hope to hear more...
  5. Your processor is fine and your setup is way more than enough. If your symbol list is a small subset of the market and it can handle 10MBps or more, you're good. (If you aren't, then your lag is a function of your pipe being saturated.)

    Assuming your pipe is not saturated:

    Run a traceroute on the ip that's listed on your datafeed connection from the netstat output. Then run a few pings. Look at the number of milliseconds it takes during normal operation. Then, on a day where there is high traffic, collect the same data.

    If the ping times don't change, then it's the provider that's taking time to get the data to you -- some feed providers have non hard-realtime quote dissemination times during fast markets. A dropped packet on multiple multicast channels can result in a base-line latency hit of 300ms, and in some cases 1 second. If this latency is coupled with non-hard RT software quote dissemination, the end user can see lags of up to 3 seconds or worse.

    If the data is sent over TCP, check the tcp statistics on your respective OS to find out how many TCP/IP retransmits and window-size adjustments occurred. If retransmits are happening often, you need to figure out why and which network segment is dropping the ball. Then eliminate that segment [usually by switching providers.]

    (Incidentally, if anyone out there has the packet drop problem and wants to cut their data reception to virtually just the cost of the latency to the exchange, contact me -- I am able to provide drop-free solutions and have a strong track record in this area of low-latency requiring trading applications. PM Me. :) )
  6. cwb1014


    Many thanks for your reply. By way of clarification, let me ask a couple of questions. When you say "it can handle 10MBps or more," what does the "it" refer to? Also, what are "non hard-realtime quote dissemination times"? Additionally, how do I find out if "the data is sent over TCP"? Finally, when you refer to "switching providers," are you referring to switching data providers or internet service providers?

    Also, I should point out that the lags I'm referring to are from the time stamp on the tick to the time the tick arrives in IRT, which may be quite a bit later than the time the tick arrives at my computer. Between the time data arrives at my computer and the time that data arrives in IRT, IQConnect has to process the data to convert it to a form IRT can read. In addition to the processing itself, this may take a good bit of time in fast markets as there may be, I would think, a long queue of data awaiting processing. Then the data has to make its way into IRT's database and this may take a while as there may be, in fast markets, a long queue of data waiting to get in. Then, of course, the data has to make its way from the database to the chart. I don't know whether this sheds any further light on what I'm dealing with, but wanted to point these details out as I thought they might be helpful to know.

    Look forward to learning more and thanks again for your reply...


  7. cwb1014


    Many thanks for your reply. I'm using Time Warner Cable with Turbo Boost (which delivers downloads at anywhere from 2 - 10 Mbps) and Verizon DSL as a backup. So that should not be a problem. I'm using no heavyweight indicators; nothing I'm using takes more than 1 millisecond to calculate. I'm using McAfee Virus Scan, but there's no way any more to turn it off completely that I know of. I'm using no software firewalls and, like you, am using a router with an integrated firewall. The processor load is only high at times of very heay tick traffic; when you say it looks way too high are you bearing that in mind? When you say I should check my software configuration, what specifically would you recommend I check? So that you'll know, there are a number of things one can do in IRT to lighten the load on one's system (e.g., not monitoring bids and asks), and I've got all of them implemented already. That said, there may be more I can do, so I'd welcome any additional ideas you may have.

    Hope to hear more from you and thanks again for your help...


  8. gttrader


    Yes MultiCharts is multi threaded, so upgrading to a quad core isn't going to help. Anyway as someone already pointed out that is more about calculating indicators.
    One thing to look at is right click on the DTN icon in the system tray > Support > Launch Diagnostics. Enter a test symbol click test then look at the Streaming Quote tab and you will see if the data is lagging or it is IRT. If it's the data then look into your network se tup ISP firewall etc. if it's IRT then contact them.
  9. It = your cable modem/dsl/whatever

    non-hard realtime dissemination means that, well ... During normal markets, the upper bound on the time it takes the exchange to send a tick is more or less stable or some fixed amount, ... but in fast markets if the time it takes to deliver goes up as a function of the speed of quotes, your time to process and transmit grows... this happens to a lot of data feed providers if they don't write their code correctly ...

    For all intents of purposes, the issue is not you or your computer. At best, you're asking for too much data; however, the most probable cause is that DTN is not good enough for today's fastest market... (but it may be good enough for the usual days)
  10. FGBL07


    I don't know McAfee, but you should be able to deinstall it completely. In any case you should check its settings: does it monitor your charting software? Your web streams? It should not do so.

    I'm referring to this statement of your's:
    Normally there should be no delay at all. There may be a delay inherently introduced by the data feed: some are aggregated and thus will always be a little late but not to the tune of 3 seconds or 30 seconds, even in times of heavy load. I have been monitoring about a dozen future symbols on an outdated laptop with 512 MB RAM and a 768Mhz CPU and had a load of 60 - 70%. Your rig is at least 10 times as powerful.
    I do not use IRT and never used it, so it's a bit hard for me to give a detailed advice here. You will need the help of the IRT support people. I have had a similar problem with my previous computer and charting software: Using 1,7GB of RAM was not enough, I had run out of memory. I had to "detune" my software configuration and doing this was not a 1-click solution; I had to go over the configuration and finally adjust my requirements.
    #10     Apr 10, 2009