+// by default, use all but one processor, but never more than 15.
+$iInstances = max(1, $aCMDResult['threads'] ?? (min(16, getProcessorCount()) - 1));
+
+function run($oCmd) {
+ global $iInstances;
+ $oCmd->addParams('--threads', $iInstances);
+ $oCmd->run(true);
+}
+