Skip to content

Pinax 0.14.0: load

Latest

Choose a tag to compare

@robert-mcdermott robert-mcdermott released this 02 Nov 22:50
· 4 commits to main since this release
a54e35c

Fourteenth release (wave 14, "load"): many people at once, measured and fixed, and file categories a site defines.
A load test of people signing in and clicking through the interface, on a laptop against scans of 10 million files,
on SQLite and PostgreSQL, found a stall past about 20 pages a second, now fixed, and pages that asked the catalog
hundreds of questions, which now ask a few; the deployment guide says how many people one process serves. Storage
administrators define the file categories, by extension and by patterns on file names, on a page of their own. See
pinax-spec/roadmap.md.

Upgrading from 0.13.0: back the catalog up (Backups), install the new version, and
restart Pinax (Upgrading).

  • The catalog has one migration, 0007 (the file categories), which Pinax applies when it starts, filling it
    with the twelve built-in categories; with PINAX_DB_AUTO_UPGRADE=false it refuses to start until pinax db upgrade has applied it. The snapshot indexes are unchanged, and were built with the twelve, so nothing needs
    rebuilding.
  • PINAX_QUERY_MEMORY_LIMIT is for all the open indexes together now, 8 GB by default; it was 4 GB for each. A
    site that set it should set the total it allows.
  • Scripts that read cat_bytes or cat_files from the API read them by category now: they are objects keyed by
    category, not lists.
  • With Prometheus, copy deploy/prometheus/pinax-alerts.yml again for the new rule PinaxBusy.
  • No new dependencies.

Added

  • File categories, under Administration (R14), for storage administrators, and read by auditors: each
    category's name, description, extensions, and patterns, changed, added, removed, and put in order; each pattern
    checked, and tried against a sample of the latest scans' names; before saving, how the latest scans' files would
    move between categories (by extension exactly, by name an estimate from a sample) and which snapshots would be
    outdated, with about how long pinax rebuild --outdated takes. Every change is audited (File categories).
  • PINAX_WEB_THREADS (40): the threads that answer the web app's requests, and with SQLite its catalog
    connections. Fewer serve more quick pages a second when the server is saturated, and leave less for requests that
    wait or run long (Sizing).
  • The age map says what it leaves out, in the line under it: how many folders are drawn and how many put into
    one tile (up to 60 subfolders of a folder, and with two levels 12 inside each tile), and, sized by a kind of data
    or by age, how many folders hold any, since one with none has no area and is not drawn.
  • The load test (bench/load.py, with bench/load_setup.py to make the installation it runs against): simulated
    people of each role signing in with passwords and opening the interface's pages as browsers do, with pauses
    between clicks; administrators searching whole filesystems (--searchers); everyone signing in at once (--ramp 0); a report of each page's and API route's times, errors, and the server's memory and cores, against wave 14's
    budgets, and --compare for two runs (The load test). The architecture
    guide's Many people at once has what it measured, and the deployment guide's sizing how many people one process
    serves.

Changed

  • File categories are the catalog's (R14), with the twelve built-in ones filled in when Pinax first starts after
    the upgrade (migration 0007), so a site can change them, and add its own: up to 24, each by extensions and by
    patterns on file names (regular expressions, up to 25 in all), checked before any extension. They are decided when
    an index is built and recorded in it, and every report reads each index's own; an index built with other
    categories than the catalog's is outdated. Indexes built before the upgrade were built with the twelve, so they
    are current and need no rebuild.
  • pinax rebuild --outdated also builds again the indexes built with other file categories than the catalog's,
    and --latest limits it to each filesystem's latest snapshot, so older ones keep theirs.
  • The API's totals by category are keyed by category: cat_bytes and cat_files are objects
    ({"genomics": 1234, ...}, naming only categories with files), not lists in the order of /api/config's
    categories. A script that reads them by position must read them by key. Files found by a search or in What
    changed
    have their category's key, as before.
  • PINAX_QUERY_MEMORY_LIMIT is for all the open indexes together, 8 GB by default. It was 4 GB for each, and up
    to eight stay open, so up to 32 GB in all; now each open index has an equal share, set again as indexes open and
    close, and one alone has all of it. A site that set it should set the total it allows.
  • The roadmap. Load comes next, as wave 14 (0.14.0): a load test of many people using Pinax at once, run on a
    laptop against synthetic scans of 10 million files, on SQLite and PostgreSQL; the baseline at 10 to 100 people;
    whole-filesystem searches taking turns, many sign-ins at once, and the catalog under load; what it finds fixed or
    tuned, and the deployment guide's sizing says how many people a server serves (Q6). It was planned for hardening.
    The pilot becomes wave 15, and runs the same test again on its server; hardening becomes wave 16 (1.0.0). Wave 14
    also lets storage administrators define file categories, by extensions and by patterns on file names, applied when
    an index is built (R14).

Fixed

  • Many people at once no longer stall Pinax. Past about 20 pages a second, some 200 people at a normal pace,
    0.13.0 stopped answering for 30 seconds at a time and then failed requests with Internal error, its processors
    idle: each request kept the catalog connection it took to check who was signed in while it waited for a thread to
    run the page, and the catalog had fewer connections than the web server has threads. A request now gives its
    connection back in between, and before checking a password, and with SQLite the web app keeps a connection for
    each thread. A request that finds no connection free within 10 seconds (30 before) is told Pinax is busy (503)
    instead of failing, and counted in the new metric pinax_catalog_busy_total, with the alert rule PinaxBusy.
  • Pages that name many labs or people ask the catalog a few questions instead of hundreds. An administrator's
    All data asked 1,023, most of them to find each lab's PI; now 24. People and access asked 620 (each person's
    roles), now 13; the age map, change map, and cold folders of a filesystem's root 131 to 283, now 12 to 14; a lab's
    suggested folders 175, now 58. On PostgreSQL on the laptop, All data's catalog request took 69 to 129 ms instead
    of 400 to 576.