You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Arul Ramachandran <ar...@gmail.com> on 2017/09/12 15:52:13 UTC

Offheap config question for Hbase 1.1.2

In HBase 1.1.2, I am setting up bucket cache. I set MaxDirectMemory size
greater than hbase.bucket.cache.size  - only then it would work.

1) Does HBASE_REGIONSERVER_OPTS -XX:MaxDirectMemorySize needs to be greater
than hbase.bucket.cache.size?
2) It seems with hbase 1.1.2, HBASE_MASTER_OPTS also needs the
 -XX:MaxDirectMemorySize setting?

IIRC, in Hbase 0.98, I had to set -XX:MaxDirectMemorySize less than
hbase.bucket.cache.size --and-- I did not have to set
 -XX:MaxDirectMemorySize for HBASE_MASTER_OPTS.


Thanks,
Arul

Re: Offheap config question for Hbase 1.1.2

Posted by Josh Elser <el...@apache.org>.
FWIW, last I looked into this, 
https://issues.apache.org/jira/browse/HBASE-15154 would be the long-term 
solution to the Master also requiring the MaxDirectMemorySize 
configuration (even when it is not acting as a RegionServer).

Obviously, it's a lower priority fix as there is a simple workaround.

On 9/12/17 12:50 PM, Arul Ramachandran wrote:
> Ted,
> 
> For #1, I was following:
> 
> https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.1/bk_data-access/content/ch_managing-hbase.html#ref-db219cd6-c586-49c1-bc56-c9c1c5475276.1
> 
> ++
> 
> For #2, I got the error "Caused by: java.lang.OutOfMemoryError: Direct
> buffer memory" when starting hbase master.
> 
> https://community.hortonworks.com/questions/129825/hbase-bucket-cache-causing-hmaster-to-go-down.html
> 
> describes the fix.
> 
> ++
> 
> On Tue, Sep 12, 2017 at 9:10 AM, Ted Yu <yu...@gmail.com> wrote:
> 
>> Looks like the config you meant should be hbase.bucketcache.size
>>
>> As the refguide says:
>>
>> A float that EITHER represents a percentage of total heap memory size to
>> give to the cache (if < 1.0) OR, it is the total capacity in megabytes of
>> BucketCache. Default: 0.0
>>
>> If you specify the size as capacity, -XX:MaxDirectMemorySize should be
>> bigger than the capacity.
>>
>> For #2, did you encounter some error ?
>>
>> Cheers
>>
>> On Tue, Sep 12, 2017 at 8:52 AM, Arul Ramachandran <ar...@gmail.com>
>> wrote:
>>
>>> In HBase 1.1.2, I am setting up bucket cache. I set MaxDirectMemory size
>>> greater than hbase.bucket.cache.size  - only then it would work.
>>>
>>> 1) Does HBASE_REGIONSERVER_OPTS -XX:MaxDirectMemorySize needs to be
>> greater
>>> than hbase.bucket.cache.size?
>>> 2) It seems with hbase 1.1.2, HBASE_MASTER_OPTS also needs the
>>>   -XX:MaxDirectMemorySize setting?
>>>
>>> IIRC, in Hbase 0.98, I had to set -XX:MaxDirectMemorySize less than
>>> hbase.bucket.cache.size --and-- I did not have to set
>>>   -XX:MaxDirectMemorySize for HBASE_MASTER_OPTS.
>>>
>>>
>>> Thanks,
>>> Arul
>>>
>>
> 

Re: Offheap config question for Hbase 1.1.2

Posted by Arul Ramachandran <ar...@gmail.com>.
Ted,

For #1, I was following:

https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.1/bk_data-access/content/ch_managing-hbase.html#ref-db219cd6-c586-49c1-bc56-c9c1c5475276.1

++

For #2, I got the error "Caused by: java.lang.OutOfMemoryError: Direct
buffer memory" when starting hbase master.

https://community.hortonworks.com/questions/129825/hbase-bucket-cache-causing-hmaster-to-go-down.html

describes the fix.

++

On Tue, Sep 12, 2017 at 9:10 AM, Ted Yu <yu...@gmail.com> wrote:

