为什么我用kafka.javaapi.producer.Producer写的producer速度才19k msg/s ,配置参数如下 [mw_shl_code=applescript,true]metadata.broker.list=actcdh162:9092,actcdh163:9092,actcdh164:9092,actcdh165:9092
request.required.acks=0
message.send.max.retries=0
batch.size=2048
num.network.threads=3
producer.type=async
batch.num.messages=5000
queue.enqueue.timeout.ms=300
queue.buffering.max.ms=1000
queue.buffering.max.messages=1000000
serializer.class=kafka.serializer.StringEncoder[/mw_shl_code]
用kafka.clients.producer.KafkaProducer写的producer速度为36k msg/s ,参数设置如下
[mw_shl_code=applescript,true]bootstrap.servers=actcdh100:9092,actcdh101:9092,actcdh102:9092,actcdh103:9092,actcdh104:9092,actcdh105:9092,actcdh106:9092
acks=0
retries=0
batch.size=102400
linger.ms=10
buffer.memory=67108864
compression.type=none
key.serializer=org.apache.kafka.common.serialization.StringSerializer
value.serializer=org.apache.kafka.common.serialization.StringSerializer
[/mw_shl_code]
离网上那些性能测试的数据还差了好多...
|