From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:58615) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5tpT-0005J6-A3 for guix-patches@gnu.org; Sun, 23 Feb 2020 11:10:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j5tpS-0001Qq-6A for guix-patches@gnu.org; Sun, 23 Feb 2020 11:10:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45541) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j5tpS-0001Qe-2r for guix-patches@gnu.org; Sun, 23 Feb 2020 11:10:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j5tpR-0007mU-TH for guix-patches@gnu.org; Sun, 23 Feb 2020 11:10:01 -0500 Subject: [bug#39734] [PATCH] scripts: Emit GC hint if free space is lower than absolute and relative threshold. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20200222104653.1324-1-mail@ambrevar.xyz> <874kvizxi6.fsf@gnu.org> <87tv3ig8bc.fsf@ambrevar.xyz> <87h7zhttk1.fsf@gnu.org> <874kvhfrqk.fsf@ambrevar.xyz> <875zfxtlrk.fsf@gnu.org> <87pne5e581.fsf@ambrevar.xyz> Date: Sun, 23 Feb 2020 17:09:11 +0100 In-Reply-To: <87pne5e581.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Sun, 23 Feb 2020 15:41:18 +0100") Message-ID: <87tv3hs2u0.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Pierre Neidhardt Cc: 39734@debbugs.gnu.org Hi! Pierre Neidhardt skribis: > See the original discussion: > > https://lists.gnu.org/archive/html/guix-devel/2020-02/msg00303.html Oops, I=E2=80=99m lagging behind and had not seen it yet, sorry about that! > Our users fall into 2 categories: > > - Those with a "small" store partition, say 25 GiB. > - Those with a "big" store partition, say 1 TiB. > > If we use a relative threshold, users with a big partition will get > a hint all the time. This may mislead newcomers into thinking that they > should run "guix gc" while they still have 50 GiB of free space. > > If we use an absolute threshold, users with a small partition will get a > hint all the time. > > In both cases, the hints becomes irrelevant if it's triggered for the > wrong reason. > > The fix is to use both thresholds and to check against the lowest one. > > Does that make more sense? It does, yes. So back to the original patch=E2=80=A6 I think we should use =E2=80=98size-= >number=E2=80=99 for the absolute threshold. I=E2=80=99m also still mildly reluctant to the addition of =E2=80=98GUIX_DISK_SPACE_WARNING_ABSOLUTE=E2=80=99 (one more variable and a= weird name=E2=80=94=E2=80=9Cabsolute warning=E2=80=9D?). An option could be to a= llow =E2=80=98GUIX_DISK_SPACE_WARNING=E2=80=99 to optionally contain both thresh= olds. These would be valid values: 1GiB;10% 15 ;15% relative, and default absolute 15% ;same 1G ;1G absolute, and default relative Thus =E2=80=98%disk-space-warning=E2=80=99 would hold a pair. Does that make sense? Apologies for the misunderstanding! Ludo=E2=80=99.