linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* What is a reasonable minimum lease time?
       [not found] <043701d4925f$7b244530$716ccf90$@mindspring.com>
@ 2018-12-12 21:14 ` Frank Filz
  2018-12-12 22:11   ` Mkrtchyan, Tigran
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Filz @ 2018-12-12 21:14 UTC (permalink / raw)
  To: linux-nfs

We have an issue with the Ganesha server with very short (2 second) 
lease times. Ganesha uses a 1 second granularity for lease management, 
and considers a time since last renewed equal to the lease time as too 
long. The result is that the lease period may be short close to 2 
seconds depending on when within a given second things actually happened 
(so a last renew at 0.99 with a subsequent renew at 2.01 which is just 
over one second looks like 2 seconds to Ganesha and thus is >= the 2 
second lease time and not good enough. A simple change would be to 
change the >= to a >, which gives one more second, but it still could 
result in the lease time being almost 1 second too short which is 
significant with a 2 second lease time. But if the minimum reasonable 
lease time is more like 5 or 10 seconds, that 1 second becomes less 
significant.

The bigger fix would be to use a finer grained time, but that adds 
complexity, but if people really want to run with 2 second lease times 
and it makes any kind of sense, we would need to make that change.

Thanks


Frank


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

* Re: What is a reasonable minimum lease time?
  2018-12-12 21:14 ` What is a reasonable minimum lease time? Frank Filz
@ 2018-12-12 22:11   ` Mkrtchyan, Tigran
  2018-12-12 22:35     ` Trond Myklebust
  0 siblings, 1 reply; 3+ messages in thread
From: Mkrtchyan, Tigran @ 2018-12-12 22:11 UTC (permalink / raw)
  To: ffilz; +Cc: linux-nfs

Hi Frank,

IMHO, very short leases can trigger a massive state recovery on network hiccups.

Our server offers 90 seconds to the client. The client usually renew lease (sequence) once in a minute.
During high IO periods lease is not required and when idle, then once in a minute is sufficient to
keep the mount alive. In a worst case, when a client got a lock and dispersal, a competing lock/open
will block only for 90s. Whatever number you have, it should be 


BTW, IETF mailing list probably a better place for this question.

Regards,
   Tigran.


----- Original Message -----
> From: "Frank Filz" <ffilz@redhat.com>
> To: "linux-nfs" <linux-nfs@vger.kernel.org>
> Sent: Wednesday, December 12, 2018 10:14:59 PM
> Subject: What is a reasonable minimum lease time?

> We have an issue with the Ganesha server with very short (2 second)
> lease times. Ganesha uses a 1 second granularity for lease management,
> and considers a time since last renewed equal to the lease time as too
> long. The result is that the lease period may be short close to 2
> seconds depending on when within a given second things actually happened
> (so a last renew at 0.99 with a subsequent renew at 2.01 which is just
> over one second looks like 2 seconds to Ganesha and thus is >= the 2
> second lease time and not good enough. A simple change would be to
> change the >= to a >, which gives one more second, but it still could
> result in the lease time being almost 1 second too short which is
> significant with a 2 second lease time. But if the minimum reasonable
> lease time is more like 5 or 10 seconds, that 1 second becomes less
> significant.
> 
> The bigger fix would be to use a finer grained time, but that adds
> complexity, but if people really want to run with 2 second lease times
> and it makes any kind of sense, we would need to make that change.
> 
> Thanks
> 
> 
> Frank

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

* Re: What is a reasonable minimum lease time?
  2018-12-12 22:11   ` Mkrtchyan, Tigran
@ 2018-12-12 22:35     ` Trond Myklebust
  0 siblings, 0 replies; 3+ messages in thread
From: Trond Myklebust @ 2018-12-12 22:35 UTC (permalink / raw)
  To: tigran.mkrtchyan, ffilz; +Cc: linux-nfs

On Wed, 2018-12-12 at 23:11 +0100, Mkrtchyan, Tigran wrote:
> Hi Frank,
> 
> IMHO, very short leases can trigger a massive state recovery on
> network hiccups.
> 
> Our server offers 90 seconds to the client. The client usually renew
> lease (sequence) once in a minute.
> During high IO periods lease is not required and when idle, then once
> in a minute is sufficient to
> keep the mount alive. In a worst case, when a client got a lock and
> dispersal, a competing lock/open
> will block only for 90s. Whatever number you have, it should be 
> 

Given that TCP SYN timeouts generally follow an exponential law, and
can easily reach > 20s, then I'd argue a 2s lease is on the extremely
short end of tolerable. You probably want to do something a lot larger
if you want lock recovery after a server crash to be reliable.

> 
> BTW, IETF mailing list probably a better place for this question.
> 
> Regards,
>    Tigran.
> 
> 
> ----- Original Message -----
> > From: "Frank Filz" <ffilz@redhat.com>
> > To: "linux-nfs" <linux-nfs@vger.kernel.org>
> > Sent: Wednesday, December 12, 2018 10:14:59 PM
> > Subject: What is a reasonable minimum lease time?
> > We have an issue with the Ganesha server with very short (2 second)
> > lease times. Ganesha uses a 1 second granularity for lease
> > management,
> > and considers a time since last renewed equal to the lease time as
> > too
> > long. The result is that the lease period may be short close to 2
> > seconds depending on when within a given second things actually
> > happened
> > (so a last renew at 0.99 with a subsequent renew at 2.01 which is
> > just
> > over one second looks like 2 seconds to Ganesha and thus is >= the
> > 2
> > second lease time and not good enough. A simple change would be to
> > change the >= to a >, which gives one more second, but it still
> > could
> > result in the lease time being almost 1 second too short which is
> > significant with a 2 second lease time. But if the minimum
> > reasonable
> > lease time is more like 5 or 10 seconds, that 1 second becomes less
> > significant.
> > 
> > The bigger fix would be to use a finer grained time, but that adds
> > complexity, but if people really want to run with 2 second lease
> > times
> > and it makes any kind of sense, we would need to make that change.
> > 
> > Thanks
> > 
> > 
> > Frank
-- 
Trond Myklebust
CTO, Hammerspace Inc
4300 El Camino Real, Suite 105
Los Altos, CA 94022
www.hammer.space



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

end of thread, other threads:[~2018-12-12 22:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <043701d4925f$7b244530$716ccf90$@mindspring.com>
2018-12-12 21:14 ` What is a reasonable minimum lease time? Frank Filz
2018-12-12 22:11   ` Mkrtchyan, Tigran
2018-12-12 22:35     ` Trond Myklebust

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