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)




"I "bracket trade" all major news releases and I have not found one lag or glitch with DTN.IQ feed. I am very comfortable with their feed under all typical news conditions (Fed releases, employment numbers, etc)." - Comment from Public Forum
"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
"You have an excellent feed. Very few spikes for Spot Forex." - Comment from Public Forum Post
"I've been using Neoticker RT with IQFeed for two months, and I'm very happy with both of the products (I've had IQFeed for two years with very few complaints). The service from both companies is exceptional." - Comment from Public Forum
"With HUGE volume on AAPL and RIMM for 2 days, everyone in a trading room was whining about freezes, crashes and lag with *******, RealTick, TS and Cyber. InvestorRT with IQFeed was rock solid. I mean SOLID!" - Comment from Public IRC Chat
"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.
"I've never had DTN go out on me since switching. ******* would go down a couple times every month when I was using them." - Comment from Bryce in AL.
"Just a thank you for the very helpful and prompt assistance and services. You provided me with noticeably superior service in my setup compared to a couple of other options I had looked at." - Comment from John
"You have an excellent product !!!!!!" - Comment from Arely
"I use IQ Feed, Great stuff as far as data analysis information, storage and retrieval is concerned." - Comment from Public Forum
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 1587 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 1217 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 21, 2024 11:20 AM CFBB v1.2.0 13 ms.
© AderSoftware 2002-2003