public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: Matt Corallo <lpxdfsfs@mattcorallo.com>, pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH] Increase SMB/CIFS file attribute cache time
Date: Fri, 19 Aug 2022 12:02:44 +0200	[thread overview]
Message-ID: <b6db75d5-40cc-6871-5247-c6a9329a4ac4@proxmox.com> (raw)
In-Reply-To: <4327fe09-210d-1853-15df-57cbb7a4b0af@bluematt.me>

Hi,

On 16.08.22 05:16, Matt Corallo wrote:
> For those using SMB for long-distance remote backups, the default
> cache setting of 1 second for file attributes causes the GUI
> "backup" tabs to time-out long before they finishing loading.

I'm not saying increasing the timeout can't be worth it, but I haven't
seen many reports about the default being too low. There is a patch in
the works [0] allowing to set custom options in the storage
configuration for CIFS which would allow changing the timeout only for
setups that actually require it.

[0]: https://lists.proxmox.com/pipermail/pve-devel/2022-July/053645.html

> 
> Because Proxmox isn't likely to be accessing SMB shares with file
> attributes changing at high rates where the changes need to be
> visible immediately, simply bumping the attribute cache time is a
> safe, simple change.
> 
> e.g. for my remote-backup site (~70ms away), loading a backup list
> with only 200 files in the `dump` directory does not work at all
> with the default cache time, with 60 seconds it loads just fine.
> 
> Signed-off-by: Matt Corallo <git@bluematt.me>
> ---
>  PVE/Storage/CIFSPlugin.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/PVE/Storage/CIFSPlugin.pm b/PVE/Storage/CIFSPlugin.pm
> index 982040a..dcc53e0 100644
> --- a/PVE/Storage/CIFSPlugin.pm
> +++ b/PVE/Storage/CIFSPlugin.pm
> @@ -69,7 +69,7 @@ sub cifs_mount {
>      $server = "[$server]" if Net::IP::ip_is_ipv6($server);
>      my $source = "//${server}/$share";
> 
> -    my $cmd = ['/bin/mount', '-t', 'cifs', $source, $mountpoint, '-o',
> 'soft', '-o'];
> +    my $cmd = ['/bin/mount', '-t', 'cifs', $source, $mountpoint, '-o',
> 'soft', '-o', 'actimeo=60', '-o'];
> 
>      if (my $cred_file = get_cred_file($storeid)) {
>      push @$cmd, "username=$user", '-o', "credentials=$cred_file";




           reply	other threads:[~2022-08-19 10:03 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <4327fe09-210d-1853-15df-57cbb7a4b0af@bluematt.me>]

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=b6db75d5-40cc-6871-5247-c6a9329a4ac4@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=lpxdfsfs@mattcorallo.com \
    --cc=pve-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