Gentoo Archives: gentoo-user

From: Michael Mol <mikemol@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Dual or Quad CPU complications?
Date: Sat, 15 Dec 2012 03:27:26
Message-Id: CA+czFiBfaGhJW5gO0ve+RDOjc2Q4sL=B6vtLnnQvwv+yaf=PxQ@mail.gmail.com
In Reply to: Re: [gentoo-user] Dual or Quad CPU complications? by Grant
1 On Fri, Dec 14, 2012 at 10:16 PM, Grant <emailgrant@×××××.com> wrote:
2 >> > >> > So if I have 2 physical CPU's with 4 cores each and I enable SMP,
3 >> > >> > I'm
4 >> > >> > using
5 >> > >> > 8 cores? Can NUMA be either enabled or disabled when using more
6 >> > >> > than
7 >> > >> > one
8 >> > >> > physical CPU, or is it required?
9 >> > >>
10 >> > >>
11 >> > >> NUMA is a hardware architecture. It's how you access memory on a
12 >> > >> hardware level: NUMA = Non Uniform Memory Access vs a UMA
13 >> > >> architecture
14 >> > >> of typical (old/legacy) SMP systems (UMA = Uniform Memory Access).
15 >> > >>
16 >> > >> In a UMA system, all the memory belongs to all the sockets. In a NUMA
17 >> > >> system, each socket has it's "own" local memory. In modern (x86-64)
18 >> > >> processors, each socket has it's own memory controller so each socket
19 >> > >> controls its own local memory. If one socket runs out of memory it
20 >> > >> can
21 >> > >> ask another socket to lend him some memory. In a UMA system, no
22 >> > >> socket
23 >> > >> has to ask since memory is global and belongs to all sockets so if
24 >> > >> one
25 >> > >> socket uses up all the memory ... the rest "starve". In NUMA, there's
26 >> > >> more control over who uses what (be it cores or RAM).
27 >> > >>
28 >> > >> If you have a modern dual or quad (or higher #) socket system ...
29 >> > >> you've got NUMA architecture and you can't get rid of it, it's
30 >> > >> hardware, not software.
31 >> > >
32 >> > > So I must enable CONFIG_NUMA for more than one physical CPU, and
33 >> > > disable it
34 >> > > for only one physical CPU?
35 >> >
36 >> >
37 >> > Yup. But ... Why would you want to disable a socket (CPU)? If you
38 >> > disable a socket (CPU) ... you lose the memory attached to that socket
39 >> > (CPU) not to mention you lose those cores ;)
40 >>
41 >> Sure but it sounds like if my system only has one CPU socket, CONFIG_NUMA
42 >> should be disabled.
43 >
44 > I read this in make menuconfig:
45 >
46 > "The kernel will try to allocate memory used by a CPU on the local memory
47 > controller of the CPU and add some more NUMA awareness to the kernel. For
48 > 64-bit this is recommended if the system is Intel Core i7 (or later), AMD
49 > Opteron, or EM64T NUMA."
50 >
51 > To be sure I have this right, I should disable CONFIG_NUMA on any system
52 > with a single physical CPU, even if it's an AMD Opteron?
53
54 No harm done if you enable NUMA on a system where it's not necessary.
55
56 --
57 :wq