Re: FYI: ccache for MSVC/Windows

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

 



On Wednesday 17 of November 2021, Thorsten Behrens wrote:
> Note that ccache performs surprisingly poor on io-starved Windows
> setups [1], which possibly is true for the Jenkins VMs.

 If I run 'CCACHE_DEBUG=1 make -C starmath -j8 -rs Library_sm', most of the 
ccache log files claim the full ccache invocation took roughly 50ms. With ~50 
source files in Library_sm that should be ~2.5s CPU time, and if we count 
only non-HT cores, that should take less than a second. Yet the time spent by 
building .cxx files is roughly 3 seconds. So I wouldn't be that certain in 
claiming it's about ccache performing poorly, maybe it's gbuild or poor 
Windows performance when invoking executables or whatever.

 And if I run the above with GBUILD_TRACE set, I get what's attached. 
Apparently even outputting those log 109 lines pretty much doubles the CXX 
time, for whatever strange reason, and there are quite some empty spaces 
between the compilations (they are also in a log created on linux, but there 
they are tiny). I guess that's the reason why we used to have a gmake version 
patched for Windows.

> Along the same line, I've also recently added support for sccache, but
> YMMV there, too (I'd choose ccache over sccache for local caches any
> time). Might be interesting for our dev mentoring team though, since
> sccache enables sharing of cache content via hyperscaler blob storage
> [2].

 Recent ccache versions have support for shared remote storage too, although 
I've never tried it. I've never tried sccache either, but just from looking 
at it ccache seems generally superior, for example sccache can't handle PCHs, 
so it's basically trading one speedup for another.

-- 
 Luboš Luňák
 l.lunak@xxxxxxxxxxxxx

Attachment: gbuild_trace_windows.png
Description: PNG image


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux