mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pangbingqiang <pangbingqi...@huawei.com>
Subject Optimize libprocess performance
Date Wed, 04 Jan 2017 03:31:36 GMT
Hi All:
  We use libprocess as our underlying communication library, but we find it’s performance
don’t meet, we want to optimize it, for example:
  ‘send’ function implementation one metadata has four times memory copy,
1. ProtobufMessage SerializeToString then processbase ‘encode’ construct string once;
2. In ‘encode’ function Message body copy again;
3. In MessageEncoder in order to construct HTTP Request, copy again;

4.       MessageEncoder return copy again;
  How to optimize this scenario may be useful.
  Also , in libprocess it has so many lock:

1.       SocketManager:   std::recursive_mutex mutex;

2.       ProcessManager:  std::recursive_mutex processes_mutex;  std::recursive_mutex runq_mutex;
std::recursive_mutex firewall_mutex;
In particular, everytime event enqueue/dequeue both need to get lock, maybe use lookfree struct
is better.

If have any optimize suggestion or discussion, please let me know, thanks.

[cid:image001.png@01D0E8C5.8D08F440]


Bingqiang Pang(庞兵强)


Distributed and Parallel Software Lab
Huawei Technologies Co., Ltd.
Email:pangbingqiang@huawei.com<mailto:suteng@huawei.com>



Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message