about support protobuf arena
#535 麻烦看下这个实现是否可以被接受,当前先只改了baidu rpc protocol。
赞,好奇有多少的性能提升?
在大包情况下,自测发现对于性能提升还是比较明显的。
support_pb_arena分支测试结果:
master分支测试结果:

测试条件: 机器:8核 Intel(R) Xeon(R) Platinum 8255C CPU @ 2.50GHz protobuf版本:v3.6.1 压测工具:rpc_press thread_num=50 协议:
syntax="proto2";
package example;
option cc_generic_services = true;
message Obj {
optional uint64 val = 1;
};
message EchoRequest {
required string message = 1;
repeated double array = 2;
repeated Obj objs = 3;
};
message EchoResponse {
required string message = 1;
repeated double array = 2;
repeated Obj objs = 3;
};
service EchoService {
rpc Echo(EchoRequest) returns (EchoResponse);
};
server处理逻辑:
response->set_message(request->message());
for (int i = 0; i < request->array_size(); ++i) {
response->add_array(request->array(i));
}
for (int i = 0; i < request->objs_size(); ++i) {
auto o = response->add_objs();
o->set_val(request->objs(i).val());
}
压测input:
{
"message":"xxx......",
"array":[2.9,2.9,......],
"objs":[{"val":10},......]
}
message字符串长度16384 array包含8192个double objs包含8192个对象
大包看起来效果不错,方便看下不同包大小的场景下(比如16B,32B,64B,128B,256B,512B...)的性能差异么,这些包更典型些
好,我补充下这块的数据
请问这个pr没合入是还存在什么问题么?
请问这个pr没合入是还存在什么问题么?
现在可以使用 https://github.com/apache/brpc/pull/2718 中提供的功能,通过自定义RpcPBMessageFactory来支持arena
请问这个pr没合入是还存在什么问题么?
@limindlmu 可以看看#2751 。
Closed this as completed #2751 .