8000 Hold up to 50 accounts, so a class fits · Issue #133 · alexbeeken/skrongle-mini · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Hold up to 50 accounts, so a class fits #133

Closed

Description

@alexbeeken

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_ACCOUNTS is 50 and the derived limits above are settled in src/caps.rs and src/courses.rs.
  • Every doc that says 8 says 50, and no longer describes the limit as "a household plus a couple of guests".
  • CHANGELOG.md has an entry.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0