qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ken Giusti (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-6255) [amqp1.0] Migrate to the new Proton event API
Date Wed, 10 Dec 2014 14:22:12 GMT

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

Ken Giusti commented on QPID-6255:
----------------------------------

I think I can account for the performance difference:

I did a callgrind analysis of the two different approaches (polled vs. event) and the 'instruction
cost' of the event implementation is a little more than an order of magnitude higher (0.35%
vs 0.02% as a percentage of the total instruction count).

Digging a little further it turns out that the event handler is actually discarding about
50% of the received events.  About 1/4 of the total events are PN_TRANSPORT events, which
the driver ignores (pending output is checked later in the code).  The really interesting
bit is that there is a PN_LINK_FLOW for _every_ transmitted frame!   The actual on-the-wire
flow frames are much less (like 100x less).

The engine emits a PN_LINK_FLOW from two points in the code: when a flow frame arrives, and
when credit is consumed (a transfer is done).  IMHO, these are two semantically different
events.  I would argue that they should be treated as such.

I've hacked a local copy of proton to stop emitting PN_LINK_FLOW events on credit consumption,
and PN_TRANSPORT events entirely and the resulting performance improvements bring it to parity
with the polled approach.

I think if Proton allowed event filtering (so we could avoid the PN_TRANSPORT events) and
split the flow events into two separate events we could improve this patch.    I'll raise
this on the mailing list.

> [amqp1.0] Migrate to the new Proton event API
> ---------------------------------------------
>
>                 Key: QPID-6255
>                 URL: https://issues.apache.org/jira/browse/QPID-6255
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Broker
>    Affects Versions: 0.30
>            Reporter: Ken Giusti
>            Assignee: Ken Giusti
>             Fix For: Future
>
>
> Proton version 0.8 introduced an event-based API.  The Qpid broker currently uses the
older API which requires a linear search of deliveries, links, and sessions during event processing.
 Migrating to the new API _should_ optimize event processing, especially as the number of
object instances scale.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message