Home > database >  How R's parallel package would handle 12th Gen Efficiency Cores?
How R's parallel package would handle 12th Gen Efficiency Cores?

Time:07-18

I was planning to do a desktop build with an i7-12700, I mostly need it for high CPU usage R tasks and most of the time parallel processing comes into play. But I wonder how the new Efficiency Cores in 12th Gen Intel processors handle this task. I am not an expert on hardware/architecture so the question might sound stupid, but my concerns are the following.

  1. Suppose I have a task that I want to split over 8 cores, How do I ensure that the task would be run on the performance cores, or is this automatically handled by the OS?
  2. In general with other CPUs I usually set the mc.cores = Number of cores on the machine, Is this the correct way or should we put the number of threads there?

So basically might there be a concern choosing the new 12th gen CPU with efficiency cores over 11th Gen CPU say i7-12700 over i7-11700?

CodePudding user response:

Processor affinity

Depending upon your operating system, you can tell the OS to not use (or deprioritize) certain cores for certain processes. This is typically referred to as processor affinity. Here is some discussion of why you might (not) want to do this. The parallel package appears to have a built-in function to do this directly from R, although beware incorrect indexing of the cores.

Windows

You can assign specific processes to specific cores in Windows using the Processor Affinity options. Here's an example of how to do this.

Apple

Here's basically the same question for Apple operating systems.

Linux

No experience with this but here's discussion of how to do it.

Number of cores/threads

"Should" in this case is very subjective and so best avoided in questions. However, I'll take a stab: in many cases, "should" is precluded by "cannot" do so with respect to multithreading. I recommend reading this for discussion of multi-threading and multi-processing and how to do it (in R). Note that independent of this, many recommend specifying at least 1 core less than the total number of cores on your personal machine to avoid possible crashed or massive degradation of ability to get other stuff done while R is chugging away.

  • Related