Is it possible pro profile layers in gRPC?

124 views
Skip to first unread message

Sergey Shalnov

unread,
Aug 31, 2016, 10:54:32 AM8/31/16
to grpc.io

Hi,
I would like to get gRPC performance profile by group of the functions or layers.

I tried to used built-in performance profiling by ${grpc}/tools/profiling/latency_profile/profile_analyzer.py and got the final index.html with a lot of numbers. I assume these numbers are for particular functions with some kind of hierarchy.


I would like to get simple profile with internal gRPC layers like:


Protobuf serialize and upper - %

Chttp2 layer - %

Tcp endpoint - %

 

I tried to implement my own profile code and it works well with transport layer but doesn’t with upper layers. I suspect this related to wrong functions I chose for profiling in upper layers.

 

Could you please recommend how I can get desired profile?

 

Thank you

Sergey


Sergey Shalnov

unread,
Sep 1, 2016, 1:17:35 AM9/1/16
to grpc.io
Let's simplify the question.
What functions are belongs to the chttp2 transport layer?
I see lot of different functions in different C sources and directories tree. Many of them calls to each other at the same layer.
Could you recommend me which functions used as "top" interface to chttp2 to take them into account in profiling?
Thank you
Sergey

Carl Mastrangelo

unread,
Sep 13, 2016, 7:15:02 PM9/13/16
to grpc.io
Why not just run your code with 'perf' and look at the output?  That would give you a good idea of roughly where the time is being spent.  (and give you insight into how much time is spent in the kernel)

Sergey Shalnov

unread,
Sep 13, 2016, 11:41:49 PM9/13/16
to grpc.io
Carl,
Because perf provides performance profile by functions. I need profile by group of the functions (layers).
I solved this issue by implementing custom profile timers.
Sergey
Reply all
Reply to author
Forward
0 new messages