<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
span.hoenzb
{mso-style-name:hoenzb;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Staffan:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I’m not sure what Market are you hitting, but in my case I have (ICE) they do have a security definition to be pulled up first, that is around 320 lines as
a library.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I don’t just have data push just bunch of AE messages like that, every AE message has to be parsed immediately to get my data from or referenced to the Security
Definition (the 320 lines), I think that is burdening the process a bit, however I don’t do anything with the data yet, I just save them in an object, but I don’t think I have a choice here, the 320 lines have to be in the memory and parsed every time I get
an AE message.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">After all the AE messages are done, then I will create independent thread from the main one, it pushes the data to the database, and the main one keeps getting
the heartbeats, after that I will be realtime and I won’t get many messages at a time, so it is not an issue, unless we hire 1000 traders and they click every second.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">And as I mentioned in my previous email, I got to process 700 messages then I crash with time accuracy issue.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">-John<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Quickfixn [mailto:quickfixn-bounces@lists.quickfixn.com]
<b>On Behalf Of </b>Staffan Ulfberg<br>
<b>Sent:</b> Wednesday, November 05, 2014 9:57 AM<br>
<b>To:</b> Mailing list for QuickFIX/n<br>
<b>Subject:</b> Re: {{Quickfixn}} SendingTime accuracy issue<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi,<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I just started testing Quickfixn, and after fixing some initial issues I can definitely say that 1000 messages is no problem. Our test code pushes 5000 messages per second over a session and can run indefinitely
(this is on my development machine that was fast in 2007. :) ).<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">To find the cause of your issue, I would try to find the first error and understand what causes it. Maybe the closed connection is the remote detecting a timing accuracy problem as well?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">In my experience timing accuracy problems happen either when the computer clock is off (the intended cause), or that more processing than you think takes place in the reader thread.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
Look at the logged fix messages (if they are not logged add some logging...), and compare the timestamp of the log message with the timestamps inside the FIX messages to check if they drift apart when many messages arrive.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Also, it could be useful to add logging for how long processing of a single message takes. (I.e., get the time first thing in the ToApp method and then compute the spend time and log it before returning.)<o:p></o:p></p>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
Staffan<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Wed, Nov 5, 2014 at 8:53 AM, Shamon, John <<a href="mailto:jshamon@semprausgp.com" target="_blank">jshamon@semprausgp.com</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Hello All,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">I’m using QuickFix with ICE</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">I have been experiencing the issue with timing, latency, network traffic whatever you call it as in the below 2
errors.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">I understand that the callbacks are time sensitive,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">My application was crashing after receiving 20-40 trades (AE messages).</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Also I realized there are 4 factors</span><o:p></o:p></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">1-</span><span style="font-size:7.0pt">
</span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Overhead through the code</span><o:p></o:p></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">2-</span><span style="font-size:7.0pt">
</span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Virus scanner spamware filters</span><o:p></o:p></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">3-</span><span style="font-size:7.0pt">
</span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">sTunnel</span><o:p></o:p></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">4-</span><span style="font-size:7.0pt">
</span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Resources – CPU and RAM</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Now here is what I changed</span><o:p></o:p></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">1-</span><span style="font-size:7.0pt">
</span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Used 8 CPU – 16 GB RAM</span><o:p></o:p></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">2-</span><span style="font-size:7.0pt">
</span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Remove the overhead (sending data to DB), to multithread process, so the main thread with OnMessage(s) keep going without slowing down.</span><o:p></o:p></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">3-</span><span style="font-size:7.0pt">
</span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Stopped virus scanner temporary</span><o:p></o:p></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">4-</span><span style="font-size:7.0pt">
</span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">sTunnel … can’t do anything about it
</span><o:p></o:p></p>
<p><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">5-</span><span style="font-size:7.0pt">
</span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">set the Max latency to 4000 form 380</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">After consider improving all of the above, I was able to resolve the 2 below errors that they always happen, so
now running on 100 trades (AE message) is pretty smooth.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Now I decided to benchmark this, so I have created 1000 trades in ICE test market</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">I was able to load no more than 700 trades (AE messages), then the Sending Time Accuracy happened again!!</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">After that I stopped from doing any other process (like sending data over to DB), #1 above (completely eliminated
for the sake of testing), so I did have nothing except the callbacks AQ AE messages and heartbeats.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">I failed again around 700 trades (AE) messages</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p>1-<span style="font-size:7.0pt"> </span><u>I’m getting the error below:</u><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p>2-<span style="font-size:7.0pt"> </span><u>Another error that I get:</u><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">SendingTime accuracy
<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Can I say I reached the limit when I try to download bunch of AE messages on a snapshot- initial start as in this
test?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Can someone share with me how much data they can download at a time?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Any other suggestions?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#888888"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#888888">-John<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><span style="color:#888888"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><span style="color:#888888"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><span style="color:#888888"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><span style="color:#888888"><o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
Quickfixn mailing list<br>
<a href="mailto:Quickfixn@lists.quickfixn.com">Quickfixn@lists.quickfixn.com</a><br>
<a href="http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com" target="_blank">http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>