after some days of regulating temperature via owperl (about 1 switch per 10 
seconds, so the process has not grown very much) pmap says:

--snip--
r...@piano:~# pmap 12030
12030:   perl -I /opt/owfs/lib/perl/5.10.0/ owperlctl.pl
0000000000400000      4K r-x--  /usr/bin/perl
0000000000601000      4K r----  /usr/bin/perl
0000000000602000      4K rw---  /usr/bin/perl
0000000001d41000  21648K rw---    [ anon ]
00007fe8b8de9000     88K r-x--  /lib/libgcc_s.so.1
00007fe8b8dff000   2048K -----  /lib/libgcc_s.so.1
00007fe8b8fff000      4K r----  /lib/libgcc_s.so.1
00007fe8b9000000      4K rw---  /lib/libgcc_s.so.1
00007fe8b9001000     28K r-x--  /lib/libusb-0.1.so.4.4.4
00007fe8b9008000   2044K -----  /lib/libusb-0.1.so.4.4.4
00007fe8b9207000      4K r----  /lib/libusb-0.1.so.4.4.4
00007fe8b9208000      8K rw---  /lib/libusb-0.1.so.4.4.4
00007fe8b920a000    508K r-x--  /opt/owfs/lib/libow-2.7.so.17.0.0
00007fe8b9289000   2048K -----  /opt/owfs/lib/libow-2.7.so.17.0.0
00007fe8b9489000      8K r----  /opt/owfs/lib/libow-2.7.so.17.0.0
00007fe8b948b000     96K rw---  /opt/owfs/lib/libow-2.7.so.17.0.0
00007fe8b94a3000      4K rw---    [ anon ]
00007fe8b94a4000     24K r-x--  /opt/owfs/lib/perl/5.10.0/auto/OW/OW.so
00007fe8b94aa000   2048K -----  /opt/owfs/lib/perl/5.10.0/auto/OW/OW.so
00007fe8b96aa000      4K r----  /opt/owfs/lib/perl/5.10.0/auto/OW/OW.so
00007fe8b96ab000      4K rw---  /opt/owfs/lib/perl/5.10.0/auto/OW/OW.so
00007fe8b96ac000     36K r-x--  /lib/libcrypt-2.8.90.so
00007fe8b96b5000   2044K -----  /lib/libcrypt-2.8.90.so
00007fe8b98b4000      4K r----  /lib/libcrypt-2.8.90.so
00007fe8b98b5000      4K rw---  /lib/libcrypt-2.8.90.so
00007fe8b98b6000    184K rw---    [ anon ]
00007fe8b98e4000   1444K r-x--  /lib/libc-2.8.90.so
00007fe8b9a4d000   2044K -----  /lib/libc-2.8.90.so
00007fe8b9c4c000     16K r----  /lib/libc-2.8.90.so
00007fe8b9c50000      4K rw---  /lib/libc-2.8.90.so
00007fe8b9c51000     20K rw---    [ anon ]
00007fe8b9c56000     92K r-x--  /lib/libpthread-2.8.90.so
00007fe8b9c6d000   2044K -----  /lib/libpthread-2.8.90.so
00007fe8b9e6c000      4K r----  /lib/libpthread-2.8.90.so
00007fe8b9e6d000      4K rw---  /lib/libpthread-2.8.90.so
00007fe8b9e6e000     16K rw---    [ anon ]
00007fe8b9e72000    528K r-x--  /lib/libm-2.8.90.so
00007fe8b9ef6000   2044K -----  /lib/libm-2.8.90.so
00007fe8ba0f5000      4K r----  /lib/libm-2.8.90.so
00007fe8ba0f6000      4K rw---  /lib/libm-2.8.90.so
00007fe8ba0f7000      8K r-x--  /lib/libdl-2.8.90.so
00007fe8ba0f9000   2048K -----  /lib/libdl-2.8.90.so
00007fe8ba2f9000      4K r----  /lib/libdl-2.8.90.so
00007fe8ba2fa000      4K rw---  /lib/libdl-2.8.90.so
00007fe8ba2fb000   1432K r-x--  /usr/lib/libperl.so.5.10.0
00007fe8ba461000   2048K -----  /usr/lib/libperl.so.5.10.0
00007fe8ba661000     16K r----  /usr/lib/libperl.so.5.10.0
00007fe8ba665000     20K rw---  /usr/lib/libperl.so.5.10.0
00007fe8ba66a000    124K r-x--  /lib/ld-2.8.90.so
00007fe8ba747000    252K r----  /usr/lib/locale/de_DE.utf8/LC_CTYPE
00007fe8ba786000    900K r----  /usr/lib/locale/de_DE.utf8/LC_COLLATE
00007fe8ba867000     16K rw---    [ anon ]
00007fe8ba874000      4K r----  /usr/lib/locale/de_DE.utf8/LC_NUMERIC
00007fe8ba875000      4K r----  /usr/lib/locale/de_DE.utf8/LC_TIME
00007fe8ba876000      4K r----  /usr/lib/locale/de_DE.utf8/LC_MONETARY
00007fe8ba877000      4K r----  
/usr/lib/locale/de_DE.utf8/LC_MESSAGES/SYS_LC_MESSAGES
00007fe8ba878000      4K r----  /usr/lib/locale/de_DE.utf8/LC_PAPER
00007fe8ba879000      4K r----  /usr/lib/locale/de_DE.utf8/LC_NAME
00007fe8ba87a000      4K r----  /usr/lib/locale/de_DE.utf8/LC_ADDRESS
00007fe8ba87b000      4K r----  /usr/lib/locale/de_DE.utf8/LC_TELEPHONE
00007fe8ba87c000      4K r----  /usr/lib/locale/de_DE.utf8/LC_MEASUREMENT
00007fe8ba87d000     28K r--s-  /usr/lib/gconv/gconv-modules.cache
00007fe8ba884000      4K r----  /usr/lib/locale/de_DE.utf8/LC_IDENTIFICATION
00007fe8ba885000     12K rw---    [ anon ]
00007fe8ba888000      4K r----  /lib/ld-2.8.90.so
00007fe8ba889000      4K rw---  /lib/ld-2.8.90.so
00007fffc2874000     84K rw---    [ stack ]
00007fffc29fe000      4K r-x--    [ anon ]
ffffffffff600000      4K r-x--    [ anon ]
 total            48224K
