From: Steve Dickson <SteveD@redhat.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 0/2] showmount bug fixes
Date: Thu, 07 Jan 2010 15:25:57 -0500 [thread overview]
Message-ID: <4B464355.1000405@RedHat.com> (raw)
In-Reply-To: <7FEF347F-051D-4B08-A647-27506CFEC12A@oracle.com>
On 01/07/2010 01:38 PM, Chuck Lever wrote:
>
> On Jan 7, 2010, at 12:52 PM, Steve Dickson wrote:
>
>>
>>
>> On 01/07/2010 11:26 AM, Chuck Lever wrote:
>>> Hi Steve-
>>>
>>> As promised, a couple of bug fixes for the recent improvements to the
>>> showmount command.
>>>
>>> ---
>>>
>>> Chuck Lever (2):
>>> showmount: Use CLNT_CONTROL for version fallback
>> Why is calling CLNT_CONTROL() verses calling clnt_create again
>> so much better?? In between failures the server status could
>> change so why not just ping it again??
>>
>
> The clnt_create(3) library call is quite heavyweight. It does a DNS
> lookup via its own transport socket, a GETPORT via its own transport
> socket, then creates and connects a socket to do the application's RPC
> work.
>
> Each time showmount calls clnt_create(3), the library will set up a
> socket for the DNS lookup (usually but not always UDP), set up a socket
> to do a GETPORT, and then set up a third socket for the MNTPROC_EXPORT
> request. That's three sockets, each time through your retry loop.
>
> When contacting a MNTv1-only server over TCP, the showmount command can
> leave up to six TCP sockets in TIME_WAIT (not counting sockets used for
> DNS) for 120 seconds after the command exits, if it doesn't use
> CLNT_CONTROL.
Now really... who do you know that runs an v2 only server...
I would call that badly misconfigured server... and I just
don't think it happens...because if it did, the bug would have
become much more prevalent a long time ago...
Remember the goal of this patch is to deal with v3 only servers...
plus I kinda like the idea having applications re-querying the
server since configuration do indeed change...
steved.
>
> In the TCP case, CLNT_CONTROL leaves the application's transport socket
> connected. This means showmount doesn't perform any additional DNS or
> GETPORT requests (it does just one of each), and then one transport
> socket is used for all the MNTPROC_EXPORT request retries. Thus, with
> CLNT_CONTROL, showmount uses one TCP socket for a single GETPORT, and
> one socket to do the MNTPROC_EXPORT requests.
>
> So in every case, showmount will use just two transport sockets (not
> counting the DNS query). It's behavior is no different than your
> original patch if the server supports MNTv3, but much more efficient for
> the MNTv1-only case.
>
> Leaving multiple sockets in TIME_WAIT is a regression from the original
> showmount behavior, hence this bug fix. If a customer reported this
> problem, you wouldn't hesitate to apply this fix. I'm not sure why you
> find this controversial.
>
> --
> Chuck Lever
> chuck[dot]lever[at]oracle[dot]com
>
>
>
next prev parent reply other threads:[~2010-01-07 20:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-07 16:26 [PATCH 0/2] showmount bug fixes Chuck Lever
[not found] ` <20100107162421.27102.21422.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-01-07 16:26 ` [PATCH 1/2] showmount: Eliminate compiler warnings Chuck Lever
2010-01-07 16:26 ` [PATCH 2/2] showmount: Use CLNT_CONTROL for version fallback Chuck Lever
2010-01-07 17:52 ` [PATCH 0/2] showmount bug fixes Steve Dickson
[not found] ` <4B461F48.4070906-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2010-01-07 18:38 ` Chuck Lever
2010-01-07 20:25 ` Steve Dickson [this message]
[not found] ` <4B464355.1000405-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2010-01-07 22:43 ` Chuck Lever
2010-01-07 23:32 ` Steve Dickson
2010-01-12 12:26 ` Steve Dickson
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=4B464355.1000405@RedHat.com \
--to=steved@redhat.com \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox