Return-Path: Delivered-To: apmail-hadoop-common-dev-archive@www.apache.org Received: (qmail 59215 invoked from network); 3 Nov 2010 04:08:19 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Nov 2010 04:08:19 -0000 Received: (qmail 1286 invoked by uid 500); 3 Nov 2010 04:08:49 -0000 Delivered-To: apmail-hadoop-common-dev-archive@hadoop.apache.org Received: (qmail 1202 invoked by uid 500); 3 Nov 2010 04:08:47 -0000 Mailing-List: contact common-dev-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-dev@hadoop.apache.org Received: (qmail 1194 invoked by uid 99); 3 Nov 2010 04:08:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Nov 2010 04:08:46 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Nov 2010 04:08:46 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oA348QXS008751 for ; Wed, 3 Nov 2010 04:08:26 GMT Message-ID: <18257229.212051288757306058.JavaMail.jira@thor> Date: Wed, 3 Nov 2010 00:08:26 -0400 (EDT) From: "Rajesh Balamohan (JIRA)" To: common-dev@hadoop.apache.org Subject: [jira] Created: (HADOOP-7016) Optimize locking codepath in LocalDirAllocator.getLocalPathToRead() and reduce creating many Path objects MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Optimize locking codepath in LocalDirAllocator.getLocalPathToRead() and reduce creating many Path objects --------------------------------------------------------------------------------------------------------- Key: HADOOP-7016 URL: https://issues.apache.org/jira/browse/HADOOP-7016 Project: Hadoop Common Issue Type: Bug Components: fs Affects Versions: 0.20.2 Reporter: Rajesh Balamohan Fix For: 0.20.2 LocalDirAllocator.getLocalPathToRead() is called from TaskTracker to retrieve temporary map output location. This method is synchronized and amount of time spent on this method directly affects the performance of TaskTracker's ability to serve faster. This JIRA is created to reduce the additional fat in getLocalPathToRead() and reduce creating the number of Path obejcts which are expensive. 1. getLocalPathToRead() internally calls RawLocalFileSystem.exists() in order to check the existence of a local file. RawLocalFileSystem.exists() internally creates a FileStatus object which needs to be populated with lastModified, length, directory details etc. This might not be necessary for just checking file existence. 2. Creating a Path object out of a string requires fair amount of processing. It might be worth to store "localDirsPath" in LocalDirAllocator instead of storing "localDirs". This would avoid the number of times Path() object is created in LocalDirAllocator. Any other codepath using LocalDirAllocator would also benefit from the above 2 optimizations. The attached patch addresses the above 2 issues. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.