Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 82C0B200CF2 for ; Tue, 8 Aug 2017 22:48:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 81558167EF3; Tue, 8 Aug 2017 20:48:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C767E167EF6 for ; Tue, 8 Aug 2017 22:48:04 +0200 (CEST) Received: (qmail 15683 invoked by uid 500); 8 Aug 2017 20:48:03 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 15331 invoked by uid 99); 8 Aug 2017 20:48:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Aug 2017 20:48:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 7966E1807DD for ; Tue, 8 Aug 2017 20:48:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id uGqUkPuDTZW9 for ; Tue, 8 Aug 2017 20:48:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 31ACF5FB40 for ; Tue, 8 Aug 2017 20:48:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6BF51E0044 for ; Tue, 8 Aug 2017 20:48:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 15F0E21ED9 for ; Tue, 8 Aug 2017 20:48:00 +0000 (UTC) Date: Tue, 8 Aug 2017 20:48:00 +0000 (UTC) From: "Rushabh S Shah (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-12278) LeaseManager#removeLease operation is inefficient in 2.8. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 08 Aug 2017 20:48:05 -0000 [ https://issues.apache.org/jira/browse/HDFS-12278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rushabh S Shah updated HDFS-12278: ---------------------------------- Description: After HDFS-6757, LeaseManager #removeLease became expensive. HDFS-6757 changed the {{sortedLeases}} object from TreeSet to PriorityQueue. Previously the {{remove(Object)}} operation from {{sortedLeases}} was {{O(log n)}} but after the change it became {{O( n)}} since it has to find the object first. Recently we had an incident in one of our production cluster just hours after we upgraded from 2.7 to 2.8 The {{sortledLeases}} object had approximately 100,000 items within it. While removing the lease, it will acquire the LeaseManager lock and that will slow down the lookup of lease also. HDFS-6757 is a good improvement which replaced the path by inode id. was: After HDFS-6757, removeLease became expensive. HDFS-6757 changed the {{sortedLeases}} object from TreeSet to PriorityQueue. Previously the {{remove(Object)}} operation from {{sortedLeases}} was {{O(log n)}} but after the change it became {{O( n)}} since it has to find the object first. Recently we had an incident in one of our production cluster just hours after we upgraded from 2.7 to 2.8 The {{sortledLeases}} object had approximately 100,000 items within it. While removing the lease, it will acquire the LeaseManager lock and that will slow down the lookup of lease also. HDFS-6757 is a good improvement which replaced the path by inode id. > LeaseManager#removeLease operation is inefficient in 2.8. > --------------------------------------------------------- > > Key: HDFS-12278 > URL: https://issues.apache.org/jira/browse/HDFS-12278 > Project: Hadoop HDFS > Issue Type: Bug > Components: namenode > Affects Versions: 2.8.0 > Reporter: Rushabh S Shah > Assignee: Rushabh S Shah > Priority: Blocker > > After HDFS-6757, LeaseManager #removeLease became expensive. > HDFS-6757 changed the {{sortedLeases}} object from TreeSet to PriorityQueue. > Previously the {{remove(Object)}} operation from {{sortedLeases}} was {{O(log n)}} but after the change it became {{O( n)}} since it has to find the object first. > Recently we had an incident in one of our production cluster just hours after we upgraded from 2.7 to 2.8 > The {{sortledLeases}} object had approximately 100,000 items within it. > While removing the lease, it will acquire the LeaseManager lock and that will slow down the lookup of lease also. > HDFS-6757 is a good improvement which replaced the path by inode id. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org