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 CFEF2200C45 for ; Mon, 13 Mar 2017 11:37:10 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CE7FB160B60; Mon, 13 Mar 2017 10:37:10 +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 29FCF160B6C for ; Mon, 13 Mar 2017 11:37:10 +0100 (CET) Received: (qmail 95404 invoked by uid 500); 13 Mar 2017 10:37:09 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 95393 invoked by uid 99); 13 Mar 2017 10:37:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Mar 2017 10:37:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id CAFD51AF8B4 for ; Mon, 13 Mar 2017 10:37:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.651 X-Spam-Level: X-Spam-Status: No, score=0.651 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id WMIdpgNIlfEL for ; Mon, 13 Mar 2017 10:37:07 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 0E935618A4 for ; Mon, 13 Mar 2017 10:37:07 +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 8BDD0E043B for ; Mon, 13 Mar 2017 10:37:05 +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 95D93243BC for ; Mon, 13 Mar 2017 10:37:04 +0000 (UTC) Date: Mon, 13 Mar 2017 10:37:04 +0000 (UTC) From: "Yu Li (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-17747) Support both weak and soft object pool MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 13 Mar 2017 10:37:11 -0000 [ https://issues.apache.org/jira/browse/HBASE-17747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yu Li updated HBASE-17747: -------------------------- Description: During YCSB testing on embedded mode after HBASE-17744, we found that under high read load GC is quite severe even with offheap L2 cache. After some investigation, we found it's caused by using weak reference in {{IdReadWriteLock}}. In embedded mode the read is so quick that the lock might already get promoted to the old generation when the weak reference is cleared, which causes dirty card table (old reference get removed and new lock object set into {{referenceCache}}, see {{WeakObjectPool#get}}) thus slowing YGC. In distributed mode there'll also be more lock object created with weak reference than soft reference that slowing down the processing. So we proposed to use soft reference for this {{IdReadWriteLock}} used in cache, which won't get cleared until JVM memory is not enough, and could resolve the issue mentioned above. What's more, we propose to extend the {{WeakObjectPool}} to be more generate to support both weak and soft reference. Note that the GC issue only emerges under embedded mode with DirectOperator, in which case all costs on the wire is removed thus produces extremely high concurrency. was: During YCSB testing on embedded mode after HBASE-17744, we found that under high read load GC is quite severe even with offheap L2 cache. After some investigation, we found it's caused by using weak reference for IdReadWriteLock. In embedded mode the read is so quick that the lock might already get promoted to the old generation when the weak reference is cleared, which causes dirty card table thus slowing YGC. So we proposed to use soft reference for this IdReadWriteLock used in cache, which won't get cleared until JVM memory is not enough, and could resolve the issue mentioned above. What's more, we propose to extend the WeakObjectPool to be more generate to support both weak and soft reference. Note that this issue only emerges under embedded mode with DirectOperator, in which case all costs on the wire is removed thus produces extremely high workloads. > Support both weak and soft object pool > -------------------------------------- > > Key: HBASE-17747 > URL: https://issues.apache.org/jira/browse/HBASE-17747 > Project: HBase > Issue Type: Improvement > Reporter: Yu Li > Assignee: Yu Li > Attachments: HBASE-17747.patch, HBASE-17747.v2.patch, HBASE-17747.v3.patch > > > During YCSB testing on embedded mode after HBASE-17744, we found that under high read load GC is quite severe even with offheap L2 cache. After some investigation, we found it's caused by using weak reference in {{IdReadWriteLock}}. In embedded mode the read is so quick that the lock might already get promoted to the old generation when the weak reference is cleared, which causes dirty card table (old reference get removed and new lock object set into {{referenceCache}}, see {{WeakObjectPool#get}}) thus slowing YGC. In distributed mode there'll also be more lock object created with weak reference than soft reference that slowing down the processing. > So we proposed to use soft reference for this {{IdReadWriteLock}} used in cache, which won't get cleared until JVM memory is not enough, and could resolve the issue mentioned above. What's more, we propose to extend the {{WeakObjectPool}} to be more generate to support both weak and soft reference. > Note that the GC issue only emerges under embedded mode with DirectOperator, in which case all costs on the wire is removed thus produces extremely high concurrency. -- This message was sent by Atlassian JIRA (v6.3.15#6346)