[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Speeding up df
From: |
Bernhard Voelker |
Subject: |
Re: Speeding up df |
Date: |
Sun, 24 Jul 2016 23:33:43 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 |
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.
Have a nice day,
Berny
coreutils-df-hash-in-filter.patch
Description: Text Data