Loren will be excited to read this. Who is the funny bunny now?

On 11/09/2015 03:46 PM, Stefano Miccoli wrote:
Curiously I ran in a similar situation as the BBB:

$ python -m test.timing //10.48.74.119/
pyownet: ver. 0.8.2
proxy_obj: ownet server at ('10.48.74.119', 4304)
server info: pid 2443, ver. unknown

timeit:
 statement: proxy_obj.dir("/")
 number: 20
 repetitions: 5

** non persistent : 39.96 ms, 39.99 ms, 40.00 ms, 40.01 ms, 40.21 ms,
** persistent     : 39.98 ms, 40.00 ms, 40.00 ms, 40.00 ms, 40.00 ms,


The reason for this slow “dir” seems linked in my case to a ‘bug' in owserver (debian version 2.8p15-1).
In fact the original configuration (owfs.conf) is

server: link = /dev/ttyS0
server: server = owserver.example.com <http://owserver.example.com>:4304

When I substitute the fqdn with the IP number I get

$ python -m test.timing //10.48.74.119/
pyownet: ver. 0.8.2
proxy_obj: ownet server at ('10.48.74.119', 4304)
server info: pid 28029, ver. unknown

timeit:
 statement: proxy_obj.dir("/")
 number: 20
 repetitions: 5

** non persistent :  2.14 ms,  2.15 ms,  2.15 ms,  2.16 ms,  2.23 ms,
** persistent     :  1.90 ms,  1.92 ms,  1.94 ms,  1.95 ms,  1.96 ms,

I would think that owserver v2.8p15 is not caching the result of the DNS query (getaddrinfo()), which is quite slow.

(BTW one of the reasons for which my pyownet can be quite fast if compared with ownet is that getaddrinfo() is called only at proxy object creation and then cached in the proxy object. In ownet , on the contrary, if you specify a domain name instead of an IP number, the DNS is queried at each owserver query.)

S.M.


On 07 Nov 2015, at 22:27, Loren Amelang <lo...@pacific.net <mailto:lo...@pacific.net>> wrote:

On Sat, 07 Nov 2015 09:21:43 +0100
"Martin Patzak (GMX)" martin.pat...@gmx.de <mailto:martin.pat...@gmx.de> wrote:

why don't you try and run Stefanos timing program directly on your
Beagle and see what timing you get there

Posted that earlier:

ubuntu@arm:~/Lpkg$ python3 StefanoTimingTest.py3
** non persistent : 37.55 ms, 37.78 ms, 39.26 ms, 40.15 ms, 41.11 ms,
** persistent     : 36.22 ms, 36.41 ms, 36.62 ms, 37.10 ms, 38.26 ms,

C:\Users\Loren\Documents\Projects\Computing\BeagleBone Black\BBB Projects\1-Wire\OWFS Python logging>python ** non persistent : 41.69 ms, 45.79 ms, 45.99 ms, 48.34 ms, 49.41 ms,
** persistent     : 42.26 ms, 44.03 ms, 45.68 ms, 45.69 ms, 46.03 ms,

I suspect the 1.1 mS ping overhead of the Windows Wi-Fi link more than wiped out the faster Python execution by the more competent external machine.

Well, maybe not...  Here's Windows wired to the network:

C:\Users\Loren\Documents\Projects\Computing\BeagleBone Black\BBB Projects\1-Wire\OWFS Python logging>python ** non persistent : 42.48 ms, 43.65 ms, 44.34 ms, 44.82 ms, 47.53 ms,
** persistent     : 38.35 ms, 39.17 ms, 40.23 ms, 41.67 ms, 42.80 ms,

A bit better than Wi-Fi, but still slower than running everything on the BBB! I'd have expected results more like yours, with the external machine faster than testing from the little board:

mnm @ razmaban:~/python$ python pyownet_timing.py
** non persistent :  3.18 ms,  3.24 ms,  3.24 ms,  3.25 ms,  3.47 ms,
** persistent     :  2.37 ms,  2.39 ms,  2.40 ms,  2.42 ms,  2.58 ms,

mnm @ vincent:~/M/_Linux/python/_mnms_tests$ python pyownet_timing.py //razmaban:4304
** non persistent :  2.40 ms,  2.40 ms,  2.43 ms,  2.44 ms,  2.49 ms,
** persistent     :  1.82 ms,  1.82 ms,  1.86 ms,  2.05 ms,  2.12 ms,


One curiosity seems to persist in all configurations - each later test in the same sequence takes a bit longer! Guess I can't understand everything...

Loren

| Loren Amelang | lo...@pacific.net <mailto:lo...@pacific.net> |




------------------------------------------------------------------------------
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net <mailto:Owfs-developers@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/owfs-developers



------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140


_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a 
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to