Return-Path: X-Original-To: apmail-hadoop-common-commits-archive@www.apache.org Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1087517FA5 for ; Tue, 24 Mar 2015 17:28:48 +0000 (UTC) Received: (qmail 16068 invoked by uid 500); 24 Mar 2015 17:28:47 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 16009 invoked by uid 500); 24 Mar 2015 17:28:47 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 16000 invoked by uid 99); 24 Mar 2015 17:28:47 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Mar 2015 17:28:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 55937E10A0; Tue, 24 Mar 2015 17:28:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: brandonli@apache.org To: common-commits@hadoop.apache.org Message-Id: <455ad07a71bf45cea5ab67b36f0821f6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: hadoop git commit: HDFS-7976. Update NFS user guide for mount option 'sync' to minimize or avoid reordered writes. Contributed by Brandon Li Date: Tue, 24 Mar 2015 17:28:47 +0000 (UTC) Repository: hadoop Updated Branches: refs/heads/trunk 6413d3498 -> 51f1f4937 HDFS-7976. Update NFS user guide for mount option 'sync' to minimize or avoid reordered writes. Contributed by Brandon Li Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/51f1f493 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/51f1f493 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/51f1f493 Branch: refs/heads/trunk Commit: 51f1f4937402c63392854443ccde18c1579e3348 Parents: 6413d34 Author: Brandon Li Authored: Tue Mar 24 10:28:38 2015 -0700 Committer: Brandon Li Committed: Tue Mar 24 10:28:38 2015 -0700 ---------------------------------------------------------------------- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../hadoop-hdfs/src/site/markdown/HdfsNfsGateway.md | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/51f1f493/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 70be18a..4f3937a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -784,6 +784,9 @@ Release 2.7.0 - UNRELEASED HDFS-7956. Improve logging for DatanodeRegistration. (Plamen Jeliazkov via shv) + HDFS-7976. Update NFS user guide for mount option "sync" to minimize or + avoid reordered writes. (brandonli) + OPTIMIZATIONS HDFS-7454. Reduce memory footprint for AclEntries in NameNode. http://git-wip-us.apache.org/repos/asf/hadoop/blob/51f1f493/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HdfsNfsGateway.md ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HdfsNfsGateway.md b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HdfsNfsGateway.md index b7e1733..9c95287 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HdfsNfsGateway.md +++ b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HdfsNfsGateway.md @@ -126,7 +126,8 @@ It's strongly recommended for the users to update a few configuration properties * Users are expected to update the file dump directory. NFS client often - reorders writes. Sequential writes can arrive at the NFS gateway at random + reorders writes, especially when the export is not mounted with "sync" option. + Sequential writes can arrive at the NFS gateway at random order. This directory is used to temporarily save out-of-order writes before writing to HDFS. For each file, the out-of-order writes are dumped after they are accumulated to exceed certain threshold (e.g., 1MB) in memory. @@ -254,13 +255,16 @@ Verify validity of NFS related services Mount the export "/" -------------------- -Currently NFS v3 only uses TCP as the transportation protocol. NLM is not supported so mount option "nolock" is needed. It's recommended to use hard mount. This is because, even after the client sends all data to NFS gateway, it may take NFS gateway some extra time to transfer data to HDFS when writes were reorderd by NFS client Kernel. +Currently NFS v3 only uses TCP as the transportation protocol. NLM is not supported so mount option "nolock" is needed. +Mount option "sync" is strongly recommended since it can minimize or avoid reordered writes, which results in more predictable throughput. + Not specifying the sync option may cause unreliable behavior when uploading large files. + It's recommended to use hard mount. This is because, even after the client sends all data to NFS gateway, it may take NFS gateway some extra time to transfer data to HDFS when writes were reorderd by NFS client Kernel. If soft mount has to be used, the user should give it a relatively long timeout (at least no less than the default timeout on the host) . The users can mount the HDFS namespace as shown below: - [root]>mount -t nfs -o vers=3,proto=tcp,nolock,noacl $server:/ $mount_point + [root]>mount -t nfs -o vers=3,proto=tcp,nolock,noacl,sync $server:/ $mount_point Then the users can access HDFS as part of the local file system except that, hard link and random write are not supported yet. To optimize the performance of large file I/O, one can increase the NFS transfer size(rsize and wsize) during mount. By default, NFS gateway supports 1MB as the maximum transfer size. For larger data transfer size, one needs to update "nfs.rtmax" and "nfs.rtmax" in hdfs-site.xml.