Join the 80,000 other DTN customers who enjoy the fastest, most reliable data available. There is no better value than DTN!

(Move your cursor to this area to pause scrolling)




"It’s so nice to be working with real professionals!" - Comment from Len
"If you are serious about your trading I would not rely on IB data for serious daytrading. Took me a while to justify the cost of IQ Feed and in the end, it's just a 2 point stop on ES. Better safe than sorry" - Comment from Public Forum
"Interactive Brokers tick data was inconsistent, so I have switched to using DTN exclusively. It is great to no longer have to worry about my datafeed all day long." - Comment from Philippe
"You are either overstaffed or people just don't have problems with your feed because customer support always answers the phone quickly." - Comment from Jay via Email
"I am very pleased with the DTNIQ system for quotes and news." - Comment from Larry
"I've been using IQFeed 4 in a multi-threaded situation for the last week or two on 2600 symbols or so with 100 simultaneous daily charts, and I have had 100% responsiveness." - Comment from Scott
"Everything is working great ! Very impressive client. The news refreshes better and is more pertinent than the ******* feed I paid $ 100/month for. I Also like the charts a lot." - Comment from Leon
"Version 4.0.0.2 has been working well for me and I appreciate that it is now a much tighter client to work with. I feel I can go to press with my own application and rely on a stable platform" - Comment from David in IA.
"IQ feed works very well, does not have all of the normal interruptions I have grown used to on *******" - Comment from Mark
"I'm satisfied with IQFeed. It's the most reliable and fastest quote feed I have ever used. Although I'm a resident in China, it's still very fast!" - Comment from Xiaofei
Home  Search  Register  Login  Recent Posts

Information on DTN's Industries:
DTN Oil & Gas | DTN Trading | DTN Agriculture | DTN Weather
Follow DTNMarkets on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
»Forums Index »Archive (2017 and earlier) »IQFeed Developer Support »when busy trading,CPU usage up to 100%
Author Topic: when busy trading,CPU usage up to 100% (4 messages, Page 1 of 1)

milcloud
-Interested User-
Posts: 8
Joined: Oct 14, 2016


Posted: Oct 21, 2016 10:34 AM          Msg. 1 of 4
we just register about 40 symbols from iqconnect, such as CL,HG,GC,SI and so on.
during day trading, when the trading is busy, the traffic form iqconnect will up to 600kb/s some time 1000kb/s ,then cpu will run up to 100%, and when that happens, the tick will stay in buffer, and our software can not deal it as qucik as the new tick reached.

the software we receive tick do not do much complex work, just parse the tick line form iqconnect and convert to the struct we need.

my process method:
1.recv string line form iqconnect in threadA and put tick string in RingBuffer
2.parse the string line in another threadB

server: 2Core 2G Windows2003
language: C#

so questions
1.any other one meet this problem too? how to deal this problem.
2.do iqfeed provider snapshot of the tick such as 250ms or 500ms? then we will no need do handle so much Ticks.



i have put the tick parse function in the attachment.
Edited by milcloud on Oct 21, 2016 at 10:35 AM
Edited by milcloud on Oct 21, 2016 at 10:37 AM



File Attached: parse_function.txt (downloaded 1580 times)

milcloud
-Interested User-
Posts: 8
Joined: Oct 14, 2016


Posted: Oct 21, 2016 10:39 AM          Msg. 2 of 4
i saved the statistic of server as attachement.



File Attached: server statistic.png (downloaded 1209 times)

DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005


Posted: Oct 21, 2016 02:21 PM          Msg. 3 of 4
Unfortunately we don't provide a snapshot data option at this time and if implemented, the likely lower limit would be 1s.

With that said, I took a look at the code you provided and the obvious thing that jumps out at me is the use of String.Split. This function allocates a new array and a new string object for each and every field on each and every message. When dealing with potentially thousands of messages per second (possibly 10s of thousands), this is going to be very inefficient, especially since these are temporary objects and you are immediately converting the fields to binary. In order to efficiently process the feed, you need to eliminate as many of these types of temporary variables as possible in your processing.

Also, make sure you are using the dynamic fieldsets feature of the feed to eliminate any fields that you aren't interested in processing. I can't tell from the code snipit if you are using this or not but make sure you are.

milcloud
-Interested User-
Posts: 8
Joined: Oct 14, 2016


Posted: Oct 22, 2016 08:01 AM          Msg. 4 of 4
i use dynamic fieldsets, and thanks for your suggestion, i will try to get some efficient way to handle this problem.

thanks.
 

 

Time: Tue May 7, 2024 10:39 PM CFBB v1.2.0 9 ms.
© AderSoftware 2002-2003