unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: zimoun <zimon.toutoune@gmail.com>
Cc: 45327@debbugs.gnu.org
Subject: [bug#45327] [PATCH] git: Periodically delete least-recently-used cached checkouts.
Date: Tue, 22 Dec 2020 14:33:33 +0100	[thread overview]
Message-ID: <87blem2ceq.fsf@gnu.org> (raw)
In-Reply-To: <86a6u7bgle.fsf@gmail.com> (zimoun's message of "Mon, 21 Dec 2020 11:26:05 +0100")

Hi,

zimoun <zimon.toutoune@gmail.com> skribis:

> On Sat, 19 Dec 2020 at 23:06, Ludovic Courtès <ludo@gnu.org> wrote:

[...]

>> I noticed that my ~/.cache/guix/checkouts directory had accumulated
>> a lot of cruft from channels, playing with ‘--with-branch’ and such,
>> and that it would be nice to clean it up once in a while.
>>
>> This is what this patch does.  It uses the (guix cache) default
>> strategy, which consists in deleting least-recently-used items by
>> looking at their atime.
>
> This is done at pull time, right?

This is happens when ‘update-cached-checkout’ is called: when updating a
channel, using ‘--with-git-url’, etc.

> Personally, I would prefer at gc time, and even maybe with an option
> to “guix gc”.

Hmm yes (currently the two things are unrelated.)  I have a slight
preference for something automated that you don’t have to worry about.

> Because, IIUC, every 5 days, the entries older than 1 month will be
> deleted.

Correct.

> As an extensive user of the time-machine, it means that I will do this
> extra work more than often, slowing down the already slow
> “time-machine”.

Let’s say there’s a couple of channels you regularly pull from, like a
few times per months.  Their checkout would never be deleted so you
wouldn’t notice any change in terms of performance.

The difference you’d see is if you pull from a few channels, but less
than once per month.  In that case, the ‘guix’ channel would remain in
cache (because cache cleanup happens after the cached checkout has been
updated), but the other channels would be deleted just to be cloned
again soon after that.

Does that make sense?

Thanks,
Ludo’.




  reply	other threads:[~2020-12-22 13:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-19 22:06 [bug#45327] [PATCH] git: Periodically delete least-recently-used cached checkouts Ludovic Courtès
2020-12-20 10:46 ` Guillaume Le Vaillant
2020-12-20 13:47   ` Ludovic Courtès
2020-12-20 14:16     ` Guillaume Le Vaillant
2020-12-21 10:26 ` zimoun
2020-12-22 13:33   ` Ludovic Courtès [this message]
2020-12-22 15:19     ` zimoun
2021-01-07  9:39       ` Ludovic Courtès
2021-01-07 10:09       ` [bug#45327] [PATCH v2] " Ludovic Courtès
2021-01-07 12:40         ` zimoun
2021-01-13 15:47           ` bug#45327: [PATCH] " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87blem2ceq.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=45327@debbugs.gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).