simulatneously when compiling.
"""
# Check how many processes would fit into the
- # memory when each process takes up to 500MB.
- multiplicator = self.memory / (500 * 1024 * 1024)
+ # memory when each process takes up to 128MB.
+ multiplicator = self.memory / (128 * 1024 * 1024)
multiplicator = round(multiplicator)
# Count the number of online CPU cores.
- cpucount = os.sysconf("SC_NPROCESSORS_CONF")
+ cpucount = os.sysconf("SC_NPROCESSORS_CONF") * 2
+ cpucount += 1
- return min(multiplicator, cpucount * 2)
+ return min(multiplicator, cpucount)
# Create an instance of this class to only keep it once in memory.