mvo
-Interested User-
Posts: 8
Joined: Apr 8, 2009
|
Posted: Apr 8, 2009 02:43 PM
Msg. 1 of 1
Hello, I noticed that during a fast moving market IQConnect often freezes and takes almost entire CPU core. Yet at the same time my client application, that is doing nothing but poll() and read(), is running completely idle. In fact, at the time when I see CPU IQConnect CPU usage hitting 95%+, my app is sitting on poll() waiting for the socket to become ready to read. Apparently IQConnect overflows its internal socket buffer and blocks the socket almost entirely. In such cases poll() returns readable status only once a minute or so. The first solution that came to my mid was to open an individual socket for each symbol (out of 500) I am watching, or one for all symbols beginning with 'A', one with 'B', etc.. 26 total. Theoretically, the average socket buffer fill-up rate should be reduced by the factor that equals to the number of sockets and effectively "spread" the peak data load among multiple socket buffers, thus allowing my client app to read each of them sequentially or in parallel. My questions are following: 1. How many simultaneous socket connections do you allow per account / IQClient session? 2. Do I need to initialize the connection once or for each socket? Thanks, M.
|