图好像看不到?

sudo rm -rf /* <leo9...@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所使用的资源,但现在看来,好像没有生效
>
>

Reply via email to