[ 
https://issues.apache.org/jira/browse/MESOS-9896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16967948#comment-16967948
 ] 

Benjamin Mahler commented on MESOS-9896:
----------------------------------------

At least for the serialized protobuf to serialized json conversion, the 
provided conversion function appears to be extremely slow:

{noformat}
Before:
v0 '/state' response took 6.549942141secs
v1 'master::call::GetState' application/x-protobuf response took 
24.081624381secs
v1 'master::call::GetState' application/json response took 22.760332466secs

After:
v0 '/state' response took 7.57313099secs
v1 'master::call::GetState' application/x-protobuf response took 5.240223816secs
v1 'master::call::GetState' application/json response took 1.76133347258333mins
{noformat}

These are numbers from a change where we directly serialize v1 GetState to 
protobuf, and then use protobuf's {{BinaryToJsonString(...)}} utility to 
convert to json. So it might not be possible to use the built-in facilities in 
lieu of jsonify.

> Consider using protobuf provided json conversion facilities rather than 
> custom ones.
> ------------------------------------------------------------------------------------
>
>                 Key: MESOS-9896
>                 URL: https://issues.apache.org/jira/browse/MESOS-9896
>             Project: Mesos
>          Issue Type: Task
>          Components: stout
>            Reporter: Benjamin Mahler
>            Priority: Major
>              Labels: foundations
>
> Currently, stout provides custom JSON to protobuf conversion facilities, some 
> of which use protobuf reflection.
> When upgrading protobuf to 3.7.x in MESOS-9755, we found that the v0 /state 
> response of the master slowed down, and it appears to be due to a performance 
> regression in the protobuf reflection code.
> We should file an issue with protobuf, but we should also look into using the 
> json conversion code that protobuf provides to see if that can help avoid the 
> regression. It may be the case that using the built-in facilities actually 
> provides a significant performance benefit, given they don't use reflection.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to