From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>,
Dominik Csapak <d.csapak@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup v2] api: zfs: create zpool with relatime=on
Date: Wed, 15 Dec 2021 15:59:45 +0100 [thread overview]
Message-ID: <91872059-0df5-e491-33e3-ca25b0cccfd6@proxmox.com> (raw)
In-Reply-To: <20211103073651.170428-1-d.csapak@proxmox.com>
On 03.11.21 08:36, Dominik Csapak wrote:
> some operations (e.g. garbage collection/restore/etc.) are very read
> intensive on the chunks, and having atime=on and relatime=off (zfs default)
> makes those write intensive operations too. Additionally, 'ext4' defaults to
> relatime, so also change the default for api-created zpools.
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> changes from v1:
> * do not disable atime, it must be on for relatime to work, quote
> from 'man zfsprops' for 'relatime':
>
> Controls the manner in which the access time is updated when atime=on is set.
>
> src/api2/node/disks/zfs.rs | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/src/api2/node/disks/zfs.rs b/src/api2/node/disks/zfs.rs
> index 9c3a0958..56dedab5 100644
> --- a/src/api2/node/disks/zfs.rs
> +++ b/src/api2/node/disks/zfs.rs
> @@ -273,13 +273,15 @@ pub fn create_zpool(
> proxmox_systemd::enable_unit(&import_unit)?;
> }
>
> + let mut command = std::process::Command::new("zfs");
> + command.arg("set");
> if let Some(compression) = compression {
> - let mut command = std::process::Command::new("zfs");
> - command.args(&["set", &format!("compression={}", compression), &name]);
> - task_log!(worker, "# {:?}", command);
> - let output = pbs_tools::run_command(command, None)?;
> - task_log!(worker, "{}", output);
> + command.arg(&format!("compression={}", compression));
> }
> + command.args(&["relatime=on", &name]);
> + task_log!(worker, "# {:?}", command);
> + let output = pbs_tools::run_command(command, None)?;
> + task_log!(worker, "{}", output);
>
> if add_datastore {
> let lock = pbs_config::datastore::lock_config()?;
looks good to me but would need a rebase on current master branch.
prev parent reply other threads:[~2021-12-15 15:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-03 7:36 Dominik Csapak
2021-12-15 14:59 ` Thomas Lamprecht [this message]
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=91872059-0df5-e491-33e3-ca25b0cccfd6@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=d.csapak@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