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)




"You have an excellent product !!!!!!" - Comment from Arely
"Its working FABULOUSLY for me!! Holy cow...there has been so much I've been missing lately, and with this feed and Linnsoft software...I'm in the game now." - Comment from Chris R.
"You are much better than lawyers or the phone company because you answer the phone when I call! I just love your customer service." - Comment from Isreal
"I would just like to say that IQFeed version 4 is running very well and I am very happy with its performance. I would also like to extend a big thanks for the fast and efficient help that I always receive. My questions and concerns are always addressed promptly. Way to go!" - Comment from Josh in CO.
"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 happy I changed. I love the product, but more so I am thrilled with Tech Support. You are knowledgeable, polite, pleasant and professional." - Comment from Pat
"I had always used ******* but for the past 2 weeks have been trying DTN IQFeed. Customer support has been extraordinary. They call just to make sure your problem hasn't recurred." - Comment from Public Forum
"DTN feed was the only feed that consistently matched Bloomberg feed for BID/ASK data verification work these past years......DTN feed is a must for my supply & demand based trading using Cumulative Delta" - Comment from Public Forum Post
"Thanks for the great product and support. During this week of high volume trading, my QuoteTracker + IQ Feed setup never missed a beat. Also, thanks for your swiftness in responding to data issues. I was on ******* for a few years before I made the switch over early this year, and wish I had done it a long time ago." - Comment from Ken
"Thank God for your Data Feed as the only Zippers I see are on my pants (LOL), and no more 200 pip spikes to mess up charts." - Comment from Spiro via Email
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 1569 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 1203 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 April 23, 2024 11:04 AM CFBB v1.2.0 9 ms.
© AderSoftware 2002-2003