Repository navigation
Description
A Skrongle mini holds at most 8 accounts (caps::MAX_ACCOUNTS, src/caps.rs). That fits a household. It does not fit a class, which the README names as a use.
Change
Raise MAX_ACCOUNTS from 8 to 50.
Several other limits are derived from that number or were sized for it, so each needs a decision:
| Limit | Today | With 50 accounts |
|---|---|---|
Sessions (MAX_ACCOUNTS * 4) and the session cache |
32 | 200. Small rows; follows the account count |
Rate-limit keys per table (MAX_ACCOUNTS * 8) |
64 | 400. Follows the account count |
| Progress cache (one learner's rows per account) | 8 learners | 50 learners. One small row per lesson; follows the account count |
Built courses kept in memory (courses::MAX_STORES) |
8, "equal to MAX_ACCOUNTS" |
Must stay 8. A built course is megabytes, and 50 would not fit under the unit's MemoryMax=64M. A class mostly shares one course |
Open connections (MAX_CONNECTIONS) |
32, sized as "8 accounts times a browser's 6" | Needs to grow for a class that opens a page at the same moment, and stay under the unit's LimitNOFILE=256 |
Tutor replies at once (MAX_TUTOR_CALLS) |
2 | Stays 2: each holds a thread and a TLS connection. A class using the tutor together will see the busy message more often |
Not known
Nobody has run 30 or 50 learners at once on a Pi Zero 2 W. The README's memory and timing numbers were measured with a few accounts. Tutor chats, game sessions and waiting AI jobs are each held in memory one per account, so their worst case grows about six times. The docs should give the new limit without claiming a full class has been measured.
Done when
MAX_ACCOUNTSis 50 and the derived limits above are settled insrc/caps.rsandsrc/courses.rs.- Every doc that says 8 says 50, and no longer describes the limit as "a household plus a couple of guests".
CHANGELOG.mdhas an entry.
Metadata
Metadata
Assignees
Labels
No labels
Activity