{"id":484,"date":"2012-05-02T21:49:15","date_gmt":"2012-05-03T01:49:15","guid":{"rendered":"http:\/\/www.rfdm.com\/blog\/?p=484"},"modified":"2013-04-20T10:59:42","modified_gmt":"2013-04-20T14:59:42","slug":"measuring-tcp-round-trip-times-part-2-the-throwaway","status":"publish","type":"post","link":"https:\/\/www.rfdm.com\/blog\/?p=484","title":{"rendered":"Measuring TCP round-trip times, part 2: the throwaway"},"content":{"rendered":"<p>I <a href=\"https:\/\/www.rfdm.com\/blog\/?p=477\">previously posted<\/a> about measuring TCP round-trip times from my web server to its clients.  Last night I quickly added code to my existing site traffic monitor to perform this task, as the experimental throwaway to validate my design idea.  I have not yet designed the data store, only the collection of round-trip times.  To see what it&#8217;s doing, I syslog the rtt measurements.  It appears to be working fine.  Here&#8217;s some data from Google&#8217;s crawlers prowling my site:<\/p>\n<p><code style=\"font-size: 10pt;\"><br \/>\nMay  2 21:37:23 www sitetrafficd[2318]: [I] 66.249.66.43:45825 rtt 123.2 ms<br \/>\nMay  2 21:38:49 www sitetrafficd[2318]: [I] 66.249.66.57:38926 rtt 123.6 ms<br \/>\nMay  2 21:38:49 www sitetrafficd[2318]: [I] 66.249.66.43:38085 rtt 123.5 ms<br \/>\nMay  2 21:40:16 www sitetrafficd[2318]: [I] 66.249.66.143:39725 rtt 137.8 ms<br \/>\nMay  2 21:40:16 www sitetrafficd[2318]: [I] 66.249.66.143:37657 rtt 126.2 ms<br \/>\nMay  2 21:41:25 www sitetrafficd[2318]: [I] 66.249.66.204:47961 rtt 160.9 ms<br \/>\nMay  2 21:41:25 www sitetrafficd[2318]: [I] 66.249.66.143:45623 rtt 121.1 ms<br \/>\nMay  2 21:41:47 www sitetrafficd[2318]: [I] 66.249.66.60:36603 rtt 142 ms<br \/>\nMay  2 21:42:15 www sitetrafficd[2318]: [I] 66.249.66.204:48875 rtt 123.6 ms<br \/>\nMay  2 21:43:15 www sitetrafficd[2318]: [I] 66.249.66.43:56275 rtt 125.8 ms<br \/>\nMay  2 21:44:42 www sitetrafficd[2318]: [I] 66.249.66.57:49966 rtt 124.1 ms<br \/>\nMay  2 21:44:42 www sitetrafficd[2318]: [I] 66.249.66.204:53209 rtt 122.9 ms<br \/>\nMay  2 21:45:59 www sitetrafficd[2318]: [I] 66.249.66.238:46595 rtt 123.8 ms<br \/>\nMay  2 21:47:27 www sitetrafficd[2318]: [I] 66.249.66.60:60241 rtt 142.2 ms<br \/>\n<\/code><\/p>\n<p>I believe I can call the raw measurement design valid.  It&#8217;s a bonus that it was not difficult to add to my existing data collection application.  It&#8217;s another bonus that the data collection remains fairly lightweight in user space.  My collection process has a resident set size just over 4M, and that&#8217;s on a 64-bit machine.  My round-trip time measurement resolution is microseconds, and I&#8217;m using the timestamps from pcap to reduce scheduler-induced variance.  Since I&#8217;m not using any special kernel facilities directly, this code should port fairly easily to OS X and Linux.<\/p>\n<p><b>May 3, 2012<\/b><br \/>\nI added the ability to track SYN to SYN ACK round-trip time, so I can run data collection on my desktop or gateway and characterize connections where I&#8217;m acting as the TCP client.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I previously posted about measuring TCP round-trip times from my web server to its clients. Last night I quickly added code to my existing site traffic monitor to perform this task, as the experimental throwaway to validate my design idea. I have not yet designed the data store, only the collection of round-trip times. To &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.rfdm.com\/blog\/?p=484\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Measuring TCP round-trip times, part 2: the throwaway&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,12,13],"tags":[],"class_list":["post-484","post","type-post","status-publish","format-standard","hentry","category-freebsd","category-software-development","category-web-development"],"_links":{"self":[{"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/484","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=484"}],"version-history":[{"count":15,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/484\/revisions"}],"predecessor-version":[{"id":627,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/484\/revisions\/627"}],"wp:attachment":[{"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}