From: "J. Bruce Fields" <bfields@fieldses.org>
To: Carsten Aulbert
<carsten.aulbert-l1a6w7hxd2yELgA04lAiVw@public.gmane.org>
Cc: nfs@lists.sourceforge.net
Subject: Re: [NFS] How to set-up a Linux NFS server to handle massive number of requests
Date: Mon, 14 Apr 2008 13:06:07 -0400 [thread overview]
Message-ID: <20080414170607.GC15950@fieldses.org> (raw)
In-Reply-To: <48005A78.9090609-l1a6w7hxd2yELgA04lAiVw@public.gmane.org>
On Sat, Apr 12, 2008 at 08:45:12AM +0200, Carsten Aulbert wrote:
> 2.6.24.Hi,
>
> J. Bruce Fields wrote:
>>> In the standard set-up many connections get into the box (tcp
>>> connection status SYN_RECV) but those fall over after some time and
>>> stay in CLOSE_WAIT state until I restart the nfs-kernel-server.
>>> Typically that looks like (netstat -an):
>>
>> That's interesting! But I'm not sure how to figure this out.
>>
>> Is it possible to get a network trace that shows what's going on?
>>
>
> In principle yes, but
> (1) it's huge. I only get this when doing this with 500-1000 clients
> starting at about the same time
> (2) It seems that I don't get a full trace, i.e. the session seem to be
> incomplete - sometimes I only see a single packet with FIN set. I tried
> doing this both with wireshark running locally and with ntap's capturing
> device.
Yeah, that's not surprising. You'd probably want to dedicate a machine
to doing the capture, and then I'm not sure what kind of hardware you'd
need for a given network to get everything. Probably it's not worth it.
>> What happens on the clients?
>>
> In the logs (/var/log/daemon.log) I only see that the mount request
> fails in different ways.
>
> Apr 9 12:07:55 n0078 automount[26838]: >> mount: RPC: Timed out
> Apr 9 12:07:55 n0078 automount[26838]: mount(nfs): nfs: mount failure
> d14:/data on /atlas/data/d14
> Apr 9 12:07:55 n0078 automount[26838]: failed to mount /atlas/data/d14
> Apr 9 12:18:56 n0078 automount[27977]: >> mount: RPC: Remote system
> error - Connection timed out
> Apr 9 12:18:56 n0078 automount[27977]: mount(nfs): nfs: mount failure
> d14:/data on /atlas/data/d14
>
> I have not yet run tshark in the background on many nodes to see if I
> can capture the client's view. Would that be beneficial?
Couldn't hurt.
Hauling out TCP/IP Illustrated and refreshing my memory of the tcp state
transition diagram.... So if the server has a lot of connections stuck
in CLOSE_WAIT, that means it got FIN's from the clients (perhaps after
they timed out), but never shut down its side of the connection. Sounds
like a bug in some server-side rpc code. (Hm. But all those SYN_RECV's
are somebody waiting for a client to ACK a SYN. Why are there so many
of those?)
Those connections are actually to port 687, which I assume is mountd
(what does rpcinfo -p say?). (And probably if you just killed and
restarted mountd, instead of doing a complete
"/etc/init.d/nfs-kernel-server restart", that'd also clear those out.)
In fact, in the example you gave only three out of about 27 connections
(the only ESTABLISHED connections) were to port 2049 (nfsd itself).
So it looks like it's mountd that's not keeping up (and that's leaving
connections sitting around too long), and the mountd processes are
probably what we should be debugging.
>> What kernel version are you using?--b.
>
> 2.6.24.4 on Debian Etch
>
> Right now, it seems that running 196 nfsd plus 64 threads for mountd
> solves the problem for the time being. Although it would be nice to
> understand these "magic" numbers ;)
Yes, definitely. I'm surprised the number of nfsd threads matters much
at all, actually, if mountd is the bottleneck.
--b.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that nfs@lists.sourceforge.net is being discontinued.
Please subscribe to linux-nfs@vger.kernel.org instead.
http://vger.kernel.org/vger-lists.html#linux-nfs
next prev parent reply other threads:[~2008-04-14 17:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-10 12:12 [NFS] How to set-up a Linux NFS server to handle massive number of requests Carsten Aulbert
[not found] ` <47FE044A.7020008-l1a6w7hxd2yELgA04lAiVw@public.gmane.org>
2008-04-11 23:07 ` J. Bruce Fields
2008-04-12 6:45 ` Carsten Aulbert
[not found] ` <48005A78.9090609-l1a6w7hxd2yELgA04lAiVw@public.gmane.org>
2008-04-14 17:06 ` J. Bruce Fields [this message]
2008-04-15 4:48 ` Tom Tucker
[not found] ` <1208234913.17169.50.camel-SMNkleLxa3ZimH42XvhXlA@public.gmane.org>
2008-04-15 5:42 ` Carsten Aulbert
[not found] ` <48044055.2060500-l1a6w7hxd2yELgA04lAiVw@public.gmane.org>
2008-04-15 13:58 ` J. Bruce Fields
2008-04-16 2:49 ` Tom Tucker
2008-04-15 15:12 ` J. Bruce Fields
2008-04-16 2:43 ` Tom Tucker
[not found] ` <1208313790.3521.32.camel-SMNkleLxa3ZimH42XvhXlA@public.gmane.org>
2008-04-16 2:58 ` J. Bruce Fields
2008-04-16 3:22 ` Tom Tucker
[not found] ` <1208316166.3521.42.camel-SMNkleLxa3ZimH42XvhXlA@public.gmane.org>
2008-04-16 13:45 ` Chuck Lever
2008-04-16 14:35 ` Carsten Aulbert
2008-05-01 19:47 ` Dean Hildebrand
2008-05-01 19:51 ` J. Bruce Fields
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=20080414170607.GC15950@fieldses.org \
--to=bfields@fieldses.org \
--cc=carsten.aulbert-l1a6w7hxd2yELgA04lAiVw@public.gmane.org \
--cc=nfs@lists.sourceforge.net \
/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.