All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Dave Chiluk <dave.chiluk-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Cc: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>,
	"Stefan (metze) Metzmacher"
	<metze-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>,
	Dave Chiluk <chiluk-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>,
	Steve French <sfrench-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] CIFS: Decrease reconnection delay when switching nics
Date: Wed, 27 Feb 2013 16:40:10 -0600	[thread overview]
Message-ID: <CAH2r5mvM=OX+F4uqMh_c24DXLxwgRX2UzX3bsYqM00JPzbtjqA@mail.gmail.com> (raw)
In-Reply-To: <512E8787.6070709-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

On Wed, Feb 27, 2013 at 4:24 PM, Dave Chiluk <dave.chiluk-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org> wrote:
> On 02/27/2013 10:34 AM, Jeff Layton wrote:
>> On Wed, 27 Feb 2013 12:06:14 +0100
>> "Stefan (metze) Metzmacher" <metze-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org> wrote:
>>
>>> Hi Dave,
>>>
>>>> When messages are currently in queue awaiting a response, decrease amount of
>>>> time before attempting cifs_reconnect to SMB_MAX_RTT = 10 seconds. The current
>>>> wait time before attempting to reconnect is currently 2*SMB_ECHO_INTERVAL(120
>>>> seconds) since the last response was recieved.  This does not take into account
>>>> the fact that messages waiting for a response should be serviced within a
>>>> reasonable round trip time.
>>>
>>> Wouldn't that mean that the client will disconnect a good connection,
>>> if the server doesn't response within 10 seconds?
>>> Reads and Writes can take longer than 10 seconds...
>>>
>>
>> Where does this magic value of 10s come from? Note that a slow server
>> can take *minutes* to respond to writes that are long past the EOF.
> It comes from the desire to decrease the reconnection delay to something
> better than a random number between 60 and 120 seconds.  I am not
> committed to this number, and it is open for discussion.  Additionally
> if you look closely at the logic it's not 10 seconds per request, but
> actually when requests have been in flight for more than 10 seconds make
> sure we've heard from the server in the last 10 seconds.
>
> Can you explain more fully your use case of writes that are long past
> the EOF?  Perhaps with a test-case or script that I can test?  As far as
> I know writes long past EOF will just result in a sparse file, and
> return in a reasonable round trip time *(that's at least what I'm seeing
> with my testing).  dd if=/dev/zero of=/mnt/cifs/a bs=1M count=100
> seek=100000, starts receiving responses from the server in about .05
> seconds with subsequent responses following at roughly .002-.01 second
> intervals.  This is well within my 10 second value.

Note that not all Linux file systems support sparse files and
certainly there are cifs servers running on operating systems other
than Linux which have popular file systems which don't support sparse
files (e.g. FAT32 but there are many others) - in any case, writes
after end of file can take a LONG time if sparse files are not
supported and I don't know a good way for the client to know that
attribute of the server file system ahead of time (although we could
attempt to set the sparse flag, servers can and do lie)


-- 
Thanks,

Steve

WARNING: multiple messages have this Message-ID (diff)
From: Steve French <smfrench@gmail.com>
To: Dave Chiluk <dave.chiluk@canonical.com>
Cc: Jeff Layton <jlayton@samba.org>,
	"Stefan (metze) Metzmacher" <metze@samba.org>,
	Dave Chiluk <chiluk@canonical.com>,
	Steve French <sfrench@samba.org>,
	linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] CIFS: Decrease reconnection delay when switching nics
Date: Wed, 27 Feb 2013 16:40:10 -0600	[thread overview]
Message-ID: <CAH2r5mvM=OX+F4uqMh_c24DXLxwgRX2UzX3bsYqM00JPzbtjqA@mail.gmail.com> (raw)
In-Reply-To: <512E8787.6070709@canonical.com>

