[rrd-developers] Re: RRDs.xs malloc to multi-dimensional array
Alexandre CHERIF
alexandre at neutrinos.org
Wed Aug 14 12:09:14 MEST 2002
On Tue, 13 Aug 2002 22:51:16 +0200 (MEST)
Tobias Oetiker <oetiker at ee.ethz.ch> wrote:
>
> Alexandre, ds_cnt is normally 2 or 3 or 20 in any event this will
> no have a major impact I guess
> tobi
> >
i was too fast in finding the wrong part of code...sorry for the miss leading. my first mail was right
the perl shared module got memory allocation problem as far as i see.
here is the clue
truss -c rrdtool fetch /file.rrd "AVERAGE" "-s -1y" > /dev/null
syscall seconds calls errors
_exit .00 1
read .03 208
write .00 328
open .00 8 1
close .00 7
time .00 3
brk .00 8
lseek .00 2
sysi86 .00 1
ioctl .00 2 2
execve .00 1
mmap .00 11
munmap .00 2
fxstat .00 4
memcntl .00 2
sysconfig .00 1
llseek .00 4
resolvepath .00 1
fstat64 .00 2
------- ------ ----
sys totals: .03 596 3
usr time: .53
elapsed: .59
and then with the perl module
syscall seconds calls errors
_exit .00 1
read .03 229
open .00 21 8
close .00 24
time .00 4
brk .12 2750
lseek .00 2
getpid .00 1
getuid .00 2
getgid .00 2
sysi86 .00 1
ioctl .00 12 12
execve .00 1
fcntl .00 1
sigaction .00 1
getcontext .00 25
setcontext .00 1
mmap .00 33
mprotect .00 4
munmap .00 9
fxstat .00 10
memcntl .00 8
sysconfig .00 2
llseek .00 15
resolvepath .00 1
stat64 .00 24 21
fstat64 .00 12
open64 .00 20 9
------- ------ ----
sys totals: .15 3216 50
usr time: .48
elapsed: .90
as you can see brk has been get called 2750 times, and the total time of fetching the data has a factor of two, most
of the time, the system allocate memory.
--
Alexandre
==
Don't try and use this release for anything useful. We have made every effort to ensure that all
bits in this package are either 0 or 1. However, these bits may not be in the correct order and proportion.
==
--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-developers
mailing list