From: Gabriel Goller <g.goller@proxmox.com>
To: Christian Ebner <c.ebner@proxmox.com>
Cc: pbs-devel@lists.proxmox.com
Subject: Re: [pbs-devel] [PATCH v2 proxmox-backup 2/2] docs: deduplicate background details for garbage collection
Date: Thu, 14 Nov 2024 11:23:30 +0100 [thread overview]
Message-ID: <gielxdwdcesikeeptyi2m5u7bmxznkbfechq6e2lbffo4ehmc7@gca5nhsgno4g> (raw)
In-Reply-To: <e1aacd77-fbd5-49dd-8898-9195bad6ba8d@proxmox.com>
On 14.11.2024 10:47, Christian Ebner wrote:
>On 11/14/24 10:39, Gabriel Goller wrote:
>>On 13.11.2024 16:55, Christian Ebner wrote:
>>>diff --git a/docs/maintenance.rst b/docs/maintenance.rst
>>>index e8a26d69c..bba3feff4 100644
>>>--- a/docs/maintenance.rst
>>>+++ b/docs/maintenance.rst
>>>@@ -197,6 +197,8 @@ It's recommended to setup a schedule to ensure
>>>that unused space is cleaned up
>>>periodically. For most setups a weekly schedule provides a good
>>>interval to
>>>start.
>>>
>>>+.. _gc_background:
>>>+
>>>GC Background
>>>^^^^^^^^^^^^^
>>>
>>>@@ -222,17 +224,31 @@ datastore or interfering with other backups.
>>>The garbage collection (GC) process is performed per datastore and
>>>is split
>>>into two phases:
>>>
>>>-- Phase one: Mark
>>>- All index files are read, and the access time of the referred
>>>chunk files is
>>>- updated.
>>>-
>>>-- Phase two: Sweep
>>>- The task iterates over all chunks, checks their file access
>>>time, and if it
>>>- is older than the cutoff time (i.e., the time when GC started,
>>>plus some
>>>- headroom for safety and Linux file system behavior), the task
>>>knows that the
>>>- chunk was neither referred to in any backup index nor part of
>>>any currently
>>>- running backup that has no index to scan for. As such, the
>>>chunk can be
>>>- safely deleted.
>>>+- Phase one (Mark):
>>>+
>>>+ All index files are read, and the access time (``atime``) of
>>>the referenced
>>>+ chunk files is updated.
>>>+
>>>+- Phase two (Sweep):
>>>+
>>>+ The task iterates over all chunks and checks their file access
>>>time against a
>>>+ cutoff time. The cutoff time is given by either the oldest
>>>backup writer
>>>+ instance, if present, or 24 hours and 5 minutes after the start
>>>of garbage
>>>+ collection.
>>>+
>>
>>>+ Garbage collection can consider chunk files with access time
>>>older than the
>>
>>s/can consider/considers/
>
>Acked!
>
>>It always considers chunks with atime older than cutoff to be dangling
>>afaik.
>This part here is referring to the second phase, so cleaning up the
>chunks. Or what do you mean here by dangling?
Yep that's what I meant, the gc *must* consider these chunks, it's not
optional – so no 'can'.
>>>+ cutoff time to be neither referenced by any backup snapshot's
>>>index, nor part
>>>+ of any currently running backup job. Therefore, these chunks
>>>can safeley be
>>>+ deleted.
>>
>>s/safeley/safely/
>
>Acked!
Oh and consider:
Reviewed-by: Gabriel Goller <g.goller@proxmox.com>
for both patches!
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2024-11-14 10:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 15:55 [pbs-devel] [PATCH v2 proxmox-backup 1/2] docs: add security implications of prune and change detection mode Christian Ebner
2024-11-13 15:55 ` [pbs-devel] [PATCH v2 proxmox-backup 2/2] docs: deduplicate background details for garbage collection Christian Ebner
2024-11-14 9:39 ` Gabriel Goller
2024-11-14 9:47 ` Christian Ebner
2024-11-14 10:23 ` Gabriel Goller [this message]
2024-11-14 9:25 ` [pbs-devel] [PATCH v2 proxmox-backup 1/2] docs: add security implications of prune and change detection mode Gabriel Goller
2024-11-14 9:43 ` Christian Ebner
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=gielxdwdcesikeeptyi2m5u7bmxznkbfechq6e2lbffo4ehmc7@gca5nhsgno4g \
--to=g.goller@proxmox.com \
--cc=c.ebner@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.