From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7182796543154454528 X-Received: by 2002:a17:90a:f2c9:b0:225:abec:cd98 with SMTP id gt9-20020a17090af2c900b00225abeccd98mr2665435pjb.42.1672375142464; Thu, 29 Dec 2022 20:39:02 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90a:a015:b0:210:6f33:e22d with SMTP id q21-20020a17090aa01500b002106f33e22dls23456872pjp.2.-pod-control-gmail; Thu, 29 Dec 2022 20:39:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXu4cJydc0nNjjNPYF19nO5piFjdkYVr9byo1DldWP9ko5l3vncIvRDmyP0sEc6JvMBNwptd X-Received: by 2002:a17:90a:4a84:b0:212:f14b:9c3f with SMTP id f4-20020a17090a4a8400b00212f14b9c3fmr48657711pjh.25.1672375141416; Thu, 29 Dec 2022 20:39:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672375141; cv=none; d=google.com; s=arc-20160816; b=CFK051HuqomnHQ1a9KuV+N2z3F+9LNa/d4eHMfJtwU2zTM2+f/VfEREmV8UZqlyUxy HL++MOPhOURaBRavNCmG5l7+In7sXb/6oZDnHERq9b+h09yhHfzyZJ/c3TTmRzJz1IGk vNkKaYuh+Oty8GyeY5OnXjEUlLX8Yxkbc0UOk0dfrMV5PP2IjYr7DdUZwomC/0rmAsm3 pqX7lTxD8naWsqC2R1JCj9Ch2Pa+vslHYr3aMgibRFSvn3enyMzNtYJ9VpR9AgrgO80h 4EVHbvCdPBh5viHRG+eSPU0zqoi8eQJCjKKeM9Pp4NyKpcu8TKCXk2yESqyhIPXi9ALl RZdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from; bh=6olNz8lxrAYvDFHBsI0+4/drPJaEzuJ7ggwZ/Mqz6us=; b=VwmEgzczKneojJtDZKTz3T69CFsEfKMzmXoFx4GehUFF0d80fMXa+v781mnj3Ks0KU nsvfAaR9YPdtBf8M9CAzzPzVmOSRuRS2eu9UcDnO4ufvrey0yaUJ4139mtDGG2zTUPIK VGS6LEKQbDemhKUHSfxYe+3aTCpEbZ5Ja6XXU3q1V3WIIKEzHMdRd7ZddWg0PbMnMO9i vybU3c1FWck+Gg0dIVXGcfLXCrjdPJpEMyuCbAcSZCEmN+jUft08Ev6TPTBX9l8UaxEV oLSfQSaE9hDgCepmoM/D61ccOiIva6t0HtGTtE085p60EQdJdB+6QXepppbE9tyoS4b0 mpfw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id ob18-20020a17090b391200b00213e2703c7esi1446840pjb.1.2022.12.29.20.39.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Dec 2022 20:39:01 -0800 (PST) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from baighyz.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 2BU4cwoh011170 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 30 Dec 2022 05:38:58 +0100 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH 0/2] Improving apt cache Date: Fri, 30 Dec 2022 05:38:56 +0100 Message-Id: <20221230043858.15411-1-ubely@ilbers.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: lu3srbr2E1cr Currently, apt cache (e.g. `var/cache/apt/archives`) import and export functions are not optimal. Multiple files are imported from global DL_DIR to package WORKDIR, increasing disk IO and size needed. Also, various chroots (bootstrap, buildchroot, sbuild chroot) include their apt caches to sstate cache files. This patchset switches to hardlinks instead of copies and removes apt cache from bootstrapped images. Currently (measured on qemuarm64-bullseye cross-compilation with maximum 8 parallel tasks (e.g. 8 CPU cores)): - build directory size reduced from 8878 to 7594 MiB - runtime maximum disk usage reduced from 16018 to 12479 MiB TODO: - cleanup other rootfs's (sbuild-chroot, buildchroot) - deal with additional copying in sbuild routines Uladzimir Bely (2): Use hardlinks in deb-dl-dir functions Clean apt cache from debootstrapped rootfs dirs meta/classes/deb-dl-dir.bbclass | 4 ++-- meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) -- 2.20.1