linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "SZIGETVÁRI János" <jszigetvari@gmail.com>
To: linux-cifs@vger.kernel.org
Subject: Re: rsync copy operation fails on a CIFS mount
Date: Wed, 11 Aug 2021 15:13:45 +0200	[thread overview]
Message-ID: <CAJK_Yh_h60N0muLaEjj6M-=VSHdSAT7tsXD__RPdaOJkMpazwg@mail.gmail.com> (raw)
In-Reply-To: <CAH2r5mv0XxFDMyY-iSDKqQUvH38fpjHJ762hNaCKjwwUM1eY4w@mail.gmail.com>

Dear Steve,

Thank you so much for the long list of recommendations and tips.
I will try to answer to some of your questions that I can answer right
away, and will try to
come back to you on the others at a later time.

Steve French <smfrench@gmail.com> ezt írta (időpont: 2021. aug. 8., V, 22:57):
> Is this a large file workload, or lots of small files in directories,
> or deep directory trees?

Yes, it is in deed. A directory typically has between 1700 and 1100
files, with a total size of
about 150 GB. In each directory there is one large file with a size of
between 90 and 100 GB,
and the rest of the 1xxx files are about 40-50 MB each.
Based on the recommendations I got over the samba mailing-list, I
recommended some config
changes that would hopefully reduce the number of the smaller files in
a directory to about 1/8th
of the current numbers. We'll see what difference that change makes.
Ideally one or two such directories are copied in a routine rsync job run.

> Large directories, and deep directory trees can result in the Linux
> VFS layer doing many revalidate
> requests beyond the default 1 second metadata caching timeout (cifs.ko
> is stricter than some other
> fs in defaulting to 1 second).   Especially if this is the only client
> likely to update the files while backing them up
> then setting actimeo much higher (e.g. actimeo=30) could be helpful.

Thank you, we will try this option!
In our case, the machine offering the share is doing so for only one client.
There is another client, but that uses a different/non-overlapping share.

> In general SMB3.1.1 is MUCH faster with reasonably current Ubuntu
> (make sure you have updated
> your Ubuntu to at least 5.4 although current Ubuntu AFAIK is 5.8 or
> 5.11 kernel now).   It is VERY
> important to use a kernel more recent than 5.3, not just because of
> the many bugfixes but also
> because of the addition of GCM (much faster) encryption for SMB3.1.1
> in 5.3 kernel.kernel:

As mentioned, our appliance is Ubuntu-based, but unfortunately it's
built on 18.04 LTS.
Currently we use a 4.15 version kernel, so can be considered old by now.

During our tests, we tried using CIFS version 3.1.1, but the mount did
not succeed.
In our tests CIFS version 3.02 was the latest one the mount succeeded with.
It may be that CIFS 3.1.1 support was missing from either the 4.15
Linux kernel, or
it may have not been present in the Windows 2012 Storage Edition, that
was providing the share.

> There are other parameters that can be helpful e.g. "nostrictsync" in
> some cases.

Okay, we'll make sure to try that one too.

> Also consider whether rsync is what you want to use - rsync picks an
> unfortunately small default I/O size and its
> maximum I/O size is also terrible - this is less of an issue if you
> are using the default caching (which goes
> through the Linux page cache so will aggregate I/O into larger chunks)
> but for a network FS you really want
> I/O 1MB or larger (SMB2+ will typically default to 4MB or 1MB I/O and
> even NFSv4+ will typically default to 1MB)

I guess we use the default caching, but I'll look into it.

> If you have the ability to try newer kernels (e.g. Ubuntu makes it
> very easy to download install packages to update
> to the more current 5.13 kernel from the Ubuntu website for testing on
> older Ubuntu) - give 5.13 a try and experiment
> with the new mount parm ("rasize") e.g. setting it to 8MB and see if that helps.

Unfortunately doing that is not so easy in our case, but we may give
it some thought
to see whether and how it could be done.

> Another key thing to look at is whether there are reconnects being
> triggered (e.g. by bad app behavior - like we saw
> with scp sometimes sending signals accidentally killing the TCP
> network connection, or by timeouts on the server,
> or bugs that have been fixed in more recent kernels).   See the number
> of reconnects in /proc/fs/cifs/Stats and if
> it is increasing then focusing on whether that is a server bug, or a
> bug due to an older kernel on the client which
> is missing fixes can be useful.

Okay, the next time we do some testing, I will monitor that counter as well.

Thank you so much Steve for your help!

Best Regards,
János Szigetvári

      reply	other threads:[~2021-08-11 13:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAJK_Yh-m-p8r=9WhrHn=V5yMWBpYZCRZeqWyci+NbUEGNPwpYw@mail.gmail.com>
2021-08-08 20:33 ` rsync copy operation fails on a CIFS mount SZIGETVÁRI János
2021-08-08 20:56   ` Steve French
2021-08-11 13:13     ` SZIGETVÁRI János [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='CAJK_Yh_h60N0muLaEjj6M-=VSHdSAT7tsXD__RPdaOJkMpazwg@mail.gmail.com' \
    --to=jszigetvari@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).