--snap--

top shows as:
--snip--
top - 16:53:28 up 4 days, 19:11,  5 users,  load average: 0.30, 0.29, 0.12
Tasks: 194 total,   2 running, 191 sleeping,   1 stopped,   0 zombie
Cpu(s):  2.0%us,  2.0%sy,  0.0%ni, 96.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   2057224k total,  2031404k used,    25820k free,    48368k buffers
Swap:        0k total,        0k used,        0k free,   577432k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
                                                                             
15379 david     20   0  453m 195m  14m R  1.0  9.7   5:34.89 gnome-terminal     
                                                                             
 6759 david     20   0  315m 122m  10m S  0.5  6.1  40:43.98 
/usr/lib/gnome-applets/multiload-applet-2 
--oaf-activate-iid=OAFIID:GNOME_MultiLoadApplet_Factor
 6762 david     20   0  315m 119m 9524 S  0.0  5.9   4:48.51 
/usr/lib/gnome-netstatus/gnome-netstatus-applet 
--oaf-activate-iid=OAFIID:GNOME_NetstatusApplet_
18307 root      20   0  197m 114m  12m S  0.0  5.7   4:40.98 /usr/X11R6/bin/X 
:20 -br -audit 0 -auth /var/lib/gdm/:20.Xauth -nolisten tcp vt9                
 6322 root      20   0  206m 108m  28m S  2.0  5.4  47:49.43 /usr/X11R6/bin/X 
:0 -br -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7                  
13770 rebecca   20   0  500m  90m  25m S  0.0  4.5   0:39.20 
/usr/lib/firefox-3.0.7/firefox                                                  
                
28832 david     20   0  569m  77m  27m S  0.0  3.9   0:16.70 
/usr/lib/thunderbird/thunderbird-bin                                            
                
28811 david     20   0  459m  64m  25m S  0.0  3.2   0:04.90 
/usr/lib/firefox-3.0.7/firefox                                                  
                
18690 rebecca   20   0  361m  49m  14m S  0.0  2.5   0:01.60 nautilus 
--no-desktop --browser                                                          
       
 6728 david     20   0  342m  42m  17m S  0.0  2.1   1:40.49 gnome-panel        
                                                                             
18602 rebecca   20   0  295m  41m 9224 S  0.0  2.1   0:05.54 
/usr/lib/gnome-settings-daemon/gnome-settings-daemon                            
                
 6730 david     20   0  423m  37m  17m S  0.0  1.9   0:13.05 nautilus 
