[ 
https://issues.apache.org/jira/browse/KYLIN-3601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16649978#comment-16649978
 ] 

Ma Gang commented on KYLIN-3601:
--------------------------------

I use apache ab to do some test: ab -n 100000 -c 2 -T 
'application/json;charset=UTF-8' -p query_request.json -A ****  
[http://localhost/kylin/api/query]

the result is:

Document Path:          /kylin/api/query

Document Length:        951 bytes

 

Concurrency Level:      2

Time taken for tests:   739.392 seconds

Complete requests:      10000

Failed requests:        3746

   (Connect: 0, Receive: 0, Length: 3746, Exceptions: 0)

Write errors:           0

Non-2xx responses:      30

Total transferred:      13928764 bytes

Total POSTed:           4610461

HTML transferred:       9728194 bytes

Requests per second:    13.52 [#/sec] (mean)

Time per request:       147.878 [ms] (mean)

Time per request:       73.939 [ms] (mean, across all concurrent requests)

 

the log in kylin server side is:

2018-10-15 09:07:40,448 DEBUG [Query 2f60cebe-3b9f-432a-b971-7d2285e2e25c-615] 
service.QueryService:664 : 
BorrowedCount:20737,DestroyedCount:62,CreatedCount:70,ReturnedCount:20737,IdleCount:8,ActiveCount:

0

 

> The max connection number generated by the PreparedContextPool is 
> inconsistent with the configuration.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: KYLIN-3601
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3601
>             Project: Kylin
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: v2.5.0
>            Reporter: huaicui
>            Priority: Major
>         Attachments: FirstResponseDistribute.jpg, 
> SixthResponseDistribute.jpg, image-2018-09-28-15-14-00-288.png, image.png
>
>
> 因为并发性能不够,使用了magang提供的PrepareStatement方法进行测试。性能有所有提高,但随着测试次数的增加,吞吐率会越来越低而且数据超时也越来越多。经过修改代码在queryAndUpdateCache最后返回前加入日志打印:logger.debug("BorrowedCount:"+preparedContextPool.getBorrowedCount()
>  +",DestroyedCount:"+preparedContextPool.getDestroyedCount()
>  +",CreatedCount:"+preparedContextPool.getCreatedCount()
>  +",ReturnedCount:"+preparedContextPool.getReturnedCount()
> 同时配置文件加入该配置:
> kylin.query.statement-cache-max-num-per-key=200
>  
>  
> 日志显示,当同一sql并发一段时间后,PreparedContextPool创建了越来越多PrepareStatement,并没有进行阻塞后续来的请求。
> !image-2018-09-28-15-14-00-288.png!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to