Patent ID: 7673114

Claim:
A computer system comprising: a plurality of logical partitions defined on a plurality of nodes, each logical partition comprising a plurality of resources on at least two of the plurality of nodes; a dynamic partition manager that manages allocation of the plurality of resources on the plurality of nodes to the plurality of logical partitions, the dynamic partition manager comprising a memory affinity computation mechanism that computes memory affinity for a selected logical partition; and a memory affinity agent in the selected logical partition, the memory affinity agent determining from the memory affinity computation mechanism a current memory affinity for the selected logical partition based on a current allocation of resources in the selected logical partition, the memory affinity agent determining from the memory affinity computation mechanism a potential memory affinity for the selected logical partition based on a proposed reallocation of resources in the selected logical partition, wherein the memory affinity computation mechanism computes memory affinity for a selected logical partition using the equation memory ⁢ ⁢ affinity = ∑ 1 n ⁢ ( 100 -  PMn - PCn  ) * PRn where n=the number of nodes used by the selected logical partition PMn=percent of memory corresponding to the selected logical partition on a selected node PCn=percent of processors corresponding to the selected logical partition on the selected node PRn=percent of total resources corresponding to the selected logical partition on the selected node, which equals (PMn+PCn)/2.