You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As can be seen in #314#329, the cost of skipping sentmap entries is a cost in ACK processing. At the moment, quicly iterates from the beginning of the sentmap twice per every ACK frame it receives, first when it processes the PNs being acked, then when it detects loss.
One way of moving forward is reducing the cost of iteration. #314 is an attempt that belongs to that category.
While that approach is fine by itself, I think we should consider how we can stop iterating through sentmap entries just to skip. And I think such an optimization would be possible.
We can assume that in almost all cases, the smallest PN carried by ACK frames would monotonically increase. We can depend on that and cache a tuple of (previous_smallest_pn, address_of_entry_corresponding_to_previous_smallest_pn). Then, we can almost always start iterating from that entry. Doing so entirely avoids the cost of skipping.
We could do the same for loss detection, by remembering the address of the sentmap entry corresponding to the smallest PN that is still considered inflight (or to the largest PN that has been deemed lost).
FWIW, when running PR #331 on a high-speed, low-latency, congested network, the CPU cost of quicly_sentmap_skip is 1.42% of the total.
The text was updated successfully, but these errors were encountered:
As can be seen in #314 #329, the cost of skipping sentmap entries is a cost in ACK processing. At the moment, quicly iterates from the beginning of the sentmap twice per every ACK frame it receives, first when it processes the PNs being acked, then when it detects loss.
One way of moving forward is reducing the cost of iteration. #314 is an attempt that belongs to that category.
While that approach is fine by itself, I think we should consider how we can stop iterating through sentmap entries just to skip. And I think such an optimization would be possible.
We can assume that in almost all cases, the smallest PN carried by ACK frames would monotonically increase. We can depend on that and cache a tuple of (previous_smallest_pn, address_of_entry_corresponding_to_previous_smallest_pn). Then, we can almost always start iterating from that entry. Doing so entirely avoids the cost of skipping.
We could do the same for loss detection, by remembering the address of the sentmap entry corresponding to the smallest PN that is still considered inflight (or to the largest PN that has been deemed lost).
FWIW, when running PR #331 on a high-speed, low-latency, congested network, the CPU cost of
quicly_sentmap_skip
is 1.42% of the total.The text was updated successfully, but these errors were encountered: