diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-09-23 19:11:33 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-09-23 19:11:33 -0400 |
commit | 6de68a0844baec3deb7d30dbe8df42f06c958d65 (patch) | |
tree | 22029257bdd5d73ba9b992f8041c500b139a4d3f /www/performance | |
parent | 8983b4e0b6b6e8564232a9d56a1b0b0372080478 (diff) | |
download | gpsd-6de68a0844baec3deb7d30dbe8df42f06c958d65.tar.gz |
Wrap up the new material in the profiling paper.
Diffstat (limited to 'www/performance')
-rw-r--r-- | www/performance/graph7.png | bin | 0 -> 6433 bytes | |||
-rw-r--r-- | www/performance/performance.xml | 57 | ||||
-rw-r--r-- | www/performance/profile7.txt | 102 |
3 files changed, 150 insertions, 9 deletions
diff --git a/www/performance/graph7.png b/www/performance/graph7.png Binary files differnew file mode 100644 index 00000000..e90bae13 --- /dev/null +++ b/www/performance/graph7.png diff --git a/www/performance/performance.xml b/www/performance/performance.xml index 312b2c5f..5d43c6fc 100644 --- a/www/performance/performance.xml +++ b/www/performance/performance.xml @@ -540,7 +540,7 @@ plus one parity bit plus one stop bit.)</para> <para>Knowing this, we can subtract (C * 10) / B from (E-S) to approximate the internal proccessing time spent by <application>gpsd</application>. Due to other UART overheads, this formula will slightly underestimate -transmission time and this overestimate procesing time, but even a rough +transmission time and this overestimate processing time, but even a rough comparison of the two is interesting.</para> </sect2> @@ -552,7 +552,7 @@ story. This is from the same Haicom 204s used in the 2005 tests. You can see the exact figures in the <ulink url='profile6.txt'>raw data</ulink>.</para> -<figure><title>Split latency report</title> +<figure><title>Per-cycle latency report, 19200bps</title> <mediaobject> <imageobject> <imagedata fileref='graph6.png'/> @@ -560,8 +560,44 @@ data</ulink>.</para> </mediaobject> </figure> -<!--more--> +<para>Fix latency (S - T, the purple time segment in eaxch sample) is +consistently about 70msec. Some of this represents. on-chip +processing. Some may represent actual skew between NTP time and GPS +time.</para> + +<para>RS232 time (the blue segment) is the character transmission time +estimate we computed. It seems steady at around 100ms. This is +probably a bit low, proportionately speaking.</para> + +<para>The green segment is (E-S) with RS232 computed time subtracted. +It approximates the time required by <application>gpsd</application> +for itelf. It too seems steady at around 100ms. This is probably a bit +high, proportionately speaking.</para> + +<para>The red dots that are just barely visible at the tops of some +sample bars represent R-E, the client reception delta. Inspection of +the raw data reveals that it is on the close order of 1ms.</para> + +<para>Total fix latency is steady at about 260ms.</para> + +<para>It is instructive to compare this with the graph (and the +<ulink url='profile6.txt'>raw data</ulink> from the same device +at 9600bps.</para> + +<figure><title>Per-cycle latency report, 9600bps</title> +<mediaobject> + <imageobject> + <imagedata fileref='graph6.png'/> + </imageobject> +</mediaobject> +</figure> +<para>As we might expect, RS232 time changes drastically and the other +components barely change at all. This gives us reason to be confident that +computed RS232 time is in fact tracking actual transmission time pretty +closely. It also confirms that the most effective way to decrease total +fix latency is simply to bump up the transmission speed. +</para> </sect2> </sect1> @@ -569,10 +605,10 @@ data</ulink>.</para> <sect1><title>Conclusions</title> <para>All these conclusions apply to the consumer-grade GPS hardware -generally available in 2005 and today in 2011, e.g. with a cycle time +generally available back in 2005 and today in 2011, e.g. with a cycle time of one second. As it happens, 2005 was just after the point when consumer-grade GPS chips stabilized as a technology, and though unit -prices havdve fallen they have changed very little in technology and +prices have fallen they have changed very little in technology and performance over the intervening six years.</para> <sect2><title>For Application Programmers</title> @@ -582,17 +618,20 @@ application resources, Nyquist's Theorem tells us to poll <application>gpsd</application> once every half-cycle — that is, on almost all GPSes at time of writing, twice a second.</para> -<para>With the SiRF-II chips used in most consumer-grade GPSes at time of +<para>With the SiRF chips still used in most consumer-grade GPSes at time of writing, 9600bps is the optimal line speed. 4800 is slightly too low, not guaranteeing updates within the 1-second cycle time. 9600bps -yields updates in about 0.5sec.</para> +yields updates in about 0.45sec, 19600bps in about 0.26sec.</para> </sect2> <sect2><title>For Manufacturer Claims</title> <para>At the 1-second cycle time of consumer-grade devices, being able -to operate at 9600bps is useful, but higher speeds would not be worth -the effort.</para> +to operate at 9600bps is useful, but higher speeds would probably not +be worth the extra computation unless your sensor is in rapid motion. Even +whole-cycle latency, most sensitive to transmission speed, is only cut +by less than 200ms by going to 19200. Higher speed will exhibit +diminishing returns.</para> <para>Comparing the SiRF-II performance at 4800bps and 9600 shows a drop in E1+T1 that looks about linear, suggesting that for a cycle of diff --git a/www/performance/profile7.txt b/www/performance/profile7.txt new file mode 100644 index 00000000..b171e8e7 --- /dev/null +++ b/www/performance/profile7.txt @@ -0,0 +1,102 @@ +# Analyzed latency, 2011-09-23T22:32:37, SiRF binary, 9600 8N1, cycle 1s +#- Tag - ----- Fix time ----- - Chars - - Latency - -- RS232 -- --Analysis- --- Recv -- + MID2 1316817057.779999971 358 0.026911020 0.372916667 0.457086086 0.491603136 + MID2 1316817058.779999971 341 0.076910973 0.355208333 0.457087994 0.458806992 + MID2 1316817059.779999971 341 0.076911926 0.355208333 0.457077980 0.458070040 + MID2 1316817060.779999971 341 0.076916933 0.355208333 0.457095146 0.458158970 + MID2 1316817061.779999971 340 0.076920033 0.354166667 0.457149982 0.458240986 + MID2 1316817062.779999971 340 0.076910973 0.354166667 0.457077980 0.457906008 + MID2 1316817063.779999971 338 0.078161955 0.352083333 0.459304094 0.460211992 + MID2 1316817064.779999971 341 0.076913118 0.355208333 0.458320141 0.459108114 + MID2 1316817065.779999971 331 0.086944103 0.344791667 0.457334042 0.458647013 + MID2 1316817066.779999971 339 0.078233957 0.353125000 0.458400965 0.459445953 + MID2 1316817067.779999971 338 0.078238010 0.352083333 0.457489967 0.458286047 + MID2 1316817068.779999971 338 0.078274012 0.352083333 0.467080116 0.468117952 + MID2 1316817069.779999971 338 0.078872919 0.352083333 0.458477974 0.459487915 + MID2 1316817070.779999971 341 0.078323126 0.355208333 0.458871126 0.459948063 + MID2 1316817071.779999971 338 0.078349113 0.352083333 0.458518982 0.459512949 + MID2 1316817072.779999971 338 0.078366041 0.352083333 0.458500147 0.459311008 + MID2 1316817073.779999971 338 0.078385115 0.352083333 0.458519936 0.459455013 + MID2 1316817074.779999971 339 0.076911926 0.353125000 0.458343983 0.459159136 + MID2 1316817075.779999971 355 0.028428078 0.369791667 0.458616018 0.459609032 + MID2 1316817076.779999971 340 0.076905012 0.354166667 0.458586931 0.459468126 + MID2 1316817077.779999971 340 0.076919079 0.354166667 0.458616018 0.459414005 + MID2 1316817078.779999971 340 0.076905012 0.354166667 0.459538937 0.460380077 + MID2 1316817079.779999971 340 0.076915979 0.354166667 0.457075119 0.458045006 + MID2 1316817080.779999971 341 0.076913118 0.355208333 0.460694075 0.461545944 + MID2 1316817081.779999971 337 0.079065084 0.351041667 0.458739042 0.459917068 + MID2 1316817082.779999971 335 0.078594923 0.348958333 0.457185030 0.458231926 + MID2 1316817083.779999971 336 0.078215122 0.350000000 0.459994078 0.460995913 + MID2 1316817084.779999971 330 0.086930990 0.343750000 0.457063913 0.458643913 + MID2 1316817085.779999971 332 0.086910963 0.345833333 0.457082033 0.457906008 + MID2 1316817086.779999971 330 0.086906910 0.343750000 0.457039118 0.457871914 + MID2 1316817087.779999971 337 0.078696012 0.351041667 0.459748983 0.460534096 + MID2 1316817088.779999971 338 0.076906919 0.352083333 0.458848000 0.459640026 + MID2 1316817089.779999971 338 0.076913118 0.352083333 0.457046032 0.457813025 + MID2 1316817090.779999971 330 0.086947918 0.343750000 0.460807085 0.461624146 + MID2 1316817091.779999971 337 0.078788042 0.351041667 0.467072964 0.467911005 + MID2 1316817092.779999971 338 0.076910973 0.352083333 0.458945990 0.459752083 + MID2 1316817093.779999971 337 0.078679085 0.351041667 0.457225084 0.458287001 + MID2 1316817094.779999971 339 0.076931953 0.353125000 0.457101107 0.458578110 + MID2 1316817095.779999971 340 0.076913118 0.354166667 0.457245111 0.458585978 + MID2 1316817096.779999971 338 0.076916933 0.352083333 0.459028959 0.459851980 + MID2 1316817097.779999971 336 0.078921080 0.350000000 0.459051132 0.459841013 + MID2 1316817098.769999981 337 0.088943005 0.351041667 0.469279051 0.470462084 + MID2 1316817099.769999981 336 0.089967012 0.350000000 0.469140053 0.470257044 + MID2 1316817100.769999981 336 0.088985920 0.350000000 0.469118118 0.469962120 + MID2 1316817101.769999981 338 0.086906910 0.352083333 0.469139099 0.469969034 + MID2 1316817102.769999981 336 0.090025902 0.350000000 0.468900919 0.469758034 + MID2 1316817103.769999981 335 0.088805914 0.348958333 0.467109919 0.468117952 + MID2 1316817104.769999981 335 0.088586092 0.348958333 0.467067957 0.467921972 + MID2 1316817105.769999981 330 0.096910000 0.343750000 0.467091084 0.467924118 + MID2 1316817106.769999981 337 0.089118004 0.351041667 0.467036963 0.467854023 + MID2 1316817107.769999981 334 0.089136124 0.347916667 0.467071056 0.468014002 + MID2 1316817108.769999981 337 0.086914062 0.351041667 0.467072964 0.468980074 + MID2 1316817109.769999981 337 0.086914062 0.351041667 0.467072010 0.468027115 + MID2 1316817110.769999981 338 0.086920023 0.352083333 0.467080116 0.468123913 + MID2 1316817111.769999981 336 0.078232050 0.350000000 0.468358040 0.469132900 + MID2 1316817112.769999981 335 0.088244915 0.348958333 0.468421936 0.469456911 + MID2 1316817113.769999981 328 0.096911907 0.341666667 0.468643904 0.469433069 + MID2 1316817114.769999981 336 0.086919069 0.350000000 0.467092037 0.467947006 + MID2 1316817115.769999981 337 0.086996078 0.351041667 0.469334126 0.470109940 + MID2 1316817116.769999981 339 0.086966038 0.353125000 0.467030048 0.467802048 + MID2 1316817117.769999981 334 0.088356018 0.347916667 0.467037916 0.467847109 + MID2 1316817118.769999981 337 0.086914062 0.351041667 0.468513012 0.469352007 + MID2 1316817119.769999981 334 0.088397980 0.347916667 0.468575001 0.469583035 + MID2 1316817120.769999981 333 0.088433027 0.346875000 0.468601942 0.469656944 + MID2 1316817121.769999981 334 0.089452028 0.347916667 0.468615055 0.469587088 + MID2 1316817122.769999981 334 0.088477135 0.347916667 0.468598127 0.469523907 + MID2 1316817123.769999981 337 0.086906910 0.351041667 0.467077017 0.468039036 + MID2 1316817124.769999981 335 0.086914062 0.348958333 0.469388962 0.470211983 + MID2 1316817125.769999981 336 0.086910963 0.350000000 0.468663931 0.469411135 + MID2 1316817126.769999981 336 0.086914062 0.350000000 0.467093945 0.468025923 + MID2 1316817127.769999981 338 0.087007046 0.352083333 0.468528032 0.469381094 + MID2 1316817128.769999981 339 0.066934109 0.353125000 0.447508097 0.449511051 + MID2 1316817129.769999981 338 0.066915035 0.352083333 0.447035074 0.447849989 + MID2 1316817130.769999981 343 0.066911936 0.357291667 0.447403908 0.448971987 + MID2 1316817131.769999981 338 0.066915035 0.352083333 0.447376966 0.448381901 + MID2 1316817132.769999981 338 0.066913128 0.352083333 0.447080135 0.448148966 + MID2 1316817133.769999981 337 0.066911936 0.351041667 0.447076082 0.448086977 + MID2 1316817134.769999981 338 0.066915035 0.352083333 0.447077036 0.448398113 + MID2 1316817135.769999981 337 0.066913128 0.351041667 0.447047949 0.447873116 + MID2 1316817136.769999981 339 0.066914082 0.353125000 0.447726011 0.449131966 + MID2 1316817137.769999981 338 0.066951036 0.352083333 0.447148085 0.448971987 + MID2 1316817138.769999981 337 0.066913128 0.351041667 0.447080135 0.448154926 + MID2 1316817139.769999981 339 0.066910982 0.353125000 0.447073936 0.448051929 + MID2 1316817140.769999981 337 0.066910982 0.351041667 0.447397947 0.448445082 + MID2 1316817141.769999981 337 0.066910982 0.351041667 0.447075129 0.448050976 + MID2 1316817142.769999981 336 0.066911936 0.350000000 0.447077990 0.448118925 + MID2 1316817143.769999981 336 0.066914082 0.350000000 0.447076082 0.448036909 + MID2 1316817144.769999981 337 0.056984901 0.351041667 0.447145939 0.448188066 + MID2 1316817145.769999981 339 0.056988001 0.353125000 0.447071075 0.448014975 + MID2 1316817146.769999981 339 0.066926956 0.353125000 0.447415113 0.448514938 + MID2 1316817147.769999981 337 0.067071915 0.351041667 0.447071075 0.448049068 + MID2 1316817148.769999981 337 0.066913128 0.351041667 0.447073936 0.448096991 + MID2 1316817149.769999981 337 0.066916943 0.351041667 0.447245121 0.448221922 + MID2 1316817150.769999981 337 0.066913128 0.351041667 0.447518110 0.448560953 + MID2 1316817151.769999981 336 0.066913128 0.350000000 0.447073936 0.448063135 + MID2 1316817152.769999981 336 0.066910982 0.350000000 0.447294950 0.448343992 + MID2 1316817153.769999981 336 0.066919088 0.350000000 0.447319031 0.448297977 + MID2 1316817154.769999981 336 0.066911936 0.350000000 0.447071075 0.448086977 + MID2 1316817155.769999981 336 0.066914082 0.350000000 0.447372913 0.448369980 + MID2 1316817156.769999981 336 0.066915035 0.350000000 0.447389126 0.448779106 |