aboutsummaryrefslogtreecommitdiffstats
path: root/research/experiments/010-one-sync-commit
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-28 20:07:44 +0100
committereunhhu <[email protected]>2026-09-28 20:07:44 +0100
commit91754a57ad7b7a92f9935509367590db951f903b (patch)
treea71ce1100fd9ff7607ac14504b4570667aa03baa /research/experiments/010-one-sync-commit
parent5f8c14f774b81bd6d65d531035eae61b79b1d12c (diff)
downloadpure-91754a57ad7b7a92f9935509367590db951f903b.tar.gz
pure-91754a57ad7b7a92f9935509367590db951f903b.zip
Drain a link's backlog without scanning it: 370k to 990k records a second
A backlog made the link slow in its square: the sender looked at every queued record's pieces twice a turn to know whether any waited to be stored, and the receiver moved all its held records down each time it let the first one go. - The sender counts the pieces received and not stored, and keeps where the unsent ones begin; every change of a piece's state goes through one place that keeps both. - The receiver keeps its held records from a head index. One in order goes last, and one out of order finds its place by halving. The record's bytes and its pieces' marks are one allocation. - Packets go in bursts with UDP GSO, 54 at a time: 0.45 us a packet on this Pi, against 2.4 us for a send each. A full packet is padded to a whole datagram (PADDING frames, as QUIC does). Datagrams are taken 64 at a time (recvmmsg). Twenty thousand saved sends of 61 bytes drained at 370k a second; now at 990k. Per record, the sender's link thread took 1.1 us and now takes 0.5; the receiver's took 2.4 and now takes 0.5.
Diffstat (limited to 'research/experiments/010-one-sync-commit')
0 files changed, 0 insertions, 0 deletions