costs
tit.jobs.costs ¶
Per-kind default resource costs (docs/dev/ARCHITECTURE.md §6, job engine), data + one lookup.
A project can override any kind's default in settings later. A job's config may also carry
its own cpus/memory_gb (QSIPrep-shaped configs do) -- that wins over the table below,
when it is a finite, positive number (anything else is ignored: Cost(cpus=nan) never fits
a budget, and a negative claim would lower the running total and over-admit).
Memory claims for sim, the flex kinds and ex/mex are the measured peaks of real runs:
the server's own PSS samples (status.json rss_peak) in Dataset 000, October-November 2026.
sim, one montage each (jobs 34ffcc59, b8fa6613, f56383c0): 7.77, 7.57 and 8.30 GB, so :data:SIM_MEM_GBis 9 -- flat, becausetit/sim/__main__runs a config's montages one after another.flex: 5.84 GB with one restart (e689f217), 15.19 GB with four (ad8cf881). Each restart builds a new SimNIBS optimisation and the earlier ones' memory is not given back, so the peak grows withn_multistart(about 3.1 GB per restart over a 2.7 GB base); the claim is :data:FLEX_BASE_MEM_GB+ :data:FLEX_MEM_PER_RESTART_GBper restart, both rounded up.ex/mex: the job loads its whole leadfield (sub-101's 75-electrode EEG10-10 one is 3.5 GB of float64) and forks one worker per CPU it is admitted with (:mod:tit.opt.ex.parallel); each worker adds its own full-mesh field arrays. The same 256-montage bucket search on that leadfield peaked at 4.79, 4.98, 5.77 and 7.27 GB with 1, 2, 4 and 8 workers (jobs 2fdca13b, 0f0802f6, 95712f85, 93ae4df0, run 2026-11-03 on a copy-on-write clone of Dataset 000; c6401588, the Dataset 000 run that found the old flat 6 GB short, 7.30 GB with 8), and one-montage runs, which evaluate in the parent, 4.87 GB (ex) and 5.18 GB (mEx). For ex the montage count does not matter (results are small rows). The ex claim is :data:EX_BASE_MEM_GB+ :data:EX_MEM_PER_WORKER_GBper CPU claimed (about 0.38 GB per worker over 4.2 GB, rounded up; the base also covers mEx in one process: 5.18 GB for one montage, 4.89 GB for 64, job e26b35b8).mexwith forked workers does not follow the worker count: a 16-montage search peaked at 8.42 GB with 4 workers and 8.47 GB with 8 (jobs 7a154326, 56eed5c6), the 256-montage one at 12.64 GB with 8 (job 43c13b0b), all on the clone, 2026-11-03. Forked mEx memory grows with the candidates evaluated while the same evaluation in one process does not, so it claims :data:MEX_FORKED_MEM_GBwhenever it forks.
tests/test_job_memory_realdata.py checks every claim against those records
(TIT_DATASET_000).
default_cost ¶
The default :class:~tit.jobs.spec.Cost for one job.
A config carrying its own cpus/memory_gb (or mem_gb) — QSIPrep/QSIRecon-shaped
configs, and FlexConfig.cpus for the cpus half — overrides the table when the value
is a finite number above zero; a CPU claim is at least one CPU. Flex memory grows with
n_multistart, ex memory with the CPUs (workers) claimed, forked mEx is flat; sim memory does not grow
with the montage count (see the module docstring for the measurements).
Source code in tit/jobs/costs.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | |