Kafka Cluster 2019(5)WRK Performance Testing
KafkaCluster2019(5)WRKPerformanceTesting
AverysimplescripttosupportthePOSTusingLUA
>catpost_message.lua
method="POST"
path="/kafka/topic1"
batch=10
request=function()
headers={}
headers["Content-Type"]="application/json"
body='messagesillycatfrommvc'
--print(body)
returnwrk.format(method,path,headers,body)
end
response=function(status,headers,body)
--print(status)
end
Checkthenormalservletdriver
>wrk-t4-c1000-d60s--timeout10s-s./post_message.luahttp://ubuntu-master:8082--latency
Running1mtest@http://ubuntu-master:8082
4threadsand1000connections
ThreadStatsAvgStdevMax+/-Stdev
Latency617.66ms275.77ms2.87s75.73%
Req/Sec408.14107.39737.0069.41%
LatencyDistribution
50%582.81ms
75%774.61ms
90%946.28ms
99%1.33s
97320requestsin1.00m,11.70MBread
Requests/sec:1619.96
Transfer/sec:199.43KB
ItisstrangethattheReactiveDriverdoesnothavebetterperformanceinhere
>wrk-t4-c1000-d60s--timeout10s-s./post_message.luahttp://ubuntu-master:8083--latency
Running1mtest@http://ubuntu-master:8083
4threadsand1000connections
ThreadStatsAvgStdevMax+/-Stdev
Latency1.55s792.12ms9.90s93.56%
Req/Sec268.95269.731.49k84.05%
LatencyDistribution
50%1.43s
75%1.65s
90%2.03s
99%5.48s
37386requestsin1.00m,3.07MBread
Socketerrors:connect0,read0,write0,timeout109
Requests/sec:622.27
Transfer/sec:52.26KB
References: