On Fri, 06 Nov 2015 14:18:18 +0100, 
"Martin Patzak (GMX)" martin.pat...@gmx.de wrote: 

>> I cannot confirm Lorens numbers, but end up in the ballpark given by
>> Stefano:
>> 
>> mnm@vincent:~/M/_Linux/python/_mnms_tests$ python pyownet_timing.py
>> //razmaban:4304
>> pyownet: ver. 0.8.2
>> (/usr/local/lib/python2.7/dist-packages/pyownet/__init__.pyc)
>> proxy_obj: ownet server at ('10.67.90.173', 4304)
>> server info: pid 21863, ver. 2.9p8
>> 
>> timeit:
>> statement: proxy_obj.dir("/")
>> number: 20
>> repetitions: 5
>> 
>> ** 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,
>> 
>> The test was run on a remote (local LAN) debian machine connecting to
>> an owserver running on a bananapi running debian jessie with prebuilt
>> owfs debian package version 2.9p8.
>> The tested 1wire net consists out of LinkUSB
>> <http://owfs.org/index.php?page=linkusb> as master, 2 DS2408
>> io-modules and 25 DS28B20 temperature sensors.
>> 
>> Cheers
>> 
>> Martin
>> 
> for the sake of science, the same test locally on the bananapi:
> 
> mnm@razmaban:~/python$ python pyownet_timing.py
> pyownet: ver. 0.8.2
> (/usr/local/lib/python2.7/dist-packages/pyownet/__init__.pyc)
> proxy_obj: ownet server at ('127.0.0.1', 4304)
> server info: pid 21863, ver. 2.9p8
> 
> timeit:
> statement: proxy_obj.dir("/")
> number: 20
> repetitions: 5
> 
> ** 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,
> 
> 
> Loren, there could be something at odds with your setup.
> 
> Martin
 
There could be many things weird about my setup...  But I can't imagine what 
could cause this one. I have two DS18B20 on a BBB GPIO port via the w1 system. 
Ubuntu 14.04 with standard distribution owfs package. But owserver should 
isolate this test from any dependencies on the hardware connection - right? I 
know reading uncached values on the BBB takes about 1.1 seconds, so that can't 
be the problem. I do end up with about 100 port 4304 TIME_WAIT lines in 
netstat. 
 
I just watched the connection from Windows to BBB in Wireshark, and can see the 
difference between non-persistent and persistent. It takes the BBB about 1 mS 
to ACK a request from Windows, and about 40 mS to respond with a reading. All 
other times are way less than 1 mS (at least from Windows' point of view). 
Windows is connected via Wi-Fi to the router the BBB is hardwired to. Looks 
like ping times between them are about 1.1 mS, so that explains the ACK delay 
but not the program response timing. 
 
It takes a similar 49 mS for owhttpd to respond to the first GET for its web 
page. About 2.2 seconds to GET a temperature sensor, I guess that triggers 
uncached readings of my two sensors. 
 
ii  owserver  2.8p15-1ubuntu4  armhf Backend server for 1-Wire control
 
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root     22210  0.0  0.2  37352  1108 ?        Ssl  Nov05   0:28 
/usr/bin/owserver -c /etc/owfs.conf --pid-file /var/run/owfs/owserver.pid
 
 
A minimal search suggests BananaPi is not significantly faster than BBB, so 
what could be going on here? 
 
 
>>>> Somehow your figures are consistent with this interpretation:
>>>> non-persistent overhead is a constant small delta with respect to
>>>> persistent connection. Since your owserver is apparently much slower
>>>> than the one which I run my tests, you have a smaller relative
>>>> overhead.
 
Looks like the open/close of the network connection is sub-millisecond even on 
my BBB. It is only when I ask for a value that I hit the 40 to 50 mS delay. 

| Loren Amelang | lo...@pacific.net |




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

Reply via email to