> Looks like the config you meant should be hbase.bucketcache.size
>
> As the refguide says:
>
> A float that EITHER represents a percentage of total heap memory size to
> give to the cache (if < 1.0) OR, it is the total capacity in megabytes of
> BucketCache. Default: 0.0
>
> If you specify the size as capacity, -XX:MaxDirectMemorySize should be
> bigger than the capacity.
>
> For #2, did you encounter some error ?
>
> Cheers
>
> On Tue, Sep 12, 2017 at 8:52 AM, Arul Ramachandran <ar...@gmail.com>
> wrote:
>
> > In HBase 1.1.2, I am setting up bucket cache. I set MaxDirectMemory size
> > greater than hbase.bucket.cache.size  - only then it would work.
> >
> > 1) Does HBASE_REGIONSERVER_OPTS -XX:MaxDirectMemorySize needs to be
> greater
> > than hbase.bucket.cache.size?
> > 2) It seems with hbase 1.1.2, HBASE_MASTER_OPTS also needs the
> >  -XX:MaxDirectMemorySize setting?
> >
> > IIRC, in Hbase 0.98, I had to set -XX:MaxDirectMemorySize less than
> > hbase.bucket.cache.size --and-- I did not have to set
> >  -XX:MaxDirectMemorySize for HBASE_MASTER_OPTS.
> >
> >
> > Thanks,
> > Arul
> >
>

Re: Offheap config question for Hbase 1.1.2

Posted by ramkrishna vasudevan <ra...@gmail.com>.
Oh I did not know that the version was HDP. I just thought the set up
process was through some HDP links. Thanks.

On Tue, Sep 12, 2017 at 10:44 PM, Ted Yu <yu...@gmail.com> wrote:

> Ram:
> As Arul indicated, HDP is being used where there're a lot of backports to
> 1.1.2 baseline.
>
> Arul:
> I suggest going thru vendor's channel first.
>
> Cheers
>
> On Tue, Sep 12, 2017 at 10:11 AM, ramkrishna vasudevan <
> ramkrishna.s.vasudevan@gmail.com> wrote:
>
> > Why Master also accepts MaxDirectMemory config is probably because in 1.1
> > onwards we treat HMaster as HregionServer but it does the region
> managment
> > also. Am not very sure in 1.1.2 is HMaster allowed to host regions ? If
> so
> > you need to configure MaxDirectMemory, if not probably we can see how we
> > can avoid it. We need to raise a JIRA for that.
> >
> > Coming to the size of MaxDirectMemory less than bucket cache - I am
> > wondering was there a bug previously? Because assume you need 25G offheap
> > bucket cache then atleast 25G MaxDirectMemory is a must. Ideally you may
> > need some delta more than 25G.
> >
> > 0.98 is obsolete now so its better we go with how 1.1.2 works. But if you
> > feel there is a documentation that could help I think it is better we
> > provide one so that users like you are not affected.
> >
> > Regards
> > Ram
> >
> >
> >
> >
> > On Tue, Sep 12, 2017 at 10:22 PM, Arul Ramachandran <ar...@gmail.com>
> > wrote:
> >
> > > Thank you, Ram.
> > >
> > > >> So are you trying to use bucket cache feature in offheap mode with
> > > 1.1.2?
> > >
> > > Yes.
> > >
> > > >> So even in 0.98 you were using bucket cache in offheap mode?
> > >
> > > Yes, but it is a different hbase cluster and it run 0.98. The one I am
> > > trying to setup offheap cache is hbase 1.1.2
> > >
> > >
> > > -arul
> > >
> > >
> > > On Tue, Sep 12, 2017 at 9:34 AM, ramkrishna vasudevan <
> > > ramkrishna.s.vasudevan@gmail.com> wrote:
> > >
> > > > Hi
> > > >
> > > > So are you trying to use bucket cache feature in offheap mode with
> > 1.1.2?
> > > > If so then it is needed that the MaxDirectMemory is greater than the
> > > > offheap bucket cache size.
> > > >
> > > > If you are not using in offheap mode then probably there is no need
> for
> > > > MaxDirectMemory to be greater than bucket cache size.
> > > >
> > > > >>in Hbase 0.98, I had to set -XX:MaxDirectMemorySize less than
> > > > hbase.bucket.cache.size
> > > > So even in 0.98 you were using bucket cache in offheap mode?
> > > >
> > > > Regards
> > > > Ram
> > > >
> > > > On Tue, Sep 12, 2017 at 9:40 PM, Ted Yu <yu...@gmail.com> wrote:
> > > >
> > > > > Looks like the config you meant should be hbase.bucketcache.size
> > > > >
> > > > > As the refguide says:
> > > > >
> > > > > A float that EITHER represents a percentage of total heap memory
> size
> > > to
> > > > > give to the cache (if < 1.0) OR, it is the total capacity in
> > megabytes
> > > of
> > > > > BucketCache. Default: 0.0
> > > > >
> > > > > If you specify the size as capacity, -XX:MaxDirectMemorySize should
> > be
> > > > > bigger than the capacity.
> > > > >
> > > > > For #2, did you encounter some error ?
> > > > >
> > > > > Cheers
> > > > >
> > > > > On Tue, Sep 12, 2017 at 8:52 AM, Arul Ramachandran <
> > arkuppai@gmail.com
> > > >
> > > > > wrote:
> > > > >
> > > > > > In HBase 1.1.2, I am setting up bucket cache. I set
> MaxDirectMemory
> > > > size
> > > > > > greater than hbase.bucket.cache.size  - only then it would work.
> > > > > >
> > > > > > 1) Does HBASE_REGIONSERVER_OPTS -XX:MaxDirectMemorySize needs to
> be
> > > > > greater
> > > > > > than hbase.bucket.cache.size?
> > > > > > 2) It seems with hbase 1.1.2, HBASE_MASTER_OPTS also needs the
> > > > > >  -XX:MaxDirectMemorySize setting?
> > > > > >
> > > > > > IIRC, in Hbase 0.98, I had to set -XX:MaxDirectMemorySize less
> than
> > > > > > hbase.bucket.cache.size --and-- I did not have to set
> > > > > >  -XX:MaxDirectMemorySize for HBASE_MASTER_OPTS.
> > > > > >
> > > > > >
> > > > > > Thanks,
> > > > > > Arul
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Offheap config question for Hbase 1.1.2

