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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to