public static int getDefaultThreadPoolSize() {

		Integer cpuOverride = getCPUOverride();
		if (cpuOverride != null) {
			return cpuOverride;
		}

		//
		// The basic choice of (available processors + 1) is based upon the book
		// Java: Concurrency in Practice.  This is for CPU-bound processing.  Further, the basic
		// idea is that there is enough overhead with context switching that you can add an
		// extra thread over the number of cores so that you can maximize usage while context
		// switching is taking place.
		//
		int numProcessors = Math.max(1, Runtime.getRuntime().availableProcessors() + 1);

		//
		// We enforce an upper bound here.  There is likely diminishing returns with
		// more threads, and if there are too many, other resource limits can be hit.
		//
		// Note: the user can still override this with the tool option *for GUI usage*.
		//       Users can set the system property cpu.core.override to specify an exact
		//       value to use for non-GUI usage.
		//
		if (numProcessors > 10) {
			// TODO: This bound is fairly arbitrary, probably could be made even lower
			numProcessors = 10;
		}

		// Note:  this serves only to limit the number of cores possible, not to increase
		Integer cpuCoreLimit = getCPUCoreLimit();
		if (cpuCoreLimit == null) {
			return numProcessors;
		}

		int parseInt = Math.max(1, cpuCoreLimit + 1);
		return Math.min(parseInt, numProcessors);
	}
Returns the default size (in number of threads) for a <b>CPU processing bound</b>
thread pool.

@return the default pool size.
Ghidra/Framework/Utility/src/main/java/ghidra/util/SystemUtilities.java