Posted by Ted Yu <yu...@gmail.com>.
Ram:
As Arul indicated, HDP is being used where there're a lot of backports to
1.1.2 baseline.

Arul:
I suggest going thru vendor's channel first.

Cheers

On Tue, Sep 12, 2017 at 10:11 AM, ramkrishna vasudevan <
ramkrishna.s.vasudevan@gmail.com> wrote:

> Why Master also accepts MaxDirectMemory config is probably because in 1.1
> onwards we treat HMaster as HregionServer but it does the region managment
> also. Am not very sure in 1.1.2 is HMaster allowed to host regions ? If so
> you need to configure MaxDirectMemory, if not probably we can see how we
> can avoid it. We need to raise a JIRA for that.
>
> Coming to the size of MaxDirectMemory less than bucket cache - I am
> wondering was there a bug previously? Because assume you need 25G offheap
> bucket cache then atleast 25G MaxDirectMemory is a must. Ideally you may
> need some delta more than 25G.
>
> 0.98 is obsolete now so its better we go with how 1.1.2 works. But if you
> feel there is a documentation that could help I think it is better we
> provide one so that users like you are not affected.
>
> Regards
> Ram
>
>
>
>
> On Tue, Sep 12, 2017 at 10:22 PM, Arul Ramachandran <ar...@gmail.com>
> wrote:
>
> > Thank you, Ram.
> >
> > >> So are you trying to use bucket cache feature in offheap mode with
> > 1.1.2?
> >
> > Yes.
> >
> > >> So even in 0.98 you were using bucket cache in offheap mode?
> >
> > Yes, but it is a different hbase cluster and it run 0.98. The one I am
> > trying to setup offheap cache is hbase 1.1.2
> >
> >
> > -arul
> >
> >
> > On Tue, Sep 12, 2017 at 9:34 AM, ramkrishna vasudevan <
> > ramkrishna.s.vasudevan@gmail.com> wrote:
> >
> > > Hi
> > >
> > > So are you trying to use bucket cache feature in offheap mode with
> 1.1.2?
> > > If so then it is needed that the MaxDirectMemory is greater than the
> > > offheap bucket cache size.
> > >
> > > If you are not using in offheap mode then probably there is no need for
> > > MaxDirectMemory to be greater than bucket cache size.
> > >
> > > >>in Hbase 0.98, I had to set -XX:MaxDirectMemorySize less than
> > > hbase.bucket.cache.size
> > > So even in 0.98 you were using bucket cache in offheap mode?
> > >
> > > Regards
> > > Ram
> > >
> > > On Tue, Sep 12, 2017 at 9:40 PM, Ted Yu <yu...@gmail.com> wrote:
> > >
> > > > Looks like the config you meant should be hbase.bucketcache.size
> > > >
> > > > As the refguide says:
> > > >
> > > > A float that EITHER represents a percentage of total heap memory size
> > to
> > > > give to the cache (if < 1.0) OR, it is the total capacity in
> megabytes
> > of
> > > > BucketCache. Default: 0.0
> > > >
> > > > If you specify the size as capacity, -XX:MaxDirectMemorySize should
> be
> > > > bigger than the capacity.
> > > >
> > > > For #2, did you encounter some error ?
> > > >
> > > > Cheers
> > > >
> > > > On Tue, Sep 12, 2017 at 8:52 AM, Arul Ramachandran <
> arkuppai@gmail.com
> > >
> > > > wrote:
> > > >
> > > > > In HBase 1.1.2, I am setting up bucket cache. I set MaxDirectMemory
> > > size
> > > > > greater than hbase.bucket.cache.size  - only then it would work.
> > > > >
> > > > > 1) Does HBASE_REGIONSERVER_OPTS -XX:MaxDirectMemorySize needs to be
> > > > greater
> > > > > than hbase.bucket.cache.size?
> > > > > 2) It seems with hbase 1.1.2, HBASE_MASTER_OPTS also needs the
> > > > >  -XX:MaxDirectMemorySize setting?
> > > > >
> > > > > IIRC, in Hbase 0.98, I had to set -XX:MaxDirectMemorySize less than
> > > > > hbase.bucket.cache.size --and-- I did not have to set
> > > > >  -XX:MaxDirectMemorySize for HBASE_MASTER_OPTS.
> > > > >
> > > > >
> > > > > Thanks,
> > > > > Arul
> > > > >
> > > >
> > >
> >
>