--no-desktop --browser                                                          
       
18684 rebecca   20   0  290m  33m  13m S  0.0  1.7   3:08.91 
/usr/bin/compiz.real --ignore-desktop-hints --replace --loose-binding core ccp  
                
25720 david     20   0  300m  28m  12m S  0.0  1.4  13:20.71 transmission       
                                                                             
18688 rebecca   20   0  289m  25m  15m S  0.0  1.3   0:11.12 gnome-panel        
                                                                             
12030 root      20   0 48220  23m 2356 S  0.0  1.2   7:21.20 perl -I 
/opt/owfs/lib/perl/5.10.0/ owperlctl.pl                                         
        
--snap--

by the way: owperl had no problem at all, while owserver and owfs lost the 
sensors and made controlling and reading impossible every some minutes.
all programs are working without problems with the passive adapter (but 
slow...).

the increasing memory-consumption seems to be the same with all programs.
its about 4k per 10 switcvhes or something like that.

i will now start a high-frequency-switchingloop while monitoring with pmap.
do you hve any preferences about the program (owperl, owserver, owfs...) i 
should use for the test?

thanx!
david

> -----Ursprüngliche Nachricht-----
> Von: "Paul Alfille" <paul.alfi...@gmail.com>
> Gesendet: 25.03.09 03:06:25
> An: owfs-developers@lists.sourceforge.net
> Betreff: Re: [Owfs-developers] owfs memory consumption and timing questions

