All of lore.kernel.org
 help / color / mirror / Atom feed
* NFSv4 callback: too many open  connections, consider increasing the number of threads.
@ 2012-07-19  6:46 NeilBrown
  2012-07-30 23:16 ` Myklebust, Trond
  0 siblings, 1 reply; 4+ messages in thread
From: NeilBrown @ 2012-07-19  6:46 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: NFS

[-- Attachment #1: Type: text/plain, Size: 1529 bytes --]


[resending - with more current address for trond]

Hi Trond et al.

 we have a customer who reports getting the message:
        [10879512.275305] NFSv4 callback: too many open  connections,
 consider increasing the number of threads. [10879512.275315] NFSv4 callback:
 too many open  connections, consider increasing the number of threads.
 [10879517.276133] __ratelimit: 133011 callbacks suppressed

Of course you cannot increase the number of threads handling callbacks.

The patch below will get rid of the message - which is presumably mostly just
noise - or possibly change it to
   NFSv4 callback: too many open connections, consider increasing the max
number of connections if the number of connections gets too high.

This isn't much good as this patch doesn't allow the max number to be
increased.
Do we want to make the max number of callback connections configurable, or
should we find a way to silence that message.
(For lockd that message is valid as there is a sysctl to change the max
number of connections for lockd).

Thanks,
NeilBrown


diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index 23ff18f..1129c42 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -265,6 +265,10 @@ int nfs_callback_up(u32 minorversion, struct rpc_xprt
*xprt) ret = -ENOMEM;
 		goto out_err;
 	}
+	/* As there is only one thread so we need to over-ride the
+	 * default maximum of 80 connections
+	 */
+	serv->sv_maxconn = 1024;
 
 	ret = svc_bind(serv, net);
 	if (ret < 0) {

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* Re: NFSv4 callback: too many open  connections, consider increasing the number of threads.
  2012-07-19  6:46 NFSv4 callback: too many open connections, consider increasing the number of threads NeilBrown
@ 2012-07-30 23:16 ` Myklebust, Trond
  2012-07-31  4:40   ` NeilBrown
  0 siblings, 1 reply; 4+ messages in thread
From: Myklebust, Tr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gKiBkZWZh
dWx0IG1heGltdW0gb2YgODAgY29ubmVjdGlvbnMNCj4gKwkgKi8NCj4gKwlzZXJ2LT5zdl9tYXhj
b25uID0gMTAyNDsNCj4gIA0KPiAgCXJldCA9IHN2Y19iaW5kKHNlcnYsIG5ldCk7DQo+ICAJaWYg
KHJldCA8IDApIHsNCg0KSGkgTmVpbCwNCg0KQ291bGQgeW91IHBsZWFzZSBhZGQgdGhlIG1pc3Np
bmcgcy1vLWI/DQoNCkNoZWVycw0KICBUcm9uZA0K

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

* Re: NFSv4 callback: too many open  connections, consider increasing the number of threads.
  2012-07-30 23:16 ` Myklebust, Trond
@ 2012-07-31  4:40   ` NeilBrown
  0 siblings, 0 replies; 4+ messages in thread
From: NeilBrown @ 2012-07-31  4:40 UTC (permalink / raw)
  To: Myklebust, Trond; +Cc: NFS

[-- Attachment #1: Type: text/plain, Size: 1549 bytes --]

On Mon, 30 Jul 2012 23:16:23 +0000 "Myklebust, Trond"
<Trond.Myklebust@netapp.com> wrote:

> Hi Neil,
> 
> Could you please add the missing s-o-b?
> 
> Cheers
>   Trond

Here 'tis.  Thanks.

NeilBrown

From: NeilBrown <neilb@suse.de>
Date: Tue, 31 Jul 2012 14:33:39 +1000
Subject: [PATCH] nfs: increase number of permitted callback connections.

By default a sunrpc service is limited to (N+3)*20 connections
where N is the number of threads.  This is 80 when N==1.
If this number is exceeded a warning is printed suggesting that
the number of threads be increased.  However with services which
run a single thread, this is impossible.

For such services there is a ->sv_maxconn setting that can be
used to forcibly increase the limit, and silence the message.
This is used by lockd.

The nfs client uses a sunrpc service to handle callbacks and
it too is single-threaded, so to avoid the useless messages,
and to allow a reasonable number of concurrent connections,
we need to set ->sv_maxconn.  1024 seems like a good number.

Signed-off-by: NeilBrown <neilb@suse.de>

diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index 23ff18f..9cb1215 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -265,6 +265,10 @@ int nfs_callback_up(u32 minorversion, struct rpc_xprt *xprt)
 		ret = -ENOMEM;
 		goto out_err;
 	}
+	/* As there is only one thread we need to over-ride the
+	 * default maximum of 80 connections
+	 */
+	serv->sv_maxconn = 1024;
 
 	ret = svc_bind(serv, net);
 	if (ret < 0) {

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* NFSv4 callback: too many open  connections, consider increasing the number of threads.
@ 2012-07-12  3:46 NeilBrown
  0 siblings, 0 replies; 4+ messages in thread
From: NeilBrown @ 2012-07-12  3:46 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: NFS

[-- Attachment #1: Type: text/plain, Size: 1491 bytes --]


Hi Trond et al.

 we have a customer who reports getting the message:
        [10879512.275305] NFSv4 callback: too many open  connections, consider increasing the number of threads.
        [10879512.275315] NFSv4 callback: too many open  connections, consider increasing the number of threads.
        [10879517.276133] __ratelimit: 133011 callbacks suppressed

Of course you cannot increase the number of threads handling callbacks.

The patch below will get rid of the message - which is presumably mostly just
noise - or possibly change it to
   NFSv4 callback: too many open connections, consider increasing the max number of connections
if the number of connections gets too high.

This isn't much good as this patch doesn't allow the max number to be
increased.
Do we want to make the max number of callback connections configurable, or
should we find a way to silence that message.
(For lockd that message is valid as there is a sysctl to change the max
number of connections for lockd).

Thanks,
NeilBrown


diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index 23ff18f..1129c42 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -265,6 +265,10 @@ int nfs_callback_up(u32 minorversion, struct rpc_xprt *xprt)
 		ret = -ENOMEM;
 		goto out_err;
 	}
+	/* As there is only one thread so we need to over-ride the
+	 * default maximum of 80 connections
+	 */
+	serv->sv_maxconn = 1024;
 
 	ret = svc_bind(serv, net);
 	if (ret < 0) {

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

end of thread, other threads:[~2012-07-31  4:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-19  6:46 NFSv4 callback: too many open connections, consider increasing the number of threads NeilBrown
2012-07-30 23:16 ` Myklebust, Trond
2012-07-31  4:40   ` NeilBrown
  -- strict thread matches above, loose matches on Subject: below --
2012-07-12  3:46 NeilBrown

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.