Skip to content

Pinax 0.6.0: where storage is heading

Choose a tag to compare

@robert-mcdermott robert-mcdermott released this 28 Oct 23:28
· 78 commits to main since this release
4a537c1

Sixth release (wave 6, "where storage is heading"): forecasts. Every history carries a forecast of its size for
the next twelve months, the trend of its last six months of scans with a range and a backtest; administrators see
how much each filesystem holds and the month it fills at its trend; and lab members see what their labs will pay
over the next twelve months. Also in this release: labs and departments managed in the app, guidance for operating
Pinax, and time limits and new and removed files recorded at ingest, for filesystems of two billion files. Next
are cleanup plans (0.7.0). See pinax-spec/roadmap.md.

Upgrading from 0.5.0: indexes are now version 5; older ones still answer, comparing files when asked, and
pinax rebuild --outdated adds the new and removed files to them. The catalog gains a capacity table, created at
start-up. pinax scan writes pinax.json (what the storage reports) beside each new scan's manifest; scans made
before, or with fs-inventory directly, have none, so set capacities on Capacity. New settings:
PINAX_QUERY_TIMEOUT (180), PINAX_WIDE_QUERIES (2), and PINAX_FILL_WARNING_MONTHS (12). Behind oauth2-proxy,
set upstream_timeout above the query timeout (deploy/oauth2-proxy/pinax.cfg has 5 minutes).

Added

  • Forecasts of size. Every history comes with where the place is heading over the next twelve months: a
    straight-line trend through the last six months of scans (the median of the slopes between pairs of scans, so
    one odd scan barely moves it), carried forward from the latest scan, with a range and a backtest (what the same
    method forecast three months earlier, against the size now). A step, such as a cleanup, starts the trend again;
    a forecast needs six scans over eight weeks. History draws it after the last scan, as a dashed line over
    the shaded range, with In a year beside the other figures, a table of the months ahead, and the reason when
    there is none; the history CSV adds the months ahead (kind is scan or forecast). /api/history returns it
    as forecast.
  • Capacity, and when each filesystem fills. Capacity (for administrators) shows how much each filesystem
    holds, how much is used, its growth per month, and the month it fills at its trend, with the earliest and
    latest within the range. pinax scan records what the storage reports for the filesystem (statvfs, in
    pinax.json beside the scan's manifest), and an administrator can set the capacity from a day on instead,
    including an expansion scheduled ahead (audited). Use is measured by the storage's own figure where scans have
    it, else space on disk. The overview shows each filesystem's share used and when it fills, and flags one that
    fills within PINAX_FILL_WARNING_MONTHS (12); a filesystem's History draws its capacity and shows Fills.
  • What labs will pay. Storage charges shows each lab's charges for the next twelve months, at the trend of
    the folders it owns now on each filesystem, with the prices and free tiers as scheduled (a price change already
    set applies from its day), and a range; a filesystem with no trend yet is counted at the lab's latest size, and
    says why. Chargeback adds them up for every lab, after showing the month. /api/charges returns them as
    ahead, and /api/admin/costs/ahead the totals.
  • Labs and departments in the app. People and access adds a lab or department (Add lab or department: a
    slug, a name, its kind, division, and research area), and each one's page changes its details, deactivates it
    (its members stop seeing its folders; its members and folders are kept, and its folders are still charged to
    it), and reactivates it, with its members, folders, and recent changes. Every change is audited as the import's
    are (lab.created, lab.updated, and lab.deactivated, lab.reactivated), and slugs follow the import's
    rules. Changing a lab's kind asks first, since its free tier for past months changes too.
  • Time limits for requests. A request stops after PINAX_QUERY_TIMEOUT seconds (180 by default) and says
    what to narrow, and stops as soon as the browser leaves the page: the interface cancels a page's reads when
    another page opens, and Pinax interrupts their queries, so an abandoned search of a whole filesystem no longer
    keeps the server busy. At most PINAX_WIDE_QUERIES (2) file-level queries of a whole filesystem run at once;
    others wait their turn. deploy/oauth2-proxy/pinax.cfg waits five minutes for Pinax (upstream_timeout,
    oauth2-proxy 7.3 or later) instead of oauth2-proxy's 30 seconds.
  • New and removed files recorded at ingest. Each index keeps every file new or removed since the previous
    scan (file_changes), so What changed lists them from a range of it: 15 ms for a million-file filesystem,
    against 0.4 s to compare the two scans' files. Against an older scan the files are still compared, in batches of
    groups of top-level folders, so memory is bounded by a group rather than the filesystem.
  • Sizing for two billion files in docs/DEPLOYMENT.md: disk, memory, the room a build needs, what stays fast,
    and what to measure on the first production scan.
  • Guides for the demo and for real data. docs/DEMO.md has how to run the demo, who is who, its six months
    and prices, and the walk-through, which used to be in the README; docs/SETUP.md is new, on running Pinax on
    your own data. The README is shorter and links to both.

Changed

  • Index version 5. Older indexes still answer, comparing files when asked; pinax rebuild --outdated adds
    the new and removed files to them.
  • Find files shows its results before counting them. The count of all matches is a second pass over the
    files, so it is asked for separately (/api/files/count, or total=false on /api/files), and only when the
    page is full.
  • pinax seed runs only when PINAX_ENVIRONMENT=demo. It deletes the catalog and indexes in
    PINAX_VAR_ROOT, and was refused only in prod, so a dev setup with real data could be wiped by mistake.
    The default environment is demo, so the demo is unchanged.
  • Guidance for operating Pinax. docs/ARCHITECTURE.md says what Pinax keeps (the catalog, the indexes, and
    the scans), what each is for, what can be made again, and which to back up, and why the catalog moves to
    PostgreSQL in wave 10 (it said PostgreSQL was the production database; production uses SQLite until then).
    docs/DEPLOYMENT.md adds which scans to keep (Pinax never deletes them), disk totals, a safe online backup and
    restore of the catalog, reading the whole audit log, and what support staff need to know about charges and
    statements. The scan-size figure is the measured one, about 40 bytes per entry, everywhere.
  • The roadmap. Forecasts (0.6.0), cleanup plans (0.7.0), and folder tags (0.8.0) come next, since they need
    no production storage; the production pilot is now wave 9 (0.9.0), and reach, action, and hardening follow it.
    Ideas that need a system Pinax has no access to, such as digests by email, Slack or Teams messages, and quotas
    from the storage system, are kept in a parking lot rather than planned.