From: Christian Ebner <c.ebner@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>, Nicolas Frey <n.frey@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup 1/4] datastore: add new thread settings to tuning options
Date: Fri, 21 Nov 2025 15:15:36 +0100 [thread overview]
Message-ID: <a4ce5b3b-c6e0-4a89-9940-9dd87141cab9@proxmox.com> (raw)
In-Reply-To: <20251121123209.198368-3-n.frey@proxmox.com>
On 11/21/25 1:31 PM, Nicolas Frey wrote:
> add a new field to the `DataStoreImpl` to store the verify job thread
> configuration from the tuning options
>
> Signed-off-by: Nicolas Frey <n.frey@proxmox.com>
> ---
> pbs-datastore/src/datastore.rs | 33 +++++++++++++++++++++++++++++++++
> 1 file changed, 33 insertions(+)
>
> diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs
> index 0a517923..fec9de78 100644
> --- a/pbs-datastore/src/datastore.rs
> +++ b/pbs-datastore/src/datastore.rs
> @@ -146,6 +146,7 @@ pub struct DataStoreImpl {
> sync_level: DatastoreFSyncLevel,
> backend_config: DatastoreBackendConfig,
> lru_store_caching: Option<LocalDatastoreLruCache>,
> + thread_settings: DatastoreThreadSettings,
> }
>
> impl DataStoreImpl {
> @@ -162,6 +163,7 @@ impl DataStoreImpl {
> sync_level: Default::default(),
> backend_config: Default::default(),
> lru_store_caching: None,
> + thread_settings: Default::default(),
> })
> }
> }
> @@ -256,6 +258,27 @@ impl DatastoreBackend {
> }
> }
>
> +#[derive(Clone, Default)]
> +/// Amount of threads to use for certain jobs in a datastore.
> +pub struct DatastoreThreadSettings {
> + /// # of threads to use to verify in verify job
> + pub verify_job_verify_threads: Option<usize>,
> + /// # of threads to use to read in verify job
> + pub verify_job_read_threads: Option<usize>,
> +}
> +
> +impl DatastoreThreadSettings {
> + pub fn new(
nit: no need to make the constructor pub, this can be limited to the
module scope.
> + verify_job_verify_threads: Option<usize>,
> + verify_job_read_threads: Option<usize>,
> + ) -> Self {
> + Self {
> + verify_job_verify_threads,
> + verify_job_read_threads,
> + }
> + }
> +}
> +
> impl DataStore {
> // This one just panics on everything
> #[doc(hidden)]
> @@ -532,6 +555,11 @@ impl DataStore {
> None
> };
>
> + let thread_settings = DatastoreThreadSettings::new(
> + tuning.verify_job_verify_threads,
> + tuning.verify_job_read_threads,
> + );
> +
> Ok(DataStoreImpl {
> chunk_store,
> gc_mutex: Mutex::new(None),
> @@ -542,6 +570,7 @@ impl DataStore {
> sync_level: tuning.sync_level.unwrap_or_default(),
> backend_config,
> lru_store_caching,
> + thread_settings,
> })
> }
>
> @@ -641,6 +670,10 @@ impl DataStore {
> self.inner.chunk_store.base_path()
> }
>
> + pub fn thread_settings(&self) -> &DatastoreThreadSettings {
> + &self.inner.thread_settings
> + }
> +
nit: please add a short docstring for this method, although there are
pre-existing methods without, we should add these moving forward
> /// Returns the absolute path for a backup namespace on this datastore
> pub fn namespace_path(&self, ns: &BackupNamespace) -> PathBuf {
> let mut path = self.base_path();
_______________________________________________
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:[~2025-11-21 14:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-21 12:32 [pbs-devel] [RFC/PATCH proxmox{, -backup} 0/5] tuning: verify: add verify job thread options Nicolas Frey
2025-11-21 12:32 ` [pbs-devel] [PATCH proxmox 1/1] pbs-api-types: add verify-job-{read, verify}-threads to tuning options Nicolas Frey
2025-11-21 14:15 ` Christian Ebner
2025-11-21 12:32 ` [pbs-devel] [PATCH proxmox-backup 1/4] datastore: add new thread settings " Nicolas Frey
2025-11-21 14:15 ` Christian Ebner [this message]
2025-11-21 12:32 ` [pbs-devel] [PATCH proxmox-backup 2/4] verify: use tuning options' thread settings for {verify, read}-threads Nicolas Frey
2025-11-21 12:32 ` [pbs-devel] [PATCH proxmox-backup 3/4] ui: tuning: make verify-job-{read, verify}-threads configurable Nicolas Frey
2025-11-21 12:32 ` [pbs-devel] [PATCH proxmox-backup 4/4] ui: verify: fetch default {read, verify} thread values from tuning options Nicolas Frey
2025-11-21 14:15 ` [pbs-devel] [RFC/PATCH proxmox{, -backup} 0/5] tuning: verify: add verify job thread options 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=a4ce5b3b-c6e0-4a89-9940-9dd87141cab9@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=n.frey@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