Re: Offheap config question for Hbase 1.1.2

Posted by Ted Yu <yu...@gmail.com>.
bq. Use different hbase config xml for HM process other than what used for
RS

In Ambari, there is concept of host group which should allow the above.

Again, further discussion should be carried out in Ambari mailing list.

On Tue, Sep 12, 2017 at 10:17 AM, Anoop John <an...@gmail.com> wrote:

> +1 on what Ram said abt why HM also need this setting in ur version..
> HM starts a RS internally..    You can do one thing.. Use different
> hbase config xml for HM process other than what used for RS.   May be
> we need some fix also as Ram said..  Specially when no regions are
> allowed in HM side.
>
> In 0.98 also, u set this MaxDirectMemory config specifically?  Or
> there this setting was not present at all in hbase-env.sh?  Because by
> def there is no cap for the Java process for off heap memory usage.
> You have to give some value bigger than the bucket cache size for this
> MaxDirectMemory..    Some other areas of code also uses the off heap
> memory.. Like the RPC uses java nio socket communication which would
> internally need some off heap memory to be allocated.. Just saying for
> ur ref.
>
> -Anoop-
>
> On Tue, Sep 12, 2017 at 10:41 PM, ramkrishna vasudevan
> <ra...@gmail.com> wrote:
> > Why Master also accepts MaxDirectMemory config is probably because in 1.1
> > onwards we treat HMaster as HregionServer but it does the region
> managment
> > also. Am not very sure in 1.1.2 is HMaster allowed to host regions ? If
> so
> > you need to configure MaxDirectMemory, if not probably we can see how we
> > can avoid it. We need to raise a JIRA for that.
> >
> > Coming to the size of MaxDirectMemory less than bucket cache - I am
> > wondering was there a bug previously? Because assume you need 25G offheap
> > bucket cache then atleast 25G MaxDirectMemory is a must. Ideally you may
> > need some delta more than 25G.
> >
> > 0.98 is obsolete now so its better we go with how 1.1.2 works. But if you
> > feel there is a documentation that could help I think it is better we
> > provide one so that users like you are not affected.
> >
> > Regards
> > Ram
> >
> >
> >
> >
> > On Tue, Sep 12, 2017 at 10:22 PM, Arul Ramachandran <ar...@gmail.com>
> > wrote:
> >
> >> Thank you, Ram.
> >>
> >> >> So are you trying to use bucket cache feature in offheap mode with
> >> 1.1.2?
> >>
> >> Yes.
> >>
> >> >> So even in 0.98 you were using bucket cache in offheap mode?
> >>
> >> Yes, but it is a different hbase cluster and it run 0.98. The one I am
> >> trying to setup offheap cache is hbase 1.1.2
> >>
> >>
> >> -arul
> >>
> >>
> >> On Tue, Sep 12, 2017 at 9:34 AM, ramkrishna vasudevan <
> >> ramkrishna.s.vasudevan@gmail.com> wrote:
> >>
> >> > Hi
> >> >
> >> > So are you trying to use bucket cache feature in offheap mode with
> 1.1.2?
> >> > If so then it is needed that the MaxDirectMemory is greater than the
> >> > offheap bucket cache size.
> >> >
> >> > If you are not using in offheap mode then probably there is no need
> for
> >> > MaxDirectMemory to be greater than bucket cache size.
> >> >
> >> > >>in Hbase 0.98, I had to set -XX:MaxDirectMemorySize less than
> >> > hbase.bucket.cache.size
> >> > So even in 0.98 you were using bucket cache in offheap mode?
> >> >
> >> > Regards
> >> > Ram
> >> >
> >> > On Tue, Sep 12, 2017 at 9:40 PM, Ted Yu <yu...@gmail.com> wrote:
> >> >
> >> > > Looks like the config you meant should be hbase.bucketcache.size
> >> > >
> >> > > As the refguide says:
> >> > >
> >> > > A float that EITHER represents a percentage of total heap memory
> size
> >> to
> >> > > give to the cache (if < 1.0) OR, it is the total capacity in
> megabytes
> >> of
> >> > > BucketCache. Default: 0.0
> >> > >
> >> > > If you specify the size as capacity, -XX:MaxDirectMemorySize should
> be
> >> > > bigger than the capacity.
> >> > >
> >> > > For #2, did you encounter some error ?
> >> > >
> >> > > Cheers
> >> > >
> >> > > On Tue, Sep 12, 2017 at 8:52 AM, Arul Ramachandran <
> arkuppai@gmail.com
> >> >
> >> > > wrote:
> >> > >
> >> > > > In HBase 1.1.2, I am setting up bucket cache. I set
> MaxDirectMemory
> >> > size
> >> > > > greater than hbase.bucket.cache.size  - only then it would work.
> >> > > >
> >> > > > 1) Does HBASE_REGIONSERVER_OPTS -XX:MaxDirectMemorySize needs to
> be
> >> > > greater
> >> > > > than hbase.bucket.cache.size?
> >> > > > 2) It seems with hbase 1.1.2, HBASE_MASTER_OPTS also needs the
> >> > > >  -XX:MaxDirectMemorySize setting?
> >> > > >
> >> > > > IIRC, in Hbase 0.98, I had to set -XX:MaxDirectMemorySize less
> than
> >> > > > hbase.bucket.cache.size --and-- I did not have to set
> >> > > >  -XX:MaxDirectMemorySize for HBASE_MASTER_OPTS.
> >> > > >
> >> > > >
> >> > > > Thanks,
> >> > > > Arul
> >> > > >
> >> > >
> >> >
> >>
>

