Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
T
Tidal
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • PLN
  • Tidal
  • Repository

Switch branch/tag
  • Tidal
  • tools
  • parvagues-protect.sh
Find file
BlameHistoryPermalink
  • PLN (Algolia)'s avatar
    perf(protect): the guard was spending a tenth of a core to discover nothing had changed · a828d5f0
    219.1ms per 2s tick, 6 forks, with NOTHING running to protect. None of it was
    protection: three pgrep -x at 59ms each (pgrep reads cmdline for every process
    on the box, and it ran once per target), plus cat, two chrt -p reads and an
    unconditional prlimit per pid, each in its own command substitution.
    
    Now zero forks in the steady state: one bash pass over /proc/*/comm, sched from
    /proc/<pid>/stat fields 40/41, prlimit only when /proc/<pid>/limits says so.
    28.5ms/tick, 1.42% of a core at the unchanged 2s interval.
    
    The interval is deliberately untouched -- the 7.7x came from forks alone, so the
    responsiveness that re-protects scsynth before its first sound was not traded
    for battery.
    
    Verified differentially against the old pgrep path with a decoy fleet (ardour9,
    ArdourGUI, ardour-8.6 must match; ardour-decoy, sclang-notreally, scsynthx and a
    bash whose path contains 'ardour' must not) and against chrt -p / cat on live
    scsynth+sclang. Needs sudo tools/install-protect.sh to take effect.
    
    Also logs two findings from the same measurement pass: sc-watchdog restarts
    SuperDirt on every clean start (6s patience vs 8s boot) and two starts in five
    minutes hit StartLimitBurst, leaving the rig unstartable; and the other two
    reconcile loops cost 5.3% between them with real event sources available.
    PLN (Algolia) authored Sep 06, 2026
    a828d5f0
parvagues-protect.sh 12.9 KB
EditWeb IDE
×

Replace parvagues-protect.sh

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.