Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
The router-core thread processes batches of actions (the size of the action list) when it begins its main loop. When there is a large volume of traffic, these batches can be quite large (over 1000 actions has been observed). It is likely that the large batches are settlement or disposition updates of ranges of deliveries which Proton serializes into individual events.
Each settlement action results in a connection activation. This means that for large batches, the same connection may be activated hundreds of times during the processing of a single batch of actions.
This improvement makes two significant changes:
- It defers the activations until after the processing of a batch, such that each affected connection is only activated once.
- It holds off the awakening of the driver's poll loop until it has activated all of the connections.
This will result in far fewer calls into the driver by the core thread during times of high traffic volume.