Repository navigation
ci: congestion control and qlog overrides for relay deploy #778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4948543
2a9925c
27cf640
5248277
5b043cc
4dba149
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -33,6 +33,12 @@ | |||||
| # MOQX_RECV_PKTS — mvfst max_server_recv_packets_per_loop (default: 256) | ||||||
| # MOQX_UDP_BUFFER — relay UDP socket buffer bytes (default: net.core.wmem_max) | ||||||
| # MOQX_IGNORE_PATH_MTU — send full-size packets, skip PMTU (default: false) | ||||||
| # MOQX_CC — mvfst listener congestion control (default: bbr; | ||||||
| # bbr|bbr2|bbr2modular|copa|cubic|newreno|none) | ||||||
| # MOQX_PICO_CC — picoquic listener congestion control (default: bbr; | ||||||
| # bbr|bbr1|c4|cubic|dcubic|fast|newreno|prague|reno) | ||||||
| # MOQX_BBR_SKIP_PROBE_RTT — mvfst bbr: skip PROBE_RTT while app-limited | ||||||
| # (default: false) | ||||||
| # MOQX_JEMALLOC — LD_PRELOAD jemalloc (~10% speedup). "auto" (default) | ||||||
| # probes the multiarch paths; off/false/0 uses the | ||||||
| # system allocator; an explicit path forces that lib. | ||||||
|
|
@@ -41,6 +47,11 @@ | |||||
| # MOQX_LOGGING — folly XLOG config for the whole stack (empty = baseline INFO); | ||||||
| # e.g. DBG2 or "INFO,quic=WARN". moqx promotes it to folly's | ||||||
| # FOLLY_LOGGING env var internally. See docs/logging.md. | ||||||
| # MOQX_QLOG_SAMPLE — fraction of new mvfst connections to qlog, 0.0–1.0 | ||||||
| # (default: 0 = none). Fetch a file with the admin | ||||||
| # /logs?connection_id=<dcid>&type=qlog route. | ||||||
| # MOQX_QLOG_DIR — qlog directory (default: /var/log/moqx/qlog); files older | ||||||
| # than 3 days are deleted at startup. | ||||||
| set -e | ||||||
|
|
||||||
| # The whole stack logs via folly XLOG (configured by MOQX_LOGGING, handled in the | ||||||
|
|
@@ -114,6 +125,9 @@ export MOQX_SEND_PKTS="${MOQX_SEND_PKTS:-16}" | |||||
| export MOQX_RECV_PKTS="${MOQX_RECV_PKTS:-256}" | ||||||
| export MOQX_UDP_BUFFER="${MOQX_UDP_BUFFER:-$(cat /proc/sys/net/core/wmem_max 2>/dev/null || echo 1048576)}" | ||||||
| export MOQX_IGNORE_PATH_MTU="${MOQX_IGNORE_PATH_MTU:-false}" | ||||||
| export MOQX_CC="${MOQX_CC:-bbr}" | ||||||
| export MOQX_PICO_CC="${MOQX_PICO_CC:-bbr}" | ||||||
| export MOQX_BBR_SKIP_PROBE_RTT="${MOQX_BBR_SKIP_PROBE_RTT:-false}" | ||||||
|
|
||||||
| # Second (picoquic) listener for dual-stack serving. Opt out with | ||||||
| # MOQX_PICO_ENABLE=false. picoquic needs real TLS, so it is auto-disabled under | ||||||
|
|
@@ -140,13 +154,22 @@ if [ "$MOQX_PICO_ENABLE" = "true" ]; then | |||||
| key_file: "${MOQX_KEY}" | ||||||
| insecure: ${MOQX_INSECURE} | ||||||
| endpoint: "${MOQX_ENDPOINT}" | ||||||
| quic: | ||||||
| cc_algo: ${MOQX_PICO_CC} | ||||||
| PICO | ||||||
| ) | ||||||
| else | ||||||
| MOQX_PICO_LISTENER="" | ||||||
| fi | ||||||
| export MOQX_PICO_LISTENER | ||||||
|
|
||||||
| case "${MOQX_QLOG_SAMPLE:-}" in off|"") MOQX_QLOG_SAMPLE=0 ;; esac | ||||||
| export MOQX_QLOG_SAMPLE | ||||||
| export MOQX_QLOG_DIR="${MOQX_QLOG_DIR:-/var/log/moqx/qlog}" | ||||||
| if [ -d "$MOQX_QLOG_DIR" ]; then | ||||||
| find "$MOQX_QLOG_DIR" -name '*.qlog' -mmin +4320 -delete 2>/dev/null || true | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/sh
find --version 2>&1 | head -n 1 || true
tmp=$(mktemp -d)
trap 'rm -rf "$tmp"' EXIT
touch -d '72 hours 30 seconds ago' "$tmp/boundary.qlog"
echo 'Matches with +4320:'
find "$tmp" -maxdepth 1 -type f -name '*.qlog' -mmin +4320 -print
echo 'Matches with +4319:'
find "$tmp" -maxdepth 1 -type f -name '*.qlog' -mmin +4319 -printRepository: openmoq/moqx Length of output: 217 🏁 Script executed: #!/bin/bash
set -u
printf '%s\n' '--- PR diff ---'
git diff --no-ext-diff --unified=8 ddc415f3ddba9f6ebdc15e27aaec9fcd7f60a12d 5b043cc580d394d6d039e035416d623f8586ca5d -- docker/entrypoint.sh
printf '%s\n' '--- Docker files ---'
git ls-files 'docker/**'
printf '%s\n' '--- find / base-image references ---'
rg -n -C 3 '(^FROM |apt.*findutils|findutils|busybox|entrypoint\.sh)' docker --glob 'Dockerfile*' --glob '*.sh' --glob '*.yml' --glob '*.yaml' || true
printf '%s\n' '--- focused GNU find boundary probe ---'
tmp=$(mktemp -d)
now=$(date +%s)
for offset in 4319 4320 4320.5 4320.99 4321 4321.5; do
secs=$(python3 -c 'import sys; print(int(float(sys.argv[1])*60))' "$offset")
f="$tmp/age_${offset}.qlog"
touch -d "@$((now-secs))" "$f"
printf 'age target=%s min mtime=%s\n' "$offset" "$(stat -c %y "$f")"
for threshold in 4319 4320; do
if find "$tmp" -maxdepth 1 -type f -name "age_${offset}.qlog" -mmin "+$threshold" -print -quit | grep -q .; then
printf ' +%s: match\n' "$threshold"
else
printf ' +%s: no match\n' "$threshold"
fi
done
done
rm -rf "$tmp"Repository: openmoq/moqx Length of output: 11932 🏁 Script executed: #!/bin/bash
set -u
printf '%s\n' '--- relay image install and entrypoint ---'
sed -n '88,120p' docker/Dockerfile
sed -n '158,176p' docker/entrypoint.sh
printf '%s\n' '--- shell find identity ---'
command -v find
find --version 2>&1 | head -n 2
printf '%s\n' '--- exact mtime probe via Python ---'
python3 - <<'PY'
import os, pathlib, subprocess, tempfile, time
with tempfile.TemporaryDirectory() as d:
root = pathlib.Path(d)
for label, age in (
("4319m30s", 4319 * 60 + 30),
("4320m00s", 4320 * 60),
("4320m30s", 4320 * 60 + 30),
("4320m59s", 4320 * 60 + 59),
("4321m00s", 4321 * 60),
):
p = root / (label + ".qlog")
os.utime(p, (time.time() - age, time.time() - age)) if p.exists() else p.touch()
target = time.time() - age
os.utime(p, (target, target))
actual_age = time.time() - p.stat().st_mtime
matches = {}
for threshold in (4319, 4320):
r = subprocess.run(
["find", d, "-maxdepth", "1", "-type", "f", "-name", p.name,
"-mmin", f"+{threshold}", "-print"],
text=True, capture_output=True, check=True,
)
matches[threshold] = bool(r.stdout.strip())
print(f"{label}: actual_age_seconds={actual_age:.3f}, matches={matches}")
PYRepository: openmoq/moqx Length of output: 2495 🌐 Web query:
💡 Result: 🌐 Web query:
💡 Result: 🌐 Web query:
💡 Result: 🌐 Web query:
💡 Result: Use a cutoff that includes files exactly 72 hours old. GNU Suggested fix- find "$MOQX_QLOG_DIR" -name '*.qlog' -mmin +4320 -delete 2>/dev/null || true
+ find "$MOQX_QLOG_DIR" -name '*.qlog' -mmin +4319 -delete 2>/dev/null || true📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| fi | ||||||
|
|
||||||
| CONFIG=/tmp/relay.yaml | ||||||
| envsubst < /usr/local/share/moqx/config.docker.yaml > "$CONFIG" | ||||||
|
|
||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.