Re: Offheap config question for Hbase 1.1.2

Posted by Anoop John <an...@gmail.com>.
+1 on what Ram said abt why HM also need this setting in ur version..
HM starts a RS internally..    You can do one thing.. Use different
hbase config xml for HM process other than what used for RS.   May be
we need some fix also as Ram said..  Specially when no regions are
allowed in HM side.

In 0.98 also, u set this MaxDirectMemory config specifically?  Or
there this setting was not present at all in hbase-env.sh?  Because by
def there is no cap for the Java process for off heap memory usage.
You have to give some value bigger than the bucket cache size for this
MaxDirectMemory..    Some other areas of code also uses the off heap
memory.. Like the RPC uses java nio socket communication which would
internally need some off heap memory to be allocated.. Just saying for
ur ref.

-Anoop-

On Tue, Sep 12, 2017 at 10:41 PM, ramkrishna vasudevan
<ra...@gmail.com> wrote:
> Why Master also accepts MaxDirectMemory config is probably because in 1.1
> onwards we treat HMaster as HregionServer but it does the region managment
> also. Am not very sure in 1.1.2 is HMaster allowed to host regions ? If so
> you need to configure MaxDirectMemory, if not probably we can see how we
> can avoid it. We need to raise a JIRA for that.
>
> Coming to the size of MaxDirectMemory less than bucket cache - I am
> wondering was there a bug previously? Because assume you need 25G offheap
> bucket cache then atleast 25G MaxDirectMemory is a must. Ideally you may
> need some delta more than 25G.
>
> 0.98 is obsolete now so its better we go with how 1.1.2 works. But if you
> feel there is a documentation that could help I think it is better we
> provide one so that users like you are not affected.
>
> Regards
> Ram
>
>
>
>
> On Tue, Sep 12, 2017 at 10:22 PM, Arul Ramachandran <ar...@gmail.com>
> wrote:
>
>> Thank you, Ram.
>>
>> >> So are you trying to use bucket cache feature in offheap mode with
>> 1.1.2?
>>
>> Yes.
>>
>> >> So even in 0.98 you were using bucket cache in offheap mode?
>>
>> Yes, but it is a different hbase cluster and it run 0.98. The one I am
>> trying to setup offheap cache is hbase 1.1.2
>>
>>
>> -arul
>>
>>
>> On Tue, Sep 12, 2017 at 9:34 AM, ramkrishna vasudevan <
>> ramkrishna.s.vasudevan@gmail.com> wrote:
>>
>> > Hi
>> >
>> > So are you trying to use bucket cache feature in offheap mode with 1.1.2?
>> > If so then it is needed that the MaxDirectMemory is greater than the
>> > offheap bucket cache size.
>> >
>> > If you are not using in offheap mode then probably there is no need for
>> > MaxDirectMemory to be greater than bucket cache size.
>> >
>> > >>in Hbase 0.98, I had to set -XX:MaxDirectMemorySize less than
>> > hbase.bucket.cache.size
>> > So even in 0.98 you were using bucket cache in offheap mode?
>> >
>> > Regards
>> > Ram
>> >
>> > On Tue, Sep 12, 2017 at 9:40 PM, Ted Yu <yu...@gmail.com> wrote:
>> >
>> > > Looks like the config you meant should be hbase.bucketcache.size
>> > >
>> > > As the refguide says:
>> > >
>> > > A float that EITHER represents a percentage of total heap memory size
>> to
>> > > give to the cache (if < 1.0) OR, it is the total capacity in megabytes
>> of
>> > > BucketCache. Default: 0.0
>> > >
>> > > If you specify the size as capacity, -XX:MaxDirectMemorySize should be
>> > > bigger than the capacity.
>> > >
>> > > For #2, did you encounter some error ?
>> > >
>> > > Cheers
>> > >
>> > > On Tue, Sep 12, 2017 at 8:52 AM, Arul Ramachandran <arkuppai@gmail.com
>> >
>> > > wrote:
>> > >
>> > > > In HBase 1.1.2, I am setting up bucket cache. I set MaxDirectMemory
>> > size
>> > > > greater than hbase.bucket.cache.size  - only then it would work.
>> > > >
>> > > > 1) Does HBASE_REGIONSERVER_OPTS -XX:MaxDirectMemorySize needs to be
>> > > greater
>> > > > than hbase.bucket.cache.size?
>> > > > 2) It seems with hbase 1.1.2, HBASE_MASTER_OPTS also needs the
>> > > >  -XX:MaxDirectMemorySize setting?
>> > > >
>> > > > IIRC, in Hbase 0.98, I had to set -XX:MaxDirectMemorySize less than
>> > > > hbase.bucket.cache.size --and-- I did not have to set
>> > > >  -XX:MaxDirectMemorySize for HBASE_MASTER_OPTS.
>> > > >
>> > > >
>> > > > Thanks,
>> > > > Arul
>> > > >
>> > >
>> >
>>

