A.8.1 support under linux, A.8.2 support under solaris, A.8.3 support under microsoft® windows – AMD ATHLON 64 User Manual

Page 46: A.8.1, Support under linux, A.8.2, Support under solaris, A.8.3, Support under microsoft windows

Advertising
background image

46

Appendix A

40555

Rev. 3.00

June 2006

Performance Guidelines for AMD Athlon™ 64 and AMD Opteron™
ccNUMA Multiprocessor Systems

The function to set memory affinity for a thread is VirtualAlloc( )[

9

]. This function gives the

developer the choice to bind memory immediately on allocation or to defer binding until first touch.

Although there are no command-line tools for thread/process and memory placement, several
Microsoft Enterprise products provide NUMA support and configurability, such as SQL Server 2005
[

10

] and IIS [

11

].

If an application relies on heaps in Windows, we recommend using a low fragmentation heap (LFH)
and using a local heap instead of a global heap[

12

][

13

].

By default, Windows uses the first touch binding policy for all data. Once memory is bound to a node,
it normally resides on that node for its lifetime.

A.8

Tools and APIs for Node Interleaving in Various
OSs for AMD64 ccNUMA Multiprocessor Systems

This section discusses tools and APIs available for performing node interleaving under various
operating systems.

A.8.1

Support under Linux

®

Linux provides several ways for an application to use node interleaving [

5

].

numactl is a command line tool, which is used for node interleaving all memory accessed by a
program across a set of chosen nodes.

For example, to interleave all memory accessed by program foobar on nodes 0 and 1, use:

numactl --interleave=0x03 foobar

libnuma offers several functions a program can use to interleave a given memory region across a
set of chosen nodes.

Linux only supports the round robin node interleaving policy.

A.8.2

Support under Solaris

Solaris offers an API called madvise, which can be usedwith the MADV_ACCESS_MANY flag to
tell the OS to use a memory policy that causes the OS to bind memory randomly across the nodes.
This offers behavior similar to the round robin node interleaving of memory offered by Linux.

This random policy is the default memory placement policy used by Solaris for shared memory.

A.8.3

Support under Microsoft

®

Windows

®

Microsoft Windows does not offer node interleaving.

Advertising