Re: FYI: ccache for MSVC/Windows
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.lu...@collabora.com
Re: FYI: ccache for MSVC/Windows
Hi Luboš, thanks for that & the related changes! Luboš Luňák wrote: > Given that AFAIK Windows bots are now the Jenkins bottleneck, I suppose it > could help there too, but I'll leave it to the admins to decide when it's a > good idea to use a random WIP patched ccache. > Note that ccache performs surprisingly poor on io-starved Windows setups [1], which possibly is true for the Jenkins VMs. So there's no way but trying - how about we equip half of the Windows builders with your ccache.exe & see what we end up with? 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]. [1] https://gerrit.libreoffice.org/c/core/+/125179/2#message-54c45dace529cc0b577a0a40d4e8200b05ba1e47 [2] https://github.com/mozilla/sccache Cheers, -- Thorsten signature.asc Description: PGP signature
FYI: ccache for MSVC/Windows
Hello, current master now can build also Windows builds using ccache. MSVC support in ccache is a work in progress and so currently it's necessary to use a patched ccache, either from [1] or get a binary from [2]. You can put it in /opt/lo/bin and configure should find it. It doesn't help as much as on Linux due to generally worse Windows build performance, but it still can help. Given that AFAIK Windows bots are now the Jenkins bottleneck, I suppose it could help there too, but I'll leave it to the admins to decide when it's a good idea to use a random WIP patched ccache. [1] https://github.com/llunak/ccache/tree/msvc [2] https://people.collabora.com/~llunak/download/ccache.exe -- Luboš Luňák l.lu...@collabora.com