Repository navigation
Releases
cpuq v0.29.0
-
cpuq jobs: a job is a folder of task files run by a driver of its own (README, "Jobs").
cpuq jobs runinjobs/NAME/STAMP/runstodo/with N workers, each task's text up to its
first blank line undersh, moving each file todone/,fail/, or back totodo/after a
death (the third fails it).status,watch,set workers|weight|gap,pause,resume,
stopandresetact on the folder they run in.cpuq jobslists the job folders, then the
submitted jobs as before. -
cpuq test SPECruns a spec withtasks(instead ofrun): aftersetup, its tasks
command writes a file per task into$CPUQ_TODO, and the host runs them as a job with
cpuq jobs run, outside any grant, each with$CPUQ_CODE. One test per worktree: the same code
attaches, changed code replaces. Failures are listed by name and come back to.cpuq/fail/. -
cpuq agentkeeps the machine at its target load and shares it among the running jobs by
weight, setting each job's workers and gap each second from what its workers cost; a count a
user set holds.cpuq agent --installkeeps it running.cpuq attachjoins stdin and stdout to
it:jobslists the jobs,to FOLDER COMMANDsteers one. Weights are whole numbers. -
cpuq status --jsonlists the running jobs (jobs): workers and who set them, weight,
counts, and the CPU each uses; their processes are not counted outside cpuq. -
cpuq cap --link FDstops the program's tree at once, exit 123, when the pipe's other end
closes: its driver is gone. -
Linux: a job is confined to as many CPUs as its grant (affinity), those the running jobs
use least, listed inCPUQ_CPUS. -
needsin a spec names caches (from itscaches) that must already hold files on a host:
inputs filled by hand on some hosts only.cpuq submitpasses over a host where one is missing
or empty,--on's too, with a line saying which; none left is NOT RUN.
Cpuq.app 0.22.0
- Jobs (
cpuq jobs) show in the jobs list beside the queue's, their workers what they
reserve. Click a job's CPUS to choose its workers and its new WEIGHT column to choose its
weight (1 to 10); right-click to pause, resume or stop it (its running tasks go back totodo/). - The column CPU OF RESERVED is CPUS.
cpuq v0.28.0
- One layout on every machine, with no links back to the old one:
~/.local/bin/cpuq(the binary),~/.config/cpuq/config,~/.local/state/cpuq/(records), and
under~/cpuq/:packs/,worktrees/PROJECT/(copies of repos sent from another machine),
caches/PROJECT/(a spec's caches) andtmp/(a submitted job's TMPDIR).~/cpuq-spillis
no longer read: move its contents, or let the next jobs rebuild them.job_tmpis gone from
the config (an unknown key is an error). cpuq runalways runs here.--spill,--localandspill_defaultare gone, and so is
placing a run on another machine by itself: each is an unknown option or key.
--on HOSTsends a run to HOST, one of this machine's remotes, for work too big for this one.remotes = HOST, ...in the config names the machines this one sends work to, with
remote_start.HOST(how to start a stopped one) andremote_env.HOST. They replacespill,
spill_start.HOSTandspill_env.HOST, which are unknown keys. Each machine
lists its own: the Mac may list burst and pup, pup only burst, and burst none.--on HOSToncpuq runandcpuq submitruns here when HOST is this machine, and is
refused when HOST isn't one of this machine's remotes.--spill-tois gone: use--on..cpuqinclude, beside.gitignore, names a path a line thatcpuq run --oncopies though
it is gitignored (.git, a vendored tree); it replaces.cpuq-spill.--ship PATHis now
--include PATH.cpuq hookno longer refuses a plaincpuq runwhen this machine is full: where it runs is
the caller's to say. It still sends long spec work tocpuq submit, and heavy work over
ssh HOSTtocpuq run --on HOST.- A spec names no host.
"on"is gone fromcpuq/*.json, and a spec that has it is refused
as having an unknown field.cpuq submitwithout--onplaces a job among this machine's
remotes (here when it has none) where it should finish first by the spec's past results: a free
host that's up before a cloud host that must be started, which is started only for work of ten
minutes or more and taken only when clearly sooner. - Copies from
cpuq run --onand fromcpuq submitshare one folder per project, so a new copy
of either starts as a clone of the project's most recently used one. - Cpuq.app 0.21.0 reads its machines from
remotesandremote_start.HOST. - Labels are parts split by
:of lowercase letters, digits,.,_and-, none starting
with.; anything else is a usage error fromrun,leaseandsubmit. A label's project
names folders on the hosts a job is sent to, so../../x:ycould reach outside them. - The config gives each key at most once: a key set twice is an error, not the last one
winning.remote_start.HOSTandremote_env.HOSTmust name a host inremotes. - Removed options and keys are plain unknown ones, with no hint naming a replacement, and
cpuq submitno longer checks a host's cpuq or packs version: every machine runs one release. - A job sent to another machine is kept in this one's history as pool
remote(wasspill);
earlierspillrecords no longer count toward placement. cpuq hooksees through more: commands afterif/while/!, inside$(...)and
backquotes (quoted or not), and behind wrappers by their own options (nice -n 5,timeout 30m,
env -u X,sudo -u U,xargs -P 4,uv run,poetry run, …);cargo +nightly,zig test,
meson,ctest,toxandpython3.N -m pytestcount as heavy. Insidecpuq run, a fixed jobs
count above the grant (-j16,-n 8,-jwith no number,-n auto) is refused with the
$CPUQ_CORESform.# cpuq: skipcounts only as a comment of its own, and its suggestions run
as typed (quotes kept, the tool's own-jreplaced).cpuq cap(protocol 4):--outputis checked about every 0.1 s rather than once a second;
a limit of 0 (--mem 0,--pids off) is refused rather than meaning none; exit 122 means the
kernel killed PROGRAM itself at--mem; a cap SIGKILLed inside a job leaves its cgroup only
until the job's next cap removes it and what is left in it; a job that can't give PROGRAM a
cgroup says on stderr what that costs;--pidsneeds only the pids controller.
cpuq v0.27.1
- A new worktree's first
--spillcopy starts, on a host whose filesystem clones (ZFS, btrfs), as
a clone of the newest copy of the same repo there, so rsync sends only what differs: a Rig copy
to burst takes 5 s instead of 33. Elsewhere it starts empty, as before. - A spilled copy keeps what
.gitignorenames even when it isn't here: a build cache made on the
host by the last run was deleted by the next sync from a worktree that never built locally. cpuq hooknever refuses a--localrun:--localis the caller's word that it runs here (a
quick local check that decides whether to send work elsewhere at all), and nothing places it off
this machine. 0.27.0's "drop --local" refusal is gone.- A seeded copy (spilled or submitted) has every file dated 30 years back to start, each still
apart from the others, so an output another branch built there is older than every source and
is built again (make, cargo); a cache that goes by content (zig's) stays warm. Where dates can't
be moved, the copy starts empty. - A spill copy whose kept caches stand in the way of the sync (a folder there, a file here) is
synced again without them, rather than failing every run. A.gitignorewith!lines keeps
nothing there, so files deleted here are deleted there too.
cpuq v0.27.0
--spill(andspill_default = on) places work by when it should finish, not only when this
machine is full. Long work goes to a spill host when that is sooner by a minute and by 30%,
counting the wait, the copy of the repo and the run there; a stopped cloud host is started for
work of ten minutes or more. Short and never-seen work stays here while there is room, as
before. stderr gives both times (~41 min here, ~6 min on burst).- History keeps each job's repo, and judges work by repo and command (counts and
$CPUQ_CORES
aside) rather than by label, so runs under different labels count as the same work. Each spilled
trip is recorded here (poolspill, with its host), timed from before the copy to the end:
what placement compares a host by. Only runs that succeeded count, so a run that failed early
never makes a place look quick. - A small fixed
--cores N(2 or more) for a command that passes$CPUQ_CORESon is widened once its runs
show it kept all N busy (to 2N) or used more than N, never past half the CPUs; stderr says so.
Jobs are sized by their own command's measured use when it has three runs or more. - A spec's work (a command matching a
cpuq/*.jsonrun, its words and flags, that needs packs, caches, deps, a setup
or git) is never spilled bare: it runs here, and stderr gives thecpuq submitline. cpuq hookrefuses long work that would finish in half the time elsewhere: a spec's work as a
cpuq run(with each host's time and thecpuq submitline), and--localwork whose trips
to a spill host took half its time here ("drop --local"). Heavy work typed overssh HOSTis
pointed tocpuq run --spill-to HOST.
cpuq v0.26.6
- A spilled job's copy (
--spill,--spill-to, andcpuq submit) is read back by each file's
checksum after rsync makes it. A file damaged on the host keeps its size and mtime, so rsync's
quick check never sent it again, and every later run there used the damaged copy. A file that
differs is now sent again and checked once more, and stderr says which. If the copy still
differs, the job doesn't run there:--spillruns it here,--spill-tofails with exit 125,
and a submitted job ends in CPUQ ERROR. Both cases name the files. Found on burst, whose
OpenZFS 2.4.1 with dedup zeroed the end of a shipped file (openzfs/zfs#18366).
cpuq v0.26.5
- macOS: when a command under
cpuq runorcpuq capdies of a signal that makes a crash report
(abort, segfault, bus error, ...), cpuq ends by exit 128+N, as the shell sees it, rather than by
the same signal: dying of it filed a crash report for cpuq in the system's folder each time
(beside the command's own report, unless that was turned off). Other signals (an interrupt, a
termination) still end cpuq as they ended the command.
cpuq v0.26.4
(0.26.3 was tagged, never released: its release build failed on the fix below.)
window_backfill(default on): off, nothing starts ahead of a timing window (an
--exclusiverun or lease) waiting at the front, not even a job history says is quick, so the
window waits only for what already runs. pup sets it off: a 1-second job slipped in ahead of a
waiting pup-bench window and ran 30 s and more.--spilljudges a spill host by its load only when that host counts load itself (its
load_check, now incpuq status --json), as it judges this machine.
cpuq v0.26.2
- macOS:
cpuq cap --no-crash-reportstops the system's crash report too. Clearing PROGRAM's crash
handler (0.25.0) only stopped the user's ReportCrash: the crash went on to the system's, which
filed it in /Library/Logs/DiagnosticReports (75 such reports today from tests that panic on
purpose). cap now answers PROGRAM's crashes itself, from a port PROGRAM inherits, so neither
files one; and it exits 128+N for a death by signal N instead of dying by the signal too, which
had the system file one for cpuq. A shell sees the same status (134 for an abort).cpuq cap --protocolis now 3.
cpuq v0.26.1
cpuq cap --protocolprints what cap does as a number that changes only when that does (now 2).
A test runner keys cached results on it rather than on cpuq's version: Rig's matrix keyed on
the version, and every cpuq release made its next run cold (24–36 min).- A worktree's submitted jobs run at once: a host keeps up to
submit_slots(default 3) copies
of a worktree, each job on the first free one, so Rig's gate (suite, corpus, matrix) takes about
its slowest job, not the sum. A new copy is seeded on the host from the project's most recently
synced copy (reflinks or APFS clones where the filesystem has them), so its sync sends only what
differs and its build caches start warm: a cold first sync of a new worktree took 26 s and a
cold build about 90 s more. Both ends must be 0.26.1; an older supervisor keeps one copy. - Each submitted job's supervisor.log has a line with each phase's seconds (start, waiting for a
copy, packs, copy, check, marked): a warm job synced in 1.5 s and ran 5 s later. - A submitted job's
returnpaths start empty in its copy: files an earlier job left there (or
the copy it was seeded from) no longer come back with its results. job_tmp(host config): a submitted job's TMPDIR goes there, a directory per job, removed
when it ends. burst sets it to its ZFS spill dataset: under other jobs' bulk writes an fsync on
its root ext4 disk, where TMPDIR was, took 364 ms (ZFS: 0.43 ms), so database and fsync-heavy
tests ran 10–100× slow there and timed out.--spillwith--shipof a file inside a gitignored folder no longer copies the rest of the
folder (0.25.5 sent a whole .zig-cache along with one file in it).- A submitted job records what it ran, by git, once its copy is synced and checked unchanged:
shippedincpuq job ID --json, with the worktree'shead, thetreeof its content, and
clean. Rig's gate binds its commit status to it.