coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Speeding up df


From: Pádraig Brady
Subject: Re: Speeding up df
Date: Mon, 25 Jul 2016 00:20:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 24/07/16 22:33, Bernhard Voelker wrote:
> On 07/22/2016 10:46 AM, Philipp Thomas wrote:
>> To help a customer that complained about the time it takes for df to check
>> one of their machines with nearly 22000 lines in /proc/self/mountinfo, my
>> collegue came up with this patch that uses a hash table for seaching in 
>> filter_mount_list() and get_dev(). Data from said machine:
>>
>> Without patch:
>> real    0m2.273s
>> user    0m0.768s
>> sys     0m1.500s
>>
>> real    0m1.731s
>> user    0m0.532s
>> sys     0m1.188s
>>
>> With patch:
>> real    0m1.286s
>> user    0m0.052s
>> sys     0m1.232s
>>
>> real    0m1.066s
>> user    0m0.028s
>> sys     0m1.032s
>>
>> Is this patch acceptable?
> 
> Hi Philipp,
> 
> the patch was missing, so I attached it from here:
> 
> https://build.opensuse.org/package/view_file/Base:System/coreutils/coreutils-df-hash-in-filter.patch?expand=1
> 
> Maybe adding an IF_LINT'ed hash_free call would be worth;
> otherwise it looks good to me.

Excellent. +1
Worth a mention in improvements in NEWS too.

thanks,
Pádraig




reply via email to

[Prev in Thread] Current Thread [Next in Thread]