Re: Offheap config question for Hbase 1.1.2

Posted by ramkrishna vasudevan <ra...@gmail.com>.
Why Master also accepts MaxDirectMemory config is probably because in 1.1
onwards we treat HMaster as HregionServer but it does the region managment
also. Am not very sure in 1.1.2 is HMaster allowed to host regions ? If so
you need to configure MaxDirectMemory, if not probably we can see how we
can avoid it. We need to raise a JIRA for that.

Coming to the size of MaxDirectMemory less than bucket cache - I am
wondering was there a bug previously? Because assume you need 25G offheap
bucket cache then atleast 25G MaxDirectMemory is a must. Ideally you may
need some delta more than 25G.

0.98 is obsolete now so its better we go with how 1.1.2 works. But if you
feel there is a documentation that could help I think it is better we
provide one so that users like you are not affected.

Regards
Ram




On Tue, Sep 12, 2017 at 10:22 PM, Arul Ramachandran <ar...@gmail.com>
wrote:

> Thank you, Ram.
>
> >> So are you trying to use bucket cache feature in offheap mode with
> 1.1.2?
>
> Yes.
>
> >> So even in 0.98 you were using bucket cache in offheap mode?
>
> Yes, but it is a different hbase cluster and it run 0.98. The one I am
> trying to setup offheap cache is hbase 1.1.2
>
>
> -arul
>
>
> On Tue, Sep 12, 2017 at 9:34 AM, ramkrishna vasudevan <
> ramkrishna.s.vasudevan@gmail.com> wrote:
>
> > Hi
> >
> > So are you trying to use bucket cache feature in offheap mode with 1.1.2?
> > If so then it is needed that the MaxDirectMemory is greater than the
> > offheap bucket cache size.
> >
> > If you are not using in offheap mode then probably there is no need for
> > MaxDirectMemory to be greater than bucket cache size.
> >
> > >>in Hbase 0.98, I had to set -XX:MaxDirectMemorySize less than
> > hbase.bucket.cache.size
> > So even in 0.98 you were using bucket cache in offheap mode?
> >
> > Regards
> > Ram
> >
> > On Tue, Sep 12, 2017 at 9:40 PM, Ted Yu <yu...@gmail.com> wrote:
> >
> > > Looks like the config you meant should be hbase.bucketcache.size
> > >
> > > As the refguide says:
> > >
> > > A float that EITHER represents a percentage of total heap memory size
> to
> > > give to the cache (if < 1.0) OR, it is the total capacity in megabytes
> of
> > > BucketCache. Default: 0.0
> > >
> > > If you specify the size as capacity, -XX:MaxDirectMemorySize should be
> > > bigger than the capacity.
> > >
> > > For #2, did you encounter some error ?
> > >
> > > Cheers
> > >
> > > On Tue, Sep 12, 2017 at 8:52 AM, Arul Ramachandran <arkuppai@gmail.com
> >
> > > wrote:
> > >
> > > > In HBase 1.1.2, I am setting up bucket cache. I set MaxDirectMemory
> > size
> > > > greater than hbase.bucket.cache.size  - only then it would work.
> > > >
> > > > 1) Does HBASE_REGIONSERVER_OPTS -XX:MaxDirectMemorySize needs to be
> > > greater
> > > > than hbase.bucket.cache.size?
> > > > 2) It seems with hbase 1.1.2, HBASE_MASTER_OPTS also needs the
> > > >  -XX:MaxDirectMemorySize setting?
> > > >
> > > > IIRC, in Hbase 0.98, I had to set -XX:MaxDirectMemorySize less than
> > > > hbase.bucket.cache.size --and-- I did not have to set
> > > >  -XX:MaxDirectMemorySize for HBASE_MASTER_OPTS.
> > > >
> > > >
> > > > Thanks,
> > > > Arul
> > > >
> > >
> >
>

