From patchwork Tue Jul 16 09:10:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 2698 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 00F2327BBE9; Tue, 16 Jul 2024 10:12:20 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 97EDE27BBE2 for ; Tue, 16 Jul 2024 10:12:20 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTeE6-0005oN-KP; Tue, 16 Jul 2024 05:12:02 -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 1sTeE5-0005oD-Fl for guix-patches@gnu.org; Tue, 16 Jul 2024 05:12:01 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sTeE5-0002nZ-5X; Tue, 16 Jul 2024 05:12:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sTeE6-0004r6-27; Tue, 16 Jul 2024 05:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72137] [PATCH 0/2] Avoid cache cleanup storms Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Tue, 16 Jul 2024 09:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72137 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72137@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by submit@debbugs.gnu.org id=B.172112108118605 (code B ref -1); Tue, 16 Jul 2024 09:12:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 Jul 2024 09:11:21 +0000 Received: from localhost ([127.0.0.1]:60958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTeDR-0004q0-5j for submit@debbugs.gnu.org; Tue, 16 Jul 2024 05:11:21 -0400 Received: from lists.gnu.org ([209.51.188.17]:50406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTeDP-0004pr-DG for submit@debbugs.gnu.org; Tue, 16 Jul 2024 05:11:20 -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 1sTeDM-0005kG-Ds for guix-patches@gnu.org; Tue, 16 Jul 2024 05:11:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sTeDL-0002RD-Gb; Tue, 16 Jul 2024 05:11:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=uCG46G1Ium+J47Lxs59VUVhRX82cof1jfl19Fka//Ng=; b=a8qMM4QfC2a+t9 yxF6cHiEavFjCtFEpOm2T5XQSPZ1Z1Lc+d7RQKeBA97v2krewy0Seempgt4ggghUkmWCc488Y0HIv O8OcD9+u/gFvXUaYmNI26+vduHsTHazuyDM/c3zwmknWZJKvakmBS1PBit1R/B2ftxIHXkGlJGhDs 7d/2+d8CJGe1YEhSZz4PlhG9XGj9jqJcCiukjpVERgyes9RrCnyognHVT1+dxr2ZMg2dwi2b2vmCj M4Q5uoNkCY9TO2dZL+3Js29s95Shv4EgEslBgNhBq+ypwtIJ/4UYcYUxY3DyhAbryLBvoptI0VQE/ llcpcjReDalhkFYXR8YQ==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Tue, 16 Jul 2024 11:10:56 +0200 Message-ID: X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hello! This fixes “cache cleanup storms” reported by Chris Baines whereby typically multiple ‘guix substitute’ processes would start cleaning up /var/guix/substitute/cache concurrently, leading to poor performance (in particular on build farms with many such processes running in parallel, even worse when on spinning disks). Thoughts? Ludo’. Ludovic Courtès (2): syscalls: Add ‘mode’ parameter to ‘lock-file’. cache: Avoid cache cleanup storms from concurrent processes. guix/build/syscalls.scm | 14 +++++++++----- guix/cache.scm | 27 ++++++++++++++++++--------- tests/cache.scm | 30 +++++++++++++++++++++++++++++- tests/syscalls.scm | 13 +++++++++++++ 4 files changed, 69 insertions(+), 15 deletions(-) base-commit: eb508e32d2d359c94d2cabebfe90dc32ca5dcf4f