Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D5BDB297C for ; Fri, 29 Apr 2011 04:00:13 +0000 (UTC) Received: (qmail 62465 invoked by uid 500); 29 Apr 2011 04:00:13 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 62421 invoked by uid 500); 29 Apr 2011 04:00:13 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 62413 invoked by uid 99); 29 Apr 2011 04:00:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Apr 2011 04:00:10 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lohit.vijayarenu@gmail.com designates 209.85.216.176 as permitted sender) Received: from [209.85.216.176] (HELO mail-qy0-f176.google.com) (209.85.216.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Apr 2011 04:00:03 +0000 Received: by mail-qy0-f176.google.com with SMTP id 30so2291766qyk.14 for ; Thu, 28 Apr 2011 20:59:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=zdjjB6CCjxkie7RmPn7iCQO8AEVY6f8aQqP7GZkFB3U=; b=rxxUtKqhXbVXDJCsP0DGJ5TQmWfL9m44gActwOVlBVfsM0iQudfo5Bwa9TnhrTRqQK p8EYCwRDzZLjht9hWYXXwwEpcJ3FfXFmVrSDXY2tjnTuf7ZILUmwWuv5SLfnv6s/6W8Z QxVqOd2LyS1oNMoWjGWJ7J6J73I3OJKfQDBYw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=s/rHPxJ6V4RmQpt4tQkKmS5dUaL5bfE2ugmv5mO6wT0mkZClu+RgVY/VamwKMubYm7 yA/dSXaZw7/+Wz8lk+K7RCvFkE4/uKF+RxREkDREC/Ma734gRFsYK3MNYoZEFR4cGj2P Dbmjl5DL07PSRhsevvmCyQDEZzrQzTUcPh8SY= MIME-Version: 1.0 Received: by 10.229.126.167 with SMTP id c39mr3440254qcs.119.1304049583192; Thu, 28 Apr 2011 20:59:43 -0700 (PDT) Received: by 10.229.221.75 with HTTP; Thu, 28 Apr 2011 20:59:43 -0700 (PDT) In-Reply-To: References: Date: Thu, 28 Apr 2011 20:59:43 -0700 Message-ID: Subject: Re: HConnectionManager max cached instances From: lohit To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary=000e0cdf6d502cfb9604a206b42b --000e0cdf6d502cfb9604a206b42b Content-Type: text/plain; charset=UTF-8 2011/4/28 Ted Yu > I would be happy to know that solution. > If that solution exists, Karthick and I wouldn't have spent 2 weeks on > HBASE-3777 :-) > I was about to suggest that the size be set to same as maxClientConnections, but I see that it has already been done in HBASE-3777 > > On Thu, Apr 28, 2011 at 7:51 PM, lohit wrote: > > > Thanks for the pointer. Even if we increase > > hbase.zookeeper.property.maxClientCnxns > > wouldn't the cache size still be 31? > > I was wondering if there was way to avoid cache miss so that it would not > > create new ZK connection. > > > > 2011/4/28 Ted Yu > > > > > Increase value for the following parameter: > > > > > > hbase.zookeeper.property.maxClientCnxns > > > 30 > > > > > > Please read my blog for long-term fix which should be commited soon: > > > > > > > > > http://zhihongyu.blogspot.com/2011/04/managing-connections-in-hbase-090-and.html > > > > > > On Thu, Apr 28, 2011 at 7:26 PM, lohit > > wrote: > > > > > > > Hi, > > > > > > > > By looking at HConnectionManager it looks like from a single node a > max > > > of > > > > 31 connections can be cached. > > > > > > > > > static final int MAX_CACHED_HBASE_INSTANCES = 31; > > > > > > > > I read the comment that this is based on the assumption that max > client > > > > connections to zookeeper is 30 from a single node. > > > > ZooKeeper has an option to change that value, but we seem to be doing > > lot > > > > of > > > > cache misses if we made more than 30 connections from a client. > > > > This cache miss end up making new ZK connection and if number of > HTable > > > > operations are more, we see spike in ZooKeeper connections from > single > > > > node. > > > > > > > > This is seen in hbase.0.90.2. Is there any work around for this apart > > > from > > > > change the code? > > > > > > > > -- > > > > Thanks > > > > Lohit > > > > > > > > > > > > > > > -- > > Have a Nice Day! > > Lohit > > > -- Have a Nice Day! Lohit --000e0cdf6d502cfb9604a206b42b--