Re: Offheap config question for Hbase 1.1.2

Posted by Arul Ramachandran <ar...@gmail.com>.
Thank you, Ram.

>> So are you trying to use bucket cache feature in offheap mode with 1.1.2?

Yes.

>> So even in 0.98 you were using bucket cache in offheap mode?

Yes, but it is a different hbase cluster and it run 0.98. The one I am
trying to setup offheap cache is hbase 1.1.2


-arul


On Tue, Sep 12, 2017 at 9:34 AM, ramkrishna vasudevan <
ramkrishna.s.vasudevan@gmail.com> wrote:

> Hi
>
> So are you trying to use bucket cache feature in offheap mode with 1.1.2?
> If so then it is needed that the MaxDirectMemory is greater than the
> offheap bucket cache size.
>
> If you are not using in offheap mode then probably there is no need for
> MaxDirectMemory to be greater than bucket cache size.
>
> >>in Hbase 0.98, I had to set -XX:MaxDirectMemorySize less than
> hbase.bucket.cache.size
> So even in 0.98 you were using bucket cache in offheap mode?
>
> Regards
> Ram
>
> On Tue, Sep 12, 2017 at 9:40 PM, Ted Yu <yu...@gmail.com> wrote:
>
> > Looks like the config you meant should be hbase.bucketcache.size
> >
> > As the refguide says:
> >
> > A float that EITHER represents a percentage of total heap memory size to
> > give to the cache (if < 1.0) OR, it is the total capacity in megabytes of
> > BucketCache. Default: 0.0
> >
> > If you specify the size as capacity, -XX:MaxDirectMemorySize should be
> > bigger than the capacity.
> >
> > For #2, did you encounter some error ?
> >
> > Cheers
> >
> > On Tue, Sep 12, 2017 at 8:52 AM, Arul Ramachandran <ar...@gmail.com>
> > wrote:
> >
> > > In HBase 1.1.2, I am setting up bucket cache. I set MaxDirectMemory
> size
> > > greater than hbase.bucket.cache.size  - only then it would work.
> > >
> > > 1) Does HBASE_REGIONSERVER_OPTS -XX:MaxDirectMemorySize needs to be
> > greater
> > > than hbase.bucket.cache.size?
> > > 2) It seems with hbase 1.1.2, HBASE_MASTER_OPTS also needs the
> > >  -XX:MaxDirectMemorySize setting?
> > >
> > > IIRC, in Hbase 0.98, I had to set -XX:MaxDirectMemorySize less than
> > > hbase.bucket.cache.size --and-- I did not have to set
> > >  -XX:MaxDirectMemorySize for HBASE_MASTER_OPTS.
> > >
> > >
> > > Thanks,
> > > Arul
> > >
> >
>

