Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Limits and Performance

This appendix documents hard limits, configurable bounds, and observed performance characteristics of the peeroxide-cli tools.

Hard Limits

ConstantValueContext
MAX_ECHO_SESSIONS64Concurrent echo sessions per announce process
HANDSHAKE_TIMEOUT5 sEcho protocol handshake timeout
IDLE_TIMEOUT30 sEcho session idle timeout
ECHO_MSG_LEN16 bytesEcho probe frame size (fixed)
ECHO_TIMEOUT (ping)5 sPer-probe timeout in ping --connect mode
MAX_CHUNKS65 535Maximum chunks in a single deaddrop message
MAX_PAYLOAD1 000 bytesMaximum payload per deaddrop chunk
ROOT_HEADER_SIZE39 bytesdeaddrop root chunk header size
NON_ROOT_HEADER_SIZE33 bytesdeaddrop non-root chunk header size
CHUNK_SIZE (cp)65 536 bytescp file chunk size
--data max (announce)1 000 bytesMaximum --data payload for announce
lookup --with-data concurrency16buffer_unordered(16) for mutable DHT gets
ping topic mode peer cap20Maximum peers probed per topic lookup

Derived Limits

Maximum deaddrop message size:

MAX_CHUNKS × MAX_PAYLOAD = 65 535 × 1 000 = ~65.5 MB

Practical limit is lower due to DHT value size constraints and network latency.

Maximum cp file size:

Limited by available DHT storage and client memory. Each 65 536-byte chunk is stored as a separate immutable DHT value. There is no hard-coded upper bound in the CLI, but very large files will require many round-trips.

Timing

ParameterValueNotes
announce refresh interval600 sBackground mutable put to keep slot alive
announce seqUnix epoch secondsTwo refreshes in the same second produce identical seq — see ISSUES.md
ping --interval default1.0 sConfigurable
ping --count default10 = infinite

Concurrency

  • lookup --with-data fetches peer data in parallel with a concurrency window of 16 (buffer_unordered(16)).
  • announce handles incoming connections concurrently; echo sessions are bounded by MAX_ECHO_SESSIONS = 64.
  • cp uploads/downloads chunks sequentially per file (parallelism may be added in future releases).

Exit Codes

CodeMeaningTools
0Success / clean shutdownall tools
1Fatal errorall tools
130SIGINT receivedlookup, ping
0SIGINT/SIGTERM receivedannounce (intentional — clean shutdown is success)

Note: announce returns 0 on SIGINT/SIGTERM because interactive shutdown is the normal workflow. lookup and ping return 130 to allow callers to distinguish interruption from success.