linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Can I reduce the CIFS client connection timeout?
@ 2018-01-04  5:45 Josh Pettett
       [not found] ` <CA+BABmYNvYW48pXnSkqGnpO9yj3oLb1jf1MPXbNcVJi+3a6sRg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Josh Pettett @ 2018-01-04  5:45 UTC (permalink / raw)
  To: linux-cifs-u79uwXL29TY76Z2rM5mHXA

Hello,

We have a use case in which we want the the CIFS mount to quickly
timeout and return an error on the client side if the remote server is
down.  This error would then trigger failure-mode logic in our
application. It appears that an error is returned if the server is
unreachable for 120 seconds, but we want the timeout to occur after
about 15 seconds.  Is this value configurable anywhere?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Can I reduce the CIFS client connection timeout?
       [not found] ` <CA+BABmYNvYW48pXnSkqGnpO9yj3oLb1jf1MPXbNcVJi+3a6sRg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2018-01-10  5:12   ` Sachin Prabhu
  0 siblings, 0 replies; 2+ messages in thread
From: Sachin Prabhu @ 2018-01-10  5:12 UTC (permalink / raw)
  To: Josh Pettett; +Cc: linux-cifs

Hello Josh,

The client will wait 2 * echo interval before marking a server
unresponsive. The default echo interval is set to 60 seconds. You can
tune this to a lower value using the echo_interval=n mount option. In
your case, you can set echo_interval to 8 so that the server is marked
unresponsive after 15 seconds of the server being unavailable.

Upstream patch which added this option.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=adfeb3e00e8e1b9fb4ad19eb7367e7c272d16003

Explanation of the code before that patch was added:
http://sprabhu.blogspot.in/2015/08/investigation-into-effects-of-server.html

Sachin Prabhu

On Thu, Jan 4, 2018 at 11:15 AM, Josh Pettett <jpettett-qZWgbgh2FR7QT0dZR+AlfA@public.gmane.org> wrote:
> Hello,
>
> We have a use case in which we want the the CIFS mount to quickly
> timeout and return an error on the client side if the remote server is
> down.  This error would then trigger failure-mode logic in our
> application. It appears that an error is returned if the server is
> unreachable for 120 seconds, but we want the timeout to occur after
> about 15 seconds.  Is this value configurable anywhere?
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-10  5:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-04  5:45 Can I reduce the CIFS client connection timeout? Josh Pettett
     [not found] ` <CA+BABmYNvYW48pXnSkqGnpO9yj3oLb1jf1MPXbNcVJi+3a6sRg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-10  5:12   ` Sachin Prabhu

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).