public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Steigerwald <Martin@lichtvoll.de>
To: Daniel Pocock <daniel@pocock.com.au>
Cc: linux-ext4@vger.kernel.org
Subject: Re: ext4, barrier, md/RAID1 and write cache
Date: Mon, 7 May 2012 18:25:38 +0200	[thread overview]
Message-ID: <201205071825.38415.Martin@lichtvoll.de> (raw)
In-Reply-To: <4FA7A83E.6010801@pocock.com.au>

Am Montag, 7. Mai 2012 schrieb Daniel Pocock:
> I've been having some NFS performance issues, and have been
> experimenting with the server filesystem (ext4) to see if that is a
> factor.

Which NFS version is this?
 
> The setup is like this:
> 
> (Debian 6, kernel 2.6.39)
> 2x SATA drive (NCQ, 32MB cache, no hardware RAID)
> md RAID1
> LVM
> ext4
> 
> a) If I use data=ordered,barrier=1 and `hdparm -W 1' on the drive, I
> observe write performance over NFS of 1MB/sec (unpacking a big source
> tarball)

Is this a realistic workload scenario for production use?

> b) If I use data=writeback,barrier=0 and `hdparm -W 1' on the drive, I
> observe write performance over NFS of 10MB/sec
> 
> c) If I just use the async option on NFS, I observe up to 30MB/sec
> 
> I believe (b) and (c) are not considered safe against filesystem
> corruption, so I can't use them in practice.

Partly.

b) can harm filesystem consistency unless you disable write cache on the 
disks

c) won´t harm local filesystem consistency, but should the nfs server break 
down all data that the NFS clients sent to the server for writing which is 
not written yet is gone.

> - or must I just use option (b) but make it safer with battery-backed
> write cache?

If you want performance and safety that is the best option from the ones 
you mentioned, if the workload is really I/O bound on the local filesystem. 

Of course you can try the usual tricks like noatime, remove rsize and 
wsize options on the NFS client if they have a new enough kernel (they 
autotune to much higher than the often recommended 8192 or 32768 bytes, 
look at /proc/mounts), put ext4 journal onto an extra disk to reduce head 
seeks, check whether enough NFS server threads are running, try a different 
filesystem and so on.

-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2012-05-07 16:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07 10:47 ext4, barrier, md/RAID1 and write cache Daniel Pocock
2012-05-07 16:25 ` Martin Steigerwald [this message]
2012-05-07 16:44   ` Daniel Pocock
2012-05-07 16:54     ` Andreas Dilger
2012-05-07 17:28       ` Daniel Pocock
2012-05-07 18:59         ` Martin Steigerwald
2012-05-07 20:56           ` Daniel Pocock
2012-05-07 22:24             ` Martin Steigerwald
2012-05-07 23:23               ` Daniel Pocock
2012-05-08 14:55                 ` Martin Steigerwald
2012-05-08 15:28                   ` Daniel Pocock
2012-05-08 17:02                     ` Andreas Dilger
2012-05-09  7:30                     ` Martin Steigerwald
2012-05-09  9:34                       ` Martin Steigerwald

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=201205071825.38415.Martin@lichtvoll.de \
    --to=martin@lichtvoll.de \
    --cc=daniel@pocock.com.au \
    --cc=linux-ext4@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