[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Findutils-patches] [PATCH] find memory leak
From: |
Bernhard Voelker |
Subject: |
Re: [Findutils-patches] [PATCH] find memory leak |
Date: |
Sun, 5 Feb 2017 23:52:12 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 |
On 02/03/2017 07:06 PM, Goffredo Baroncelli wrote:
> On 2017-02-02 23:31, Bernhard Voelker wrote:
>> yes, I did. But my /lib/modules only has 9470 files,
>
> my one has 12000 files; so the numbers are comparables.
>
>
>
>> so the memory usage without
>> the patches was only
>> Maximum resident set size (kbytes): 4136
>> and with the patches it's down to
>> Maximum resident set size (kbytes): 2556
>
> Which tools are you using to get these info ?
That's simply /usr/bin/time -v ...
>> So I'm wondering why your find uses 110M. Even if I try for '/' (which has
>> 1281671 files output by that find command), then only 16-18M (without/with
>> the patch)
>> are used here:
>> Maximum resident set size (kbytes): 17892
>> Maximum resident set size (kbytes): 15800
>>
>> Thus said, 110M sound excessive.
>>
> This is not clear to me: "time" states that the maximum memory occupation is
> near 110MB (see above). With the patches "time" states that it requires only
> 2.7MB
>
> /usr/bin/time ./find /lib/modules/ -ignore_readdir_race \( -fstype NFS
> -o -fstype nfs -o -fstype nfs4 -o -fstype afs -o -fstype binfmt_misc -o
> -fstype proc -o -fstype smbfs -o -fstype autofs -o -fstype iso9660 -o -fstype
> ncpfs -o -fstype coda -o -fstype devpts -o -fstype ftpfs -o -fstype devfs -o
> -fstype mfs -o -fstype shfs -o -fstype sysfs -o -fstype cifs -o -fstype
> lustre_lite -o -fstype tmpfs -o -fstype usbfs -o -fstype udf -o -fstype ocfs2
> -o -type d -false \) -prune -o -print0 | wc -l
> 0.09user 0.09system 0:00.23elapsed 79%CPU (0avgtext+0avgdata 2728maxresident)k
> 1088inputs+0outputs (1major+162minor)pagefaults 0swaps
That decrease of mem usage looks great.
> the differences should be the leak....
> are we looking to the same info ?
Hmm, if really the 23x -fstype option had a leak and lead to ~110MB of
memory, then your /proc/self/mountinfo must have about 4.5MB. How big
is it on your system ("wc -c < /proc/self/mountinfo")?
> Which find version are you testing, maybe that there are other variables
> which we aren't considering.
I was testing both /usr/bin/find on openSUSE:Tumbleweed, and the
latest built from the findutils.git repo.
Have a nice day,
Berny
- Re: [Findutils-patches] [PATCH] find memory leak, Bernhard Voelker, 2017/02/01
- Re: [Findutils-patches] [PATCH] find memory leak, Goffredo Baroncelli, 2017/02/02
- Re: [Findutils-patches] [PATCH] find memory leak, Bernhard Voelker, 2017/02/02
- Re: [Findutils-patches] [PATCH] find memory leak, Goffredo Baroncelli, 2017/02/03
- Re: [Findutils-patches] [PATCH] find memory leak,
Bernhard Voelker <=
- Re: [Findutils-patches] [PATCH] find memory leak, Goffredo Baroncelli, 2017/02/06
- Re: [Findutils-patches] [PATCH] find memory leak, Bernhard Voelker, 2017/02/06
- Re: [Findutils-patches] [PATCH] find memory leak, Goffredo Baroncelli, 2017/02/07
- Re: [Findutils-patches] [PATCH] find memory leak, Bernhard Voelker, 2017/02/07
- Re: [Findutils-patches] [PATCH] find memory leak, Dale R. Worley, 2017/02/08
- Re: [Findutils-patches] [PATCH] find memory leak, Bernhard Voelker, 2017/02/08
- Re: [Findutils-patches] [PATCH] find memory leak, Goffredo Baroncelli, 2017/02/08
- Re: [Findutils-patches] [PATCH] find memory leak, Bernhard Voelker, 2017/02/08
- Re: [Findutils-patches] [PATCH] find memory leak, Dale R. Worley, 2017/02/09
- Re: [Findutils-patches] [PATCH] find memory leak, Goffredo Baroncelli, 2017/02/09