Can you try pmap on your process? (Early and late). It may help us 
> figure where the memory is being used.
> 
> Paul Alfille
> 
> On Fri, Mar 20, 2009 at 9:42 AM, david schumacher <davids...@web.de> 
> wrote:
> hi,
> 
> thanx for your answer!
> 
> directly after starting owfs the usage is about 1Mb. it is running for
> 10 hours now (only writing to DS2413, no reading), and its above 600Mb
> rss, increasing slowly.
> 
> i tested to use some more ram (400Mb) using a small program, it seems
> owfs really uses that amount:
> 
> top says directly before freezing for some minutes (a.out tries to use
> 400Mb, more ram than available):
> --snip--
> r...@piano:/opt/1wire# top -d2c
> top - 13:31:05 up 2 days, 17:07, 5 users, load average: 0.10, 0.09, 0.
> 10
> Tasks: 206 total, 1 running, 205 sleeping, 0 stopped, 0 zombie
> Cpu(s): 3.2%us, 18.5%sy, 0.0%ni, 0.0%id, 77.9%wa, 0.0%hi, 0.4%si,
> 0.0%st
> Mem: 2057224k total, 2042512k used, 14712k free, 220k buffers
> Swap: 0k total, 0k used, 0k free, 21116k cached
> 
>  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+
> COMMAND
> 
> 14286 root 20 0 644m 533m 664 S 7.5 26.5 33:15.99
> 
> ./owfs/bin/owfs -uall
> 1wire
>  639 root 20 0 403m 369m 320 D 19.9 18.4 0:00.80 ./a.out
> 400
> 
> 28096 david 20 0 400m 109m 2984 S 0.0 5.5 3:00.25
> gnome-terminal
> 
> 11601 david 20 0 535m 94m 3936 S 0.0 4.7 1:43.13
> /usr/lib/firefox-3.0.7/firefox
> (..)
> --snap--
> 
> ...after some minutes a.out was killed by the kernel and the machine 
> was
> responsive again.
> 
> another thing:
> since i added two more sensors, most of the time the devices are 
> missing
> from the mounted directory, sometimes they come back for some seconds 
> or
> minutes.
> 
> the scripts writing and reading the files are still able to control 
> and
> read the 1wire-devices, if the scripts are started while the 
> directories
> are existing.
> 
> i noticed this behaviour already with 5 devices connected, but it went
> away when i connected the sensors to external power instead of 
> parasytic
> mode.
> 
> the whole cable from the DS9490R to the last sensor is about 30cm long
> (unshielded).
> 
> listings of the vanishing and re-appearing device-directories:
> 
> --snip--
> r...@piano:/opt/1wire# ls -laht
> total 4,0K
> drwxr-xr-x 1 root root 8 2009-03-19 23:31 .
> drwxr-xr-x 1 root root 8 2009-03-19 23:31 bus.0
> drwxr-xr-x 1 root root 8 2009-03-19 23:31 settings
> drwxr-xr-x 1 root root 8 2009-03-19 23:31 statistics
> drwxr-xr-x 1 root root 30 2009-03-19 23:31 structure
> drwxr-xr-x 1 root root 8 2009-03-19 23:31 system
> drwxr-xr-x 1 root root 8 2009-03-19 23:31 uncached
> drwxr-xr-x 5 root root 4,0K 2009-03-18 19:56 ..
> --snap--
> 
> ...some seconds / minutes later ...:
> 
> --snip--
> r...@piano:/opt/1wire# ls -laht
> total 4,0K
> drwxrwxrwx 1 root root 8 2009-03-20 13:20 01.A89AB9120000
> drwxrwxrwx 1 root root 8 2009-03-20 13:20 01.EE75B9120000
> drwxrwxrwx 1 root root 8 2009-03-20 13:20 10.1B099C010800
> drwxrwxrwx 1 root root 8 2009-03-20 13:20 10.353E9C010800
> drwxrwxrwx 1 root root 8 2009-03-20 13:20 10.748570010800
> drwxrwxrwx 1 root root 8 2009-03-20 13:20 10.9C199C010800
> drwxrwxrwx 1 root root 8 2009-03-20 13:20 3A.1EDA01000000
> drwxrwxrwx 1 root root 8 2009-03-20 13:20 81.6C492C000000
> drwxrwxrwx 1 root root 8 2009-03-20 13:20 simultaneous
> drwxr-xr-x 1 root root 8 2009-03-19 23:31 .
> drwxr-xr-x 1 root root 8 2009-03-19 23:31 alarm
> drwxr-xr-x 1 root root 8 2009-03-19 23:31 bus.0
> drwxr-xr-x 1 root root 8 2009-03-19 23:31 settings
> drwxr-xr-x 1 root root 8 2009-03-19 23:31 statistics
> drwxr-xr-x 1 root root 30 2009-03-19 23:31 structure
> drwxr-xr-x 1 root root 8 2009-03-19 23:31 system
> drwxr-xr-x 1 root root 8 2009-03-19 23:31 uncached
> drwxr-xr-x 5 root root 4,0K 2009-03-18 19:56 ..
> --snap--
> 
> i read something about periodic re-scanning for bus-masters like 
> DS9490,
> maybe this affects the presence of the directories?
> 
> maybe i should use owperl to avoid the fuse-stuff..
> i planned to use perl for managing the files on the owfs-mount, so its
> no big difference in programming to use owperl...
> 
> david
> 
> Paul Alfille schrieb:
> 
> > Hi David,
> >
> > 1. Memory: That memory consuption sounds excessive (there is very
> > little memory used by owfgs -- less than 1 MB. It's sometimes hard 
> to
> > tell what actual memory consumption is under linux -- the system
> > doesn't scavenge allocated memory until it's needed. We've tested 
> owfs
> > under valgrind for memory leaks, but it's always possible.
> >
> > 2. owperl vs shell script. This is more a matter of convenience. 
> Shell
> > scripts have a modest start/stop penalty while the owperl can run an
> > internal loop. owperl doesn't need the file system (FUSE). You can
> > configure a bunch of ways:
> > A. owfs/FUSE and shell cat/echo/...
> > B. owfs/FUSE and perl file read/write
> > C. owserver and owshell (owget/owwrite/owdir)
> > D. owserver and OWNet.pm (perl)
> > E. owserver and 'owperl -s 4304'
> > F. owperl: OWIinit('-u')
> > Personally, if I wanted the extra flexibility of a perl program (to
> > remember values, do calculations, etc) I'd probable do "D" above. 
> If I
> > liked shell scripting, I'd choose "A" or "C"
> >
> > 3. Temperature reading pause. It turns out that during a temperature
> > reading, even with external power, the DS18X20 cannot tolerate other
> > bus activity. If your temperature values don't change quickly, you 
> can
> > increase the "volatile" cache time to incur the reading penalty less
> > frequently (giving stale data, perhaps).
> > Anoth approach is to add a separate bus master, and a put the
> > temperature sensors on a separate bus. owfs will happily aggregate 
> the
> > two, and not stall the switches for temperature readings.
> >
> > Paul Alfille
> >
> > On Fri, Mar 20, 2009 at 6:47 AM, david schumacher <davids...@web.de
> 
> > <mailto:davids...@web.de>> wrote:
> >
> > hello together!
> >
> > this is my first post to this list.
> >
> > i stumbled upon owfs (great stuff, thanks!) while searching a
> > simple way
> > to measure and control temperatures.
> >
> > i am using DS9490R (bus master) with two DS18S20 (thermo), two 
> DS2401
> > (serial) and one DS2413 (two channel switch) for testing.
> >
> > after running this shellscript 24 hours (heavily switching the
> > DS2413):
> >
> > --snip--
> > r...@piano:/opt/1wire/uncached/3A.1EDA01000000# while true; do
> > echo 1,1
> > > PIO.ALL; echo 0,1 > PIO.ALL; echo 1,0 > PIO.ALL; echo 0,0 >
> > PIO.ALL;
> > echo -n x ; done
> > --snap--
> >
> > and this in parallel (reading cached temperatures from DS18S20):
> >
> > --snip--
> > r...@piano:/opt/1wire# while true; do echo $(date +%s; echo -n "
> > "; cat
> > 10.353E9C010800/temperature) >> /var/tmp/10.353E9C010800.temperature;
> 
> > echo $(date +%s; echo -n " "; cat 10.748570010800/temperature) >>
> > /var/tmp/10.748570010800.temperature; sleep 8; done
> > --snap--
> >
> > the memory consumption of owfs was about 955Mb virt / 816Mb res, and
> > still growing.
> >
> > owfs was mounted using: r...@piano:/opt# ./owfs/bin/owfs -uall 1wire
> > owfs and libow version is 2.7p17 .
> > configure-flags: --enable-owperl --enable-debian
> > kernel: 2.6.27-11-generic #1 SMP Thu Jan 29 19:28:32 UTC 2009 x86_64
> > (ubuntu 8.10 amd64)
> >
> > did i make a mistake, or is there a problem in owfs?
> >
> > by the way: do you recommend me to use owperl instead of owfs when
> > stability is the main concern?
> >
> > another ting:
> > is there a possibility (in the 1wire-protocol in general and with
> > owfs)
> > to avoid the "blocking" of the whole bus for all other
> > communication for
> > one second while sampling temperatures using DS18S20?
> >
> > im thinking of "please start sampling, i will ask for the result
> > later".
> >
> > this would be very nice when for example switching a heater via
> > onewire
> > while using the same bus with many slow sensors.
> >
> > thanks a lot for your patience ;)
> >
> > greetings from germany,
> > david
> >
> > --------------------------------------------------------------------
> ----------
> > Apps built with the Adobe(R) Flex(R) framework and Flex
> > Builder(TM) are
> > powering Web 2.0 with engaging, cross-platform capabilities.
> > Quickly and
> > easily build your RIAs with Flex Builder, the Eclipse(TM)based
> > development
> > software that enables intelligent coding and step-through debugging.
> > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> > _______________________________________________
> > Owfs-developers mailing list
> > Owfs-developers@lists.sourceforge.net
> > <mailto:Owfs-developers@lists.sourceforge.net>
> 
> > https://lists.sourceforge.net/lists/listinfo/owfs-developers
> >
> >
> > --------------------------------------------------------------------
> ----
> 
> >
> > --------------------------------------------------------------------
> ----------
> > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) 
> are
> > powering Web 2.0 with engaging, cross-platform capabilities. 
> Quickly and
> > easily build your RIAs with Flex Builder, the Eclipse(TM)based 
> development
> > software that enables intelligent coding and step-through debugging.
> > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> > --------------------------------------------------------------------
> ----
> >
> > _______________________________________________
> > Owfs-developers mailing list
> > Owfs-developers@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/owfs-developers
> >
> 
> ----------------------------------------------------------------------
> --------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) 
> are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly 
> and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based 
> development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
> 
> ----------------------------------------------------------------------
> -------- Apps built with the Adobe(R) Flex(R) framework and Flex 
> Builder(TM) are powering Web 2.0 with engaging, cross-platform 
> capabilities. Quickly and easily build your RIAs with Flex Builder, 
> the Eclipse(TM)based development software that enables intelligent 
> coding and step-through debugging. Download the free 60 day trial. 
> http://p.sf.net/sfu/www-adobe-com_____________________________________
> __________ Owfs-developers mailing list owfs-develop...@lists.
> sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-
> 
> developers



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

Reply via email to