On Wed, Feb 27, 2013 at 4:24 PM, Dave Chiluk <dave.chiluk@canonical.com> wrote:
> On 02/27/2013 10:34 AM, Jeff Layton wrote:
>> On Wed, 27 Feb 2013 12:06:14 +0100
>> "Stefan (metze) Metzmacher" <metze@samba.org> wrote:
>>
>>> Hi Dave,
>>>
>>>> When messages are currently in queue awaiting a response, decrease amount of
>>>> time before attempting cifs_reconnect to SMB_MAX_RTT = 10 seconds. The current
>>>> wait time before attempting to reconnect is currently 2*SMB_ECHO_INTERVAL(120
>>>> seconds) since the last response was recieved.  This does not take into account
>>>> the fact that messages waiting for a response should be serviced within a
>>>> reasonable round trip time.
>>>
>>> Wouldn't that mean that the client will disconnect a good connection,
>>> if the server doesn't response within 10 seconds?
>>> Reads and Writes can take longer than 10 seconds...
>>>
>>
>> Where does this magic value of 10s come from? Note that a slow server
>> can take *minutes* to respond to writes that are long past the EOF.
> It comes from the desire to decrease the reconnection delay to something
> better than a random number between 60 and 120 seconds.  I am not
> committed to this number, and it is open for discussion.  Additionally
> if you look closely at the logic it's not 10 seconds per request, but
> actually when requests have been in flight for more than 10 seconds make
> sure we've heard from the server in the last 10 seconds.
>
> Can you explain more fully your use case of writes that are long past
> the EOF?  Perhaps with a test-case or script that I can test?  As far as
> I know writes long past EOF will just result in a sparse file, and
> return in a reasonable round trip time *(that's at least what I'm seeing
> with my testing).  dd if=/dev/zero of=/mnt/cifs/a bs=1M count=100
> seek=100000, starts receiving responses from the server in about .05
> seconds with subsequent responses following at roughly .002-.01 second
> intervals.  This is well within my 10 second value.

Note that not all Linux file systems support sparse files and
certainly there are cifs servers running on operating systems other
than Linux which have popular file systems which don't support sparse
files (e.g. FAT32 but there are many others) - in any case, writes
after end of file can take a LONG time if sparse files are not
supported and I don't know a good way for the client to know that
attribute of the server file system ahead of time (although we could
attempt to set the sparse flag, servers can and do lie)


-- 
Thanks,

Steve

  parent reply	other threads:[~2013-02-27 22:40 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-25 22:28 [PATCH] CIFS: Decrease reconnection delay when switching nics Dave Chiluk
2013-02-27 11:06 ` Stefan (metze) Metzmacher
2013-02-27 16:34   ` Jeff Layton
2013-02-27 16:34     ` Jeff Layton
     [not found]     ` <20130227083419.0af9deaf-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2013-02-27 22:24       ` Dave Chiluk
2013-02-27 22:24         ` Dave Chiluk
     [not found]         ` <512E8787.6070709-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2013-02-27 22:40           ` Steve French [this message]
2013-02-27 22:40             ` Steve French
2013-02-27 22:44             ` Dave Chiluk
2013-02-28  0:17               ` Stefan (metze) Metzmacher
2013-02-28  0:17                 ` Stefan (metze) Metzmacher
2013-02-28  1:25               ` simo
2013-02-28  1:25                 ` simo
     [not found]               ` <512E8C31.8070106-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2013-02-28  1:26                 ` Tom Talpey
2013-02-28  1:26                   ` Tom Talpey
2013-02-28 15:26         ` Jeff Layton
2013-02-28 15:26           ` Jeff Layton
     [not found]           ` <20130228072637.3b71a4f7-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2013-02-28 16:04             ` Steve French
2013-02-28 16:04               ` Steve French
     [not found]               ` <CAH2r5mtBHO6woWeOJ+DJDBmF35VTfuFYo2iza--xAe7grnELAg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-28 16:47                 ` Jeff Layton
2013-02-28 16:47                   ` Jeff Layton
2013-02-28 17:31                   ` Dave Chiluk
2013-02-28 17:31                     ` Dave Chiluk
     [not found]                     ` <512F948A.9060404-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2013-02-28 17:45                       ` Steve French
2013-02-28 17:45                         ` Steve French
2013-02-28 18:04                       ` Jeff Layton
2013-02-28 18:04                         ` Jeff Layton
2013-02-28 22:23                       ` simo
2013-02-28 22:23                         ` simo
2013-02-28 22:54           ` Björn JACKE
2013-02-28 22:54             ` Björn JACKE
     [not found]             ` <E1UBCMh-00FRaK-CC-dqLtpHMqGvUyWpdLl23E4A@public.gmane.org>
2013-03-01  0:11               ` Jeff Layton
2013-03-01  0:11                 ` Jeff Layton
     [not found]                 ` <20130228161151.0fbbff98-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2013-03-01  2:54                   ` Steve French
2013-03-01  2:54                     ` Steve French
2013-02-28  0:15     ` Stefan (metze) Metzmacher
2013-02-28  0:15       ` Stefan (metze) Metzmacher
2013-02-28 13:01       ` Tom Talpey

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='CAH2r5mvM=OX+F4uqMh_c24DXLxwgRX2UzX3bsYqM00JPzbtjqA@mail.gmail.com' \
    --to=smfrench-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=chiluk-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
    --cc=dave.chiluk-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
    --cc=jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=metze-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
    --cc=samba-technical-w/Ol4Ecudpl8XjKLYN78aQ@public.gmane.org \
    --cc=sfrench-eUNUBHrolfbYtjvyW6yDsg@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.