Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C36C8C25B74 for ; Mon, 27 May 2024 11:38:47 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBYgO-0004FZ-Tn; Mon, 27 May 2024 07:38:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBYgL-0004Ed-LJ for qemu-devel@nongnu.org; Mon, 27 May 2024 07:38:25 -0400 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBYgB-0002Z0-El for qemu-devel@nongnu.org; Mon, 27 May 2024 07:38:25 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 036EE6A714; Mon, 27 May 2024 14:38:43 +0300 (MSK) Received: from [192.168.177.130] (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with ESMTP id E1A8DD875C; Mon, 27 May 2024 14:38:08 +0300 (MSK) Message-ID: <61ae842e-179e-453a-b109-e8801354b9e4@tls.msk.ru> Date: Mon, 27 May 2024 14:38:08 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: qemu CI & ccache: cache size is too small To: Thomas Huth , qemu-devel@nongnu.org Cc: Stefan Hajnoczi , "Daniel P. Berrange" References: <4ccbaa65-41cf-4317-9dfb-2c9ab17296d0@tls.msk.ru> <5d4de3b2-a940-44e1-bde9-77e8389fb58c@redhat.com> Content-Language: en-US, ru-RU From: Michael Tokarev Autocrypt: addr=mjt@tls.msk.ru; keydata= xsBLBETIiwkBCADh3cFB56BQYPjtMZCfK6PSLR8lw8EB20rsrPeJtd91IoNZlnCjSoxd9Th1 bLUR8YlpRJ2rjc6O1Bc04VghqUOHgS/tYt8vLjcGWixzdhSLJgPDK3QQZPAvBjMbCt1B6euC WuD87Pv5Udlpnzf4aMwxkgfTusx+ynae/o+T5r7tXD+isccbC3SiGhmAPxFyY3zGcFk4+Rxc 0tP8YY2FWE/baHu+lBDTUN79efWAkHhex1XzVZsV7ZD16rzDbXFK5m6ApvGJWlr5YDEEydTF WwmvwBfr4OINVxzEG/ujNiG4fpMf2NsnFGyB9aSbFjXZevB4qWkduYYW+xpK1EryszHtAAYp zSBNaWNoYWVsIFRva2FyZXYgPG1qdEB0bHMubXNrLnJ1PsLAlgQTAQoAQAIbAwYLCQgHAwIE FQIIAwQWAgMBAh4BAheAAhkBFiEEbuGV0Yhuj/uBDUMkRXzgoIBEZcUFAmBbcjwFCS5e6jMA CgkQRXzgoIBEZcUTIQgA1hPsOF82pXxbcJXBMc4zB9OQu4AlnZvERoGyw7I2222QzaN3RFuj Fia//mapXzpIQNF08l/AA6cx+CKPeGnXwyZfF9fLa4RfifmdNKME8C00XlqnoJDZBGzq8yMy LAKDxl9OQWFcDwDxV+irg5U3fbtNVhvV0kLbS2TyQ0aU5w60ERS2NcyDWplOo7AOzZWChcA4 UFf78oVdZdCW8YDtU0uQFhA9moNnrePy1HSFqduxnlFHEI+fDj/TiOm2ci48b8SBBJOIJFjl SBgH8+SfT9ZqkzhN9vh3YJ49831NwASVm0x1rDHcIwWD32VFZViZ3NjehogRNH9br0PSUYOC 3s7ATQRX2BjLAQgAnak3m0imYOkv2tO/olULFa686tlwuvl5kL0NWCdGQeXv2uMxy36szcrh K1uYhpiQv4r2qNd8BJtYlnYIK16N8GBdkplaDIHcBMbU4t+6bQzEIJIaWoq1hzakmHHngE2a pNMnUf/01GFvCRPlv3imkujE/5ILbagjtdyJaHF0wGOSlTnNT4W8j+zPJ/XK0I5EVQwtbmoc GY62LKxxz2pID6sPZV4zQVY4JdUQaFvOz1emnBxakkt0cq3Qnnqso1tjiy7vyH9CAwPR/48W fpK6dew4Fk+STYtBeixOTfSUS8qRS/wfpUeNa5RnEdTtFQ9IcjpQ/nPrvJJsu9FqwlpjMwAR AQABwsBlBBgBCAAPBQJX2BjLAhsMBQkSzAMAAAoJEEV84KCARGXFUKcH/jqKETECkbyPktdP cWVqw2ZIsmGxMkIdnZTbPwhORseGXMHadQODayhU9GWfCDdSPkWDWzMamD+qStfl9MhlVT60 HTbo6wu1W/ogUS70qQPTY9IfsvAj6f8TlSlK0eLMa3s2UxL2oe5FkNs2CnVeRlr4Yqvp/ZQV 6LXtew4GPRrmplUT/Cre9QIUqR4pxYCQaMoOXQQw3Y0csBwoDYUQujn3slbDJRIweHoppBzT rM6ZG5ldWQN3n3d71pVuv80guylX8+TSB8Mvkqwb5I36/NAFKl0CbGbTuQli7SmNiTAKilXc Y5Uh9PIrmixt0JrmGVRzke6+11mTjVlio/J5dCM= In-Reply-To: <5d4de3b2-a940-44e1-bde9-77e8389fb58c@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org 27.05.2024 14:19, Thomas Huth wrote: > On 27/05/2024 12.49, Michael Tokarev wrote: >> Hi! >> >> Noticed today that a rebuild of basically the same tree (a few commits apart) >> in CI result in just 11% hit rate of ccache: >> >> https://gitlab.com/mjt0k/qemu/-/jobs/6947445337#L5054 > > For me, the results look better: > >  https://gitlab.com/thuth/qemu/-/jobs/6918599017#L4954 Yeah, it's a bit better, but still not good enough. I dunno how much changes the source had between the two runs. It still had 11 cleanups, and the cache size is at the same level. (It is an older ccache, too). >> while it should be near 100%.  What's interesting in there is: >> >> 1) cache size is close to max cache size, >> and more important, >> 2) cleanups performed 78 >> >> so it has to remove old entries before it finished the build. > > Did you maybe switch between master and stable branches before that run? ... I guess that could have invalidated most of the cached files since we > switched from CentOS 8 to 9 recently...? Nope, nothing else ran between the two and it was just a few source-level commits (stable-8.2 pick ups), without changing giltab/containers/etc configuration. I increased cache size to 900M and did another test run, here are the results: https://gitlab.com/mjt0k/qemu/-/jobs/6947894974#L5054 cache directory /builds/mjt0k/qemu/ccache primary config /builds/mjt0k/qemu/ccache/ccache.conf secondary config (readonly) /etc/ccache.conf stats updated Mon May 27 11:17:44 2024 stats zeroed Mon May 27 11:10:22 2024 cache hit (direct) 1862 cache hit (preprocessed) 274 cache miss 1219 cache hit rate 63.67 % called for link 285 called for preprocessing 71 compiler produced empty output 5 preprocessor error 2 no input file 6 cleanups performed 0 files in cache 9948 cache size 654.6 MB max cache size 900.0 MB This is having in mind that the previous run was with CCACHE_SIZE=500M and had multiple cleanups, so 63% is actually more than I'd expect already. Thanks, /mjt -- GPG Key transition (from rsa2048 to rsa4096) since 2024-04-24. New key: rsa4096/61AD3D98ECDF2C8E 9D8B E14E 3F2A 9DD7 9199 28F1 61AD 3D98 ECDF 2C8E Old key: rsa2048/457CE0A0804465C5 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 Transition statement: http://www.corpit.ru/mjt/gpg-transition-2024.txt