public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: "Hannes Dürr" <h.duerr@proxmox.com>,
	"Proxmox Backup Server development discussion"
	<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup v2 1/3] docs: centralise and update garbage collection description
Date: Thu, 11 Apr 2024 09:22:17 +0200	[thread overview]
Message-ID: <1712819712.b6xapom32d.astroid@yuna.none> (raw)
In-Reply-To: <c51e7d22-4064-4047-9927-929e77af7b89@proxmox.com>

On April 10, 2024 3:38 pm, Hannes Dürr wrote:
> 
> On 4/8/24 11:20, Fabian Grünbichler wrote:
>> On April 5, 2024 3:05 pm, Hannes Duerr wrote:
>>> +Chunks accessed after the cut-off time are marked as *Pending removals*
>>> +by the GC as it cannot be certain whether they are still needed.
>> this is rather incomplete and a bit hard to parse as well. I'd replace
>> "accessed after" with "with an atime after".
>>
>> pending is actually:
>> - chunks with atime between the cut-off and the oldest writer (if one
>>    exists)
> At this point i am slightly confused as we defined earlier:
> the cut-off is the start of oldest backup writer* (if one exists)

the cut off is the minimum of (oldest worker start, now-24h) (minus 5
minutes). there can be an oldest worker that was started after the cut
off timestamp, in which case GC might find pending chunks (see below).

> 
> Which would lead to the following:
> 
> - chunks with atime between the cut-off (which is the start of the 
> oldest existing writer) and the oldest writer (if one exists)
> 
> which does not make any sense, where is my mistake ?

if the cut off is determined by a worker started more than 24h before
the start of the GC, then there cannot be any pending chunks - because
all the chunks which might be considered pending (otherwise) could have
been written by that worker, we can't tell.

pending chunks can only happen if there is
- no backup writer
- the olders writer was started less than 24h before the GC

then any chunks written in the time frame between cut-off and writer
start (or GC start, if no writer exists), which are not yet referenced
by any snapshot/index, are considered pending. because those chunks are
neither referenced nor can they have been written by any still going
writer, so they are most likely "garbage".




  reply	other threads:[~2024-04-11  7:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-05 13:05 [pbs-devel] [PATCH proxmox-backup v2 0/3] docs: clarify and expand the description of the garbage collection Hannes Duerr
2024-04-05 13:05 ` [pbs-devel] [PATCH proxmox-backup v2 1/3] docs: centralise and update garbage collection description Hannes Duerr
2024-04-08  9:20   ` Fabian Grünbichler
2024-04-10 13:38     ` Hannes Dürr
2024-04-11  7:22       ` Fabian Grünbichler [this message]
2024-04-05 13:05 ` [pbs-devel] [PATCH proxmox-backup v2 2/3] docs: add custom class for svgs Hannes Duerr
2024-04-08  9:23   ` Fabian Grünbichler
2024-04-08 10:57     ` Hannes Dürr
2024-04-05 13:05 ` [pbs-devel] [PATCH proxmox-backup v2 3/3] docs: add garbage collection timing example Hannes Duerr
2024-04-08  9:35   ` Fabian Grünbichler
2024-04-08 11:11     ` Hannes Dürr

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

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

  git send-email \
    --in-reply-to=1712819712.b6xapom32d.astroid@yuna.none \
    --to=f.gruenbichler@proxmox.com \
    --cc=h.duerr@proxmox.com \
    --cc=pbs-devel@lists.proxmox.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal