Re: [RFC PATCH] Use fast (copy-on-write) copies on btrfs
Tobias Geerinckx-Rice <[email protected]> Wed, 17 Sep 2014 19:24:14 +0200
| Newsgroups | gmane.comp.compilers.ccache |
|---|---|
| Message-ID | <CAKFHe2QKksXKcBXFqYanE7=nR+01HF5VAp1fhbQ+QJyPDpC6aQ@mail.gmail.com> |
Hallo,
Egon Alter wrote:
> I did some measurements compiling the openSUSE kernel:
Thanks!
> git clean, dropped caches
>
> no ccache: 5391.75user 639.29system 31:26.27elapsed 319%CPU
> with ccache: 887.53user 289.11system 15:07.42elapsed 129%CPU
> with ccache + cow: 933.62user 318.38system 18:56.00elapsed 110%CPU
>
> So surprisingly, ccache + cow is slower than without cow.
Uh oh.
> I can only guess
> that the compilation is IO limited in both cases and that using reflink
> instead of copy doesn't reduce it significantly for some reason (many small
> files maybe?). The filesystem was using compression (lzo) btw.
Hrm... btrfs's compression can sometimes interfere with other features
like (no)cow, so I gave in and ran some quick & dirty tests.
Set-up: compiling ccache with itself seemed fitting, finishes in
finite time on an old netbook, and produces a handful of nice >4 KiB
object files that can't be inlined.
Result: unless 'filefrag -v' is lying or btrfs silently ignores a
'remount,compress={none,lzo}' (and mind you: both are always possible
with a fledgling file system), CoW works flawlessly here in both
cases, and in both directions. Not a single extent is duplicated once
the initial object file has been compiled.
Oh: and it's consistently slower.
Bah.
T G-R