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

Aaron Smith commented on PROTON-1910:
-------------------------------------

For the send side, the top three are _Cfunc_pn_message, 
_Cfunc_pn_message_encode, _Cfunc_pn_message_free.

This is when the test client is sending 10k messages second with a buffer size 
of 50 on the receive side.

----------------------------------------------------------+-------------
 flat flat% sum% cum cum% calls calls% + context 
----------------------------------------------------------+-------------
 0.58s 27.36% | qpid.apache.org/amqp._Cfunc_pn_message
 0.58s 27.36% | qpid.apache.org/amqp._Cfunc_pn_message_encode
 0.33s 15.57% | qpid.apache.org/amqp._Cfunc_pn_message_free
 0.11s 5.19% | qpid.apache.org/proton.makeEvent
 0.07s 3.30% | qpid.apache.org/electron.(*sender).SendAsyncTimeout.func1
 0.04s 1.89% | qpid.apache.org/amqp._Cfunc_pn_data_put_binary
 0.03s 1.42% | qpid.apache.org/proton.makeEvent.func4
 0.02s 0.94% | qpid.apache.org/proton._Cfunc_pn_collector_peek
 0.01s 0.47% | qpid.apache.org/amqp.clearMarshal
 1.95s 35.39% 35.39% 2.12s 38.48% | runtime.cgocall
 0.14s 6.60% | runtime.exitsyscall
 0.03s 1.42% | runtime.entersyscall

> Profiling indicates that cgo becomes a bottleneck during scale testing of 
> electron
> ----------------------------------------------------------------------------------
>
>                 Key: PROTON-1910
>                 URL: https://issues.apache.org/jira/browse/PROTON-1910
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: go-binding
>    Affects Versions: proton-c-0.24.0
>            Reporter: Aaron Smith
>            Assignee: Alan Conway
>            Priority: Major
>
> While performing scale testing, detailed profiling of Go test clients showed 
> that >95% of the execution time can be devoted to the cgo call.  The issues 
> seems to be related on sends to the NewMessage() call.  For receives, the 
> bottleneck is both NewMessage() and the call to actually receive the message. 
>  
>  
> This behavior is not unexpected as CGO is a well-known bottleneck.  Would it 
> be possible to have a NewMessage() call that return multiple messages and a 
> recv call that took an "At most" argument.  i.e. recv(10) would receive 10 or 
> fewer messages that might be waiting in the queue.  Also, it would be nice to 
> be able to trade latency for throughput in that the callback wasn't triggered 
> until N messages were recieved (with timeout)....



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to