Gentoo Archives: gentoo-user

From: Florian Philipp <lists@×××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Dual or Quad CPU complications?
Date: Sat, 15 Dec 2012 12:43:12
Message-Id: 50CC6FD6.1040601@binarywings.net
In Reply to: Re: [gentoo-user] Dual or Quad CPU complications? by Grant
1 Am 15.12.2012 04:16, schrieb Grant:
2 >> > >> > So if I have 2 physical CPU's with 4 cores each and I enable
3 > SMP, I'm
4 >> > >> > using
5 >> > >> > 8 cores? Can NUMA be either enabled or disabled when using
6 > more 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
20 > it 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
24 > if 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,
42 > CONFIG_NUMA 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
47 > memory controller of the CPU and add some more NUMA awareness to the
48 > kernel. For 64-bit this is recommended if the system is Intel Core
49 > i7 (or later), AMD 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 > - Grant
55
56 Disable it. You only have one memory controller. There is nothing the
57 kernel could do wrong without.
58
59 Regards,
60 Florian Philipp

Attachments

File name MIME type
signature.asc application/pgp-signature