0

I defined a cpuset to contain 12 of the 24 CPUs on this system.

I put a process into it. /proc/PID/cpuset gives the right answer.

top -p PID, followed by 1, shows lots of CPU time on CPUs not in the set.

As an additional oddity, the CPU time shows up in %ni instead of %us, even though no renicing is going on.

Ubuntu 11.10, a 2-socket machine with Intel(R) Xeon(R) CPU X5680 @ 3.33GHz chips.

edit

my bad for thinking I had four sockets here.

1
  • 1
    Please provide the OS distribution and version.
    – ewwhite
    Feb 22, 2012 at 2:53

2 Answers 2

3

That's not a 4-socket machine sorry, 56xx-series chips are dual-socket only.

The X5680 has six cores with hyperthreading and can configured to work with ONE other X5680 in NUMA, so would show 24 CPUs in Linux (2*6*2).

U11 has a HT & NUMA-aware kernel by default so will, unless told differently, attempt to utilise threads on the same cores and die to ensure efficient L2 cache management.

I'm not quite sure what you're trying to do by using cpusets as there's more of a chance to misconfigure performance doing that than just leaving it to the kernel - what are you attempting to achieve?

4
  • There are quite a few applications where CPU-binding/shielding make sense. Realtime applications, scientific computing, financial trading... but in this case, the confusion appears to come from having Hyperthreading enabled. The OP's core count is way off.
    – ewwhite
    Feb 22, 2012 at 14:27
  • Oh I'm aware of some scenarios where it can be of benefit - they're just rare.
    – Chopper3
    Feb 22, 2012 at 14:48
  • Having read your answer, I see no further reason to fool with cpusets.
    – bmargulies
    Feb 23, 2012 at 3:10
  • What were you trying to do? I use cpusets often, but have a specific purpose; isolating different types of activity and pinning network/hardware interrupts to a particular CPU.
    – ewwhite
    Feb 23, 2012 at 13:18
2

Download the stress utility and run it within the CPU shield/set that you're interested in testing. Something like stress -c 12 would work to generate a load on 12 CPUs. It should be available in your distribution's repository.

I'm concerned about your statement regarding the system architecture. The Intel X5680 CPU is a 6-core CPU that is only available in 2-socket configurations. Are you sure you have 4-sockets? Is there a chance that you simply have Hyperthreading enabled to get the 24-cores present in top? If so, the results you were seeing in your cpuset were skewed.

You really have 12 processors. If this is any type of critical application where you expect deterministic processing, you should disable Hyperthreading and work with the physical CPU cores. That means that your cpusets will have to be smaller as well.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .