From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 13C2C8AAA5 for ; Fri, 19 Aug 2022 12:03:17 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 03B961908C for ; Fri, 19 Aug 2022 12:02:47 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 19 Aug 2022 12:02:45 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 9B646433FC; Fri, 19 Aug 2022 12:02:45 +0200 (CEST) Message-ID: Date: Fri, 19 Aug 2022 12:02:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US To: Matt Corallo , pve-devel@lists.proxmox.com References: <4327fe09-210d-1853-15df-57cbb7a4b0af@bluematt.me> From: Fiona Ebner In-Reply-To: <4327fe09-210d-1853-15df-57cbb7a4b0af@bluematt.me> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.046 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.001 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com, cifsplugin.pm] Subject: Re: [pve-devel] [PATCH] Increase SMB/CIFS file attribute cache time X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2022 10:03:17 -0000 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 > --- >  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";