Skip to content

local-efficiency 0.13.1: borrow idle permits after 5 seconds instead of 20 - #42

Merged
0thernet merged 1 commit into
mainfrom
perf/lending-grace-1128
Nov 28, 2026
Merged

0thernet merged 1 commit into
mainfrom
perf/lending-grace-1128

Conversation

@0thernet

@0thernet 0thernet commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Summary

  • host-run's lending wait drops from 20 seconds to 5. Long, nearly idle holders such as soaks can keep every CPU permit held for hours, and each new run then waited the full 20 seconds before borrowing, even while most cores were idle.
  • The room check is unchanged: the cores the run would use plus 20% of all cores must be idle, at least 25% of memory must be free, and a loan from the last 90 seconds still counts at its full share. Those, not the wait, keep a burst of loans in check.
  • The first measurement now covers the 5-second wait. Later measurements still come every 15 seconds.
  • Version 0.13.1, with a changelog entry and the SKILL.md sentence updated.
  • Trade-off: the old wait was longer than the longest poll interval, so runs already waiting always measured before a newcomer could borrow. Now a newcomer can take that room first. A heavy run that has waited longer may lose a loan to a newer shared run, but it keeps its place in the ordinary queue.

Tests

  • lending.test.ts pins the new default.
  • bun run check passes (303 tests).

🤖 Generated with Claude Code

…of 20

Long, nearly idle holders such as soaks can keep every CPU permit held for
hours. Each new run then waited the full 20 seconds before it could borrow,
even while most cores sat idle. The wait is now 5 seconds. The room check
is unchanged: the cores the run would use plus 20% of all cores must be
idle, at least 25% of memory must be free, and a loan from the last 90
seconds still counts at its full share.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@0thernet
0thernet merged commit e004882 into main Nov 28, 2026
7 checks passed
@0thernet
0thernet deleted the perf/lending-grace-1128 branch November 28, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant