Cryptograss:Moods/performance/todo

From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Jump to navigationJump to search
  • ☐
    Poll under load: who-spoke updated in place, not rebuilt; one rebuild of the emergents' settings per change, not one per tab
    code · magent
    Second ramp, after #411 + #412: 10 tabs p95 1.9 s, stopped at 25 tabs (p95 4.9 s). Idle poll 870 → 190 ms.
  • ☐
    Wiki reads off the request path: hooked pages kept until their hook (no short TTLs, warm on change); pronouns and time zones pushed on a preferences save
    code · magent
    Moved here from #interfaces at Justin's ask (6 Nov). Preferences aren't page saves, so PageSaveComplete never tells of them.
  • ☐
    Realtime Activity Bar Option A (state-flag registry with heartbeat TTL)
    code · magent
    The activity line is now the biggest cost left on every poll: 115–155 ms idle, ~500 ms under load (6 Nov).
  • ☐
    Moods page script out to a static file with a hash in its name, so a reload after a deploy that didn't touch it is cached (684 KB inline today)
    code · magent
    Item 2 of the low-hanging fruit (4 Nov). Item 1, magenta#385, merged and deployed: /api/servers/ went from 0.6–1.4 s to 18 ms (Server-Timing, block 26,350,822).
  • ☐
    Merge maybelle-config:magent/roll-keep-48, then redeploy maybelle and run the PickiPedia VPS playbook
    merge · justin
    roll_keep 48 on both sites (~half a GB a box, gzipped), so the backfill can fill a true 24-hour window and a few days of the week. Two things found while writing it: the wiki box's caddy role only validates and reloads, and Caddy keeps the log file it already opened across a reload, so the new roll_keep would have sat in the Caddyfile unapplied -- that role now restarts when the Caddyfile itself changed. And pickipedia-vps/ansible/playbook.yml is now in ci/test (the syntax check and the task-options check), which nothing covered before. Second commit 32db34fc: a window's since and full now mean how far back the box has counted, not the oldest hour that holds something -- seen live on maybelle, where the three hours said 'not full' while the day said 'full'. Third commit 3528dd68 (23 Nov, from Justin's question about the million api.php asks): only a browser is counted as a person -- mwclient, bare node and any unnamed library fell through to 'people', which put 2M asks a week in the readers' column on the wiki -- and each window now names the busiest programs behind its asks. That commit also fixes the ci/test line the second one added: it ran the syntax check from the repository root, where the shared goaccess role isn't on roles_path, so it failed; each playbook is now checked from its own directory, as the deploy runs it. 18 tests, whole ci/test green (exit 0).
  • ☐
    Run the PickiPedia VPS playbook: the wiki box still runs the old rollup while maybelle is already filling
    deploy · justin
    Checked 03:45Z: maybelle has finished its catch-up -- catching_up 0, counted since 20 Nov 00:00, 52 hours in the 7-day window and 25 in the day, so the three windows now read differently as meant. pickipedia.xyz's three windows are still empty objects, with no since, no full and no hours: the old rollup. One playbook run carries both the rollup and roll_keep 48.
  • ☐
    Merge magenta:magent/traffic-clients (the stats page draws the new 'Who asked' list), after maybelle-config:magent/roll-keep-48, then redeploy maybelle
    merge · justin
    The rollup writes the clients list, so that deploy goes first; until it does the list is empty and the page says 'nobody yet'. 12 tests in test_traffic, 2,196 in conversations.tests.
  • ☐
    Decide what to do about the signup and sign-in probes: 14,575 asks at Special:UserLogin and 11,646 at Special:CreateAccount in 46 hours, and no account created since 10 Nov
    decision · justin
    magent, 23 Nov. Anonymous createaccount is open ($wgGroupPermissions), there's no captcha extension installed, and Extension:PickiPediaInvitations is what actually stops them -- so they're burning a full MediaWiki render per probe for nothing. Robots.txt already disallows /index.php, which they ignore. Options, cheapest first: a Caddy rate limit on those two paths; close anonymous createaccount outright so the form short-circuits; leave it (it's ~26k of 1.9M, so it costs PHP rather than bandwidth). If you pick one, magent writes it.
  • ☐
    Find out which of our three mwclient callers is making ~2M asks a week to the wiki's api.php
    infra · magent
    Measured 23 Nov off the live GoAccess dashboard: mwclient/0.11.0, 1,991,561 of 3,948,972 requests 12-23 Nov -- half of everything that box serves. None of our three callers sets a user agent (blue_railroad_import/wiki_client.py, delivery-kid/pinning-service's pickipedia_client.py, maybelle/scripts/post-audit-to-wiki.py; the delivery-kid audit cron runs every 30 min), so the log can't tell them apart and the rollup drops addresses. Needs one read of the wiki box's own access log, which needs a key to 5.78.112.39 that this container doesn't hold. The fix after that is one line in each caller: mwclient takes clients_useragent, so 'ours' becomes true by construction instead of by a guessed regex.
  • ☐
  • ☐
    Verify live endpoint timings on maybelle after the perf deploys
    test · re
    Re-run the 02:15Z timings for /api/moods/ and cold room loads; re-stamp Cryptograss/Moods/Loading and prefetch (research). memory-lane/loadtest/tabs.py (magenta#412) now does the ramp; its second run (6 Nov 19:31Z): 10 tabs p95 1.9 s, stopped at 25.
Done (11)