Re: How can I optimize a process on a NUMA architecture(x86-64 specifically)?

From: Andi Kleen
Date: Sun May 23 2004 - 09:32:39 EST


On Sat, May 22, 2004 at 05:28:09PM -0700, Bryan O'Sullivan wrote:
> On Fri, 2004-05-21 at 16:42, Brett E. wrote:
>
> > Right now, 5 processes are running taking up a good deal of the CPU
> > doing memory-intensive work(cacheing) and I notice that none of the
> > processes seem to have CPU affinity.
>
> I don't know what kind of system you're running on, but if it's a
> multi-CPU Opteron, it is normally a sufficient fudge to just use
> sched_setaffinity to bind individual processes to specific CPUs. The
> mainline kernel memory allocator does the right thing in that case, and
> allocates memory locally when it can.
>
> You can use the taskset command to get at this from the command line, so
> you may not even need to modify your code.

Linus also merged the NUMA API support into mainline now with 2.6.7rc1, so you
can use numactl for more finegrained tuning.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/