• src/sbbs3/sexyz.c

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Thu Jul 23 23:03:46 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/1672d1f70b2d5f2f14c794c4
    Modified Files:
    src/sbbs3/sexyz.c
    Log Message:
    sexyz: batch ZMODEM output into the ring buffer to fix send throughput

    The transmit path fed the output ring buffer one byte at a time via send_byte(), so the protocol thread and the draining output_thread
    ping-ponged over tiny amounts: a 32 MB send made ~2.3 million futex calls
    and ~409 K writes averaging ~84 bytes. lrzsz and SyncTERM, which buffer
    their output, ran several times faster over the same protocol.

    Accumulate escaped output in a per-session buffer and push it into the
    ring one subpacket-sized span at a time (on the zmodem flush callback, or
    when the buffer fills). The output_thread and its asynchronous socket
    draining are kept intact: that asynchrony is what lets the protocol thread service ZRPOS on the back-channel during error recovery, so removing the
    thread (measured) stalled lossy transfers.

    Results, sending to lrz over a localhost socket:
    - 32 MB send: ~2.3 M -> ~12 K futex calls, ~409 K -> ~4 K writes (~8 KB ea)
    - 256 MB steady-state send: ~11 -> ~66 MB/s
    - error-recovery time under injected bit errors: unchanged (~50 s)
    - receiver throughput: unchanged (~130 MB/s)

    The remaining gap to lrzsz (~204 MB/s) is zmodem.c's per-byte send_byte-callback overhead, addressed separately.

    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Thu Jul 23 23:03:46 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/da546fbe1bd20ff1754e49b6
    Modified Files:
    src/sbbs3/sexyz.c
    Log Message:
    Revert "sexyz: batch ZMODEM output into the ring buffer to fix send throughput"

    This reverts commit 4e671c75640ccf8248ea9b3822df2d0a08f4f6c9.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net