Re: Offheap config question for Hbase 1.1.2

Posted by ramkrishna vasudevan <ra...@gmail.com>.
Hi

So are you trying to use bucket cache feature in offheap mode with 1.1.2?
If so then it is needed that the MaxDirectMemory is greater than the
offheap bucket cache size.

If you are not using in offheap mode then probably there is no need for
MaxDirectMemory to be greater than bucket cache size.

>>in Hbase 0.98, I had to set -XX:MaxDirectMemorySize less than
hbase.bucket.cache.size
So even in 0.98 you were using bucket cache in offheap mode?

Regards
Ram

On Tue, Sep 12, 2017 at 9:40 PM, Ted Yu <yu...@gmail.com> wrote:

> Looks like the config you meant should be hbase.bucketcache.size
>
> As the refguide says:
>
> A float that EITHER represents a percentage of total heap memory size to
> give to the cache (if < 1.0) OR, it is the total capacity in megabytes of
> BucketCache. Default: 0.0
>
> If you specify the size as capacity, -XX:MaxDirectMemorySize should be
> bigger than the capacity.
>
> For #2, did you encounter some error ?
>
> Cheers
>
> On Tue, Sep 12, 2017 at 8:52 AM, Arul Ramachandran <ar...@gmail.com>
> wrote:
>
> > In HBase 1.1.2, I am setting up bucket cache. I set MaxDirectMemory size
> > greater than hbase.bucket.cache.size  - only then it would work.
> >
> > 1) Does HBASE_REGIONSERVER_OPTS -XX:MaxDirectMemorySize needs to be
> greater
> > than hbase.bucket.cache.size?
> > 2) It seems with hbase 1.1.2, HBASE_MASTER_OPTS also needs the
> >  -XX:MaxDirectMemorySize setting?
> >
> > IIRC, in Hbase 0.98, I had to set -XX:MaxDirectMemorySize less than
> > hbase.bucket.cache.size --and-- I did not have to set
> >  -XX:MaxDirectMemorySize for HBASE_MASTER_OPTS.
> >
> >
> > Thanks,
> > Arul
> >
>

Re: Offheap config question for Hbase 1.1.2

Posted by Ted Yu <yu...@gmail.com>.
Looks like the config you meant should be hbase.bucketcache.size

As the refguide says:

A float that EITHER represents a percentage of total heap memory size to
give to the cache (if < 1.0) OR, it is the total capacity in megabytes of
BucketCache. Default: 0.0

If you specify the size as capacity, -XX:MaxDirectMemorySize should be
bigger than the capacity.

For #2, did you encounter some error ?

Cheers

On Tue, Sep 12, 2017 at 8:52 AM, Arul Ramachandran <ar...@gmail.com>
wrote:

> In HBase 1.1.2, I am setting up bucket cache. I set MaxDirectMemory size
> greater than hbase.bucket.cache.size  - only then it would work.
>
> 1) Does HBASE_REGIONSERVER_OPTS -XX:MaxDirectMemorySize needs to be greater
> than hbase.bucket.cache.size?
> 2) It seems with hbase 1.1.2, HBASE_MASTER_OPTS also needs the
>  -XX:MaxDirectMemorySize setting?
>
> IIRC, in Hbase 0.98, I had to set -XX:MaxDirectMemorySize less than
> hbase.bucket.cache.size --and-- I did not have to set
>  -XX:MaxDirectMemorySize for HBASE_MASTER_OPTS.
>
>
> Thanks,
> Arul
>