mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-11 08:47:33 +00:00
feat(amy): AMY_RELAY_SUB_CAP env override for the per-relay sub cap
Phase-B throughput plateaus at ~100-150 users/s at every crawl scale while CPU/FDs/network sit idle, pointing at the per-relay 16-permit gates on the hot backbone/fallback relays every batch touches. The 16-vs-100 benchmark that chose the default predates the multithreaded-crawl fix, so expose the starting cap for A/B runs; the NOTICE/CLOSED demotion ladder still protects relays that push back. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013zEYRGKF943RgLaHTViJaB
This commit is contained in:
@@ -220,7 +220,11 @@ class Context(
|
||||
// on a from-scratch GrapeRank crawl than the old 100 (which drowned
|
||||
// damus/nos.lol in 100 concurrent giant REQs) at equal completeness, and
|
||||
// is still generous for the single-user fetches other amy commands do.
|
||||
startCap = 16,
|
||||
// AMY_RELAY_SUB_CAP overrides for experiments — the crawl's Phase-B
|
||||
// throughput plateaus on hot-relay permit queues, and the 16-vs-100
|
||||
// benchmark predates the multithreaded-crawl fix, so the sweet spot may
|
||||
// sit higher; relays that complain still get demoted down the ladder.
|
||||
startCap = System.getenv("AMY_RELAY_SUB_CAP")?.toIntOrNull()?.coerceIn(1, 100) ?: 16,
|
||||
).also { client.addConnectionListener(it) }
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user