From: Ric Wheeler <rwheeler@redhat.com>
To: bhawley@luminex.com, Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Andrew Martin <amartin@xes-inc.com>, Jim Rees <rees@umich.edu>,
Brown Neil <neilb@suse.de>,
linux-nfs-owner@vger.kernel.org, linux-nfs@vger.kernel.org
Subject: Re: Optimal NFS mount options to safely allow interrupts and timeouts on newer kernels
Date: Thu, 06 Mar 2014 21:29:16 +0200 [thread overview]
Message-ID: <5318CC8C.1050505@redhat.com> (raw)
In-Reply-To: <745494581-1394133289-cardhu_decombobulator_blackberry.rim.net-1805734207-@b5.c4.bise6.blackberry>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=windows-1252; format=flowed, Size: 4348 bytes --]
On 03/06/2014 09:14 PM, Brian Hawley wrote:
> Trond,
>
> In this case, it isn't fsync or close that are not getting the i/o error. It is the write().
>
> And we check the return value of every i/o related command.
Checking write() return status means we wrote to the page cache - you must also
fsync() that file to push it out to the target. Do that when it counts, leaving
data in the page cache until you actually need persistence and your performance
should be reasonable.
Doing it the safe way is not free, you will see a performance hit (less so if
you can do batching, etc).
ric
>
> We aren't using synchronous because the performance becomes abysmal.
>
> Repeated umount -f does eventually result in the i/o error getting propagated back to the write() call. I suspect the repeated umount -f's are working their way through blocks in the cache/queue and eventually we get back to the blocked write.
>
> As I mentioned previously, if we mount with sync or direct i/o type options, we will get the i/o error, but for performance reasons, this isn't an option.
>
> -----Original Message-----
> From: Trond Myklebust <trond.myklebust@primarydata.com>
> Date: Thu, 6 Mar 2014 14:06:24
> To: <bhawley@luminex.com>
> Cc: Andrew Martin<amartin@xes-inc.com>; Jim Rees<rees@umich.edu>; Brown Neil<neilb@suse.de>; <linux-nfs-owner@vger.kernel.org>; <linux-nfs@vger.kernel.org>
> Subject: Re: Optimal NFS mount options to safely allow interrupts and timeouts on newer kernels
>
>
> On Mar 6, 2014, at 14:00, Brian Hawley <bhawley@luminex.com> wrote:
>
>> Even with small timeo and retrans, you won't get i/o errors back to the reads/writes. That's been our experience anyway.
> Read caching, and buffered writes mean that the I/O errors often do not occur during the read()/write() system call itself.
>
> We do try to propagate I/O errors back to the application as soon as the do occur, but if that application isnt using synchronous I/O, and it isnt checking the return values of fsync() or close(), then there is little the kernel can do...
>
>> With soft, you may end up with lost data (data that had already been written to the cache but not yet to the storage). You'd have that same issue with 'hard' too if it was your appliance that failed. If the appliance never comes back, those blocks can never be written.
>>
>> In your case though, you're not writing.
>>
>>
>> -----Original Message-----
>> From: Andrew Martin <amartin@xes-inc.com>
>> Date: Thu, 6 Mar 2014 10:43:42
>> To: Jim Rees<rees@umich.edu>
>> Cc: <bhawley@luminex.com>; NeilBrown<neilb@suse.de>; <linux-nfs-owner@vger.kernel.org>; <linux-nfs@vger.kernel.org>
>> Subject: Re: Optimal NFS mount options to safely allow interrupts and
>> timeouts on newer kernels
>>
>>> From: "Jim Rees" <rees@umich.edu>
>>> Andrew Martin wrote:
>>>
>>>> From: "Jim Rees" <rees@umich.edu>
>>>> Given this is apache, I think if I were doing this I'd use
>>>> ro,soft,intr,tcp
>>>> and not try to write anything to nfs.
>>> I was using tcp,bg,soft,intr when this problem occurred. I do not know if
>>> apache was attempting to do a write or a read, but it seems that
>>> tcp,soft,intr
>>> was not sufficient to prevent the problem.
>>>
>>> I had the impression from your original message that you were not using
>>> "soft" and were asking if it's safe to use it. Are you saying that even with
>>> the "soft" option the apache gets stuck forever?
>> Yes, even with soft, it gets stuck forever. I had been using tcp,bg,soft,intr
>> when the problem occurred (on several ocassions), so my original question was
>> if it would be safe to use a small timeo and retrans values to hopefully
>> return I/O errors quickly to the application, rather than blocking forever
>> (which causes the high load and inevitable reboot). It sounds like that isn't
>> safe, but perhaps there is another way to resolve this problem?
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
> _________________________________
> Trond Myklebust
> Linux NFS client maintainer, PrimaryData
> trond.myklebust@primarydata.com
>
> N§²æìr¸yúèØb²X¬¶Ç§vØ^)Þº{.nÇ+·¥{±û"Ø^nr¡ö¦zË\x1aëh¨èÚ&¢ø\x1e®G«éh®\x03(éÝ¢j"ú\x1a¶^[m§ÿïêäz¹Þàþf£¢·h§~mml==
next prev parent reply other threads:[~2014-03-06 19:29 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1696396609.119284.1394040541217.JavaMail.zimbra@xes-inc.com>
2014-03-05 17:45 ` Optimal NFS mount options to safely allow interrupts and timeouts on newer kernels Andrew Martin
2014-03-05 20:11 ` Jim Rees
2014-03-05 20:41 ` Andrew Martin
2014-03-05 21:11 ` Jim Rees
2014-03-06 3:34 ` NeilBrown
2014-03-06 3:47 ` Jim Rees
2014-03-06 4:37 ` NeilBrown
2014-03-05 20:15 ` Brian Hawley
2014-03-05 20:54 ` Chuck Lever
2014-03-06 9:37 ` Ric Wheeler
2014-03-06 3:50 ` NeilBrown
2014-03-06 5:03 ` Andrew Martin
2014-03-06 5:37 ` NeilBrown
2014-03-06 5:47 ` Brian Hawley
2014-03-06 15:30 ` Andrew Martin
2014-03-06 16:22 ` Jim Rees
2014-03-06 16:43 ` Andrew Martin
2014-03-06 17:36 ` Jim Rees
2014-03-06 18:26 ` Trond Myklebust
2014-03-06 18:35 ` Andrew Martin
2014-03-06 18:48 ` Jim Rees
2014-03-06 19:02 ` Trond Myklebust
2014-03-06 18:50 ` Trond Myklebust
2014-03-06 19:46 ` Andrew Martin
2014-03-06 19:52 ` Trond Myklebust
2014-03-06 20:45 ` Andrew Martin
2014-03-06 21:01 ` Trond Myklebust
2014-03-18 21:50 ` Andrew Martin
2014-03-18 22:27 ` Trond Myklebust
2014-03-28 22:00 ` Dr Fields James Bruce
2014-04-04 18:15 ` Andrew Martin
2014-03-06 19:00 ` Brian Hawley
2014-03-06 19:06 ` Trond Myklebust
2014-03-06 19:14 ` Brian Hawley
2014-03-06 19:26 ` Trond Myklebust
2014-03-06 19:33 ` Brian Hawley
2014-03-06 19:47 ` Trond Myklebust
2014-03-06 19:56 ` Brian Hawley
2014-03-06 20:31 ` Trond Myklebust
2014-03-06 20:34 ` Brian Hawley
2014-03-06 20:41 ` Trond Myklebust
2014-03-06 19:29 ` Ric Wheeler [this message]
2014-03-06 19:38 ` Brian Hawley
2014-04-04 18:15 ` Andrew Martin
2014-03-06 18:56 ` Brian Hawley
2014-03-06 12:34 ` Jim Rees
2014-03-06 15:26 ` Chuck Lever
2014-03-06 15:33 ` Trond Myklebust
2014-03-06 15:59 ` Chuck Lever
2014-03-06 16:02 ` Trond Myklebust
2014-03-06 16:13 ` Chuck Lever
2014-03-06 16:16 ` Trond Myklebust
2014-03-06 16:45 ` Chuck Lever
2014-03-06 17:47 ` Trond Myklebust
2014-03-06 20:38 ` Chuck Lever
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=5318CC8C.1050505@redhat.com \
--to=rwheeler@redhat.com \
--cc=amartin@xes-inc.com \
--cc=bhawley@luminex.com \
--cc=linux-nfs-owner@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=rees@umich.edu \
--cc=trond.myklebust@primarydata.com \
/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;
as well as URLs for NNTP newsgroup(s).