You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2020/05/06 07:45:53 UTC

[GitHub] [incubator-brpc] rickonji opened a new issue #1108: 开启tcmalloc几乎无性能提升?

rickonji opened a new issue #1108:
URL: https://github.com/apache/incubator-brpc/issues/1108


   用`wrk`压测了下example里提供的http_c++样例。
   简单修改成了echo server:
   ```
   class HttpServiceImpl : public HttpService {
   public:
       ......
       void Echo(google::protobuf::RpcController* cntl_base,
                 const HttpRequest*,
                 HttpResponse*,
                 google::protobuf::Closure* done) {
           brpc::ClosureGuard done_guard(done);
   
           brpc::Controller* cntl =
               static_cast<brpc::Controller*>(cntl_base);
           cntl->http_response().set_content_type("text/plain");
           butil::IOBufBuilder os;
           os << "\nbody: " << cntl->request_attachment() << '\n';
           os.move_to(cntl->response_attachment());
       }
   };
   ```
   
   Makefile里使用NEED_GPERFTOOLS控制是否开启tcmalloc。
   机器:centos,64G内存,32核物理机
   服务端使用8c,8个edisp,命令如下:
   ```
   ./http_server -num_threads=8 -event_dispatcher_num=8
   ```
   压测端命令:
   ```
   ./wrk -t 20 -c 1000 -s ./post.lua -d 60s --latency http://xxxxx:8010/hello
   ```
   测试结果:
   开不开tcmalloc都是47w qps
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] rickonji commented on issue #1108: 开启tcmalloc几乎无性能提升?

Posted by GitBox <gi...@apache.org>.
rickonji commented on issue #1108:
URL: https://github.com/apache/incubator-brpc/issues/1108#issuecomment-624998385


   没有挑战的意思哈,就是想问下原因,或者怎么解决。比如是不是对tcmalloc的版本有要求。感觉开不开tcmalloc没变化很奇怪


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] jamesge commented on issue #1108: 开启tcmalloc几乎无性能提升?

Posted by GitBox <gi...@apache.org>.
jamesge commented on issue #1108:
URL: https://github.com/apache/incubator-brpc/issues/1108#issuecomment-626522804


   @rickonji 确认下server确实开启了tcmalloc,方式是看下http_server的/hotspots/cpu或/hotspots/heap是否可访问


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] gydong commented on issue #1108: 开启tcmalloc几乎无性能提升?

Posted by GitBox <gi...@apache.org>.
gydong commented on issue #1108:
URL: https://github.com/apache/incubator-brpc/issues/1108#issuecomment-624997837


   这个测试场景太简单了,说明不了什么问题


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] zhijunfu commented on issue #1108: 开启tcmalloc几乎无性能提升?

Posted by GitBox <gi...@apache.org>.
zhijunfu commented on issue #1108:
URL: https://github.com/apache/incubator-brpc/issues/1108#issuecomment-626447746


   这个取决于场景的,tcmalloc适合于大量的小块内存分配


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org