You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@hbase.apache.org by sudo rm -rf /* <le...@qq.com> on 2020/06/03 02:26:26 UTC
回复: HBase资源隔离队列参数貌似不生效
调完参数后,线程的初始化状态
测试代码运行线程的状态
我们的CPU立马升高了
看看能不能看到图片,感谢张老师
------------------ 原始邮件 ------------------
发件人: "张铎(Duo Zhang)"<palomino219@gmail.com>;
发送时间: 2020年6月3日(星期三) 上午10:22
收件人: "user-zh"<user-zh@hbase.apache.org>;
主题: Re: HBase资源隔离队列参数貌似不生效
图好像看不到?
sudo rm -rf /* <leo9547@qq.com> 于2020年6月3日周三 上午10:00写道:
> 配置了队列隔离参数,参数如下:
> hbase.regionserver.handler.count 30
> hbase.ipc.server.callqueue.handler.factor 1
> hbase.ipc.server.callqueue.read.ratio 0.5
> hbase.ipc.server.callqueue.scan.ratio 0.1
>
> 这样我控制scan的线程为1,
> 此时,查看线程的分配情况
>
>
> 接着下运行测试代码,只有scan的操作。
> from happybase import ConnectionPool
> import time
>
> pool = ConnectionPool(size=1, host='ip', port=9090, timeout=2000)
> for i in range(200):
> start = time.time()
> try:
> with pool.connection(2000) as con:
> table = con.table("table_name")
> res = list(table.scan(filter="PrefixFilter('273810955|')",
>
> row_start='\x0f\x10&R\xca\xdf\x96\xcb\xe2\xad7$\xad9khE\x19\xfd\xaa\x87\xa5\xdd\xf7\x85\x1c\x81ku
> ^\x92k',
> limit=3))
> except Exception as e:
> pass
> end = time.time()
> print 'timeout: %d' % (end - start)
>
> 此时线程的运行情况
>
> 此时我们的CPU占用,已经被跑满了
> 为什么我配置了队列隔离,只运行scan操作,还会有请求占用get的处理线程,我们的目的是想要限制scan所使用的资源,但现在看来,好像没有生效
>
>