get the number of cores and adapt the parallelism
fixCacheDegree only when the state of the link changes