Configure NUMA on PowerKVM VM

To improve performance when accessing memory, restrict the guest to allocate memory from a specific set of NUMA nodes. Pin the guest vCPUs to a set of cores located on that same set of NUMA nodes.

NUMA configuration on Host:

[root@powerkvm ~]# numactl –hardware
available: 4 nodes (0-1,16-17)
node 0 cpus: 0 8 16 24 32 40
node 0 size: 32768 MB
node 0 free: 31116 MB
node 1 cpus: 48 56 64 72 80 88
node 1 size: 65536 MB
node 1 free: 63061 MB
node 16 cpus: 96 104 112 120 128 136
node 16 size: 32768 MB
node 16 free: 31770 MB
node 17 cpus: 144 152 160 168 176 184
node 17 size: 65536 MB
node 17 free: 64234 MB
node distances:
node 0 1 16 17
0: 10 20 40 40
1: 20 10 40 40
16: 40 40 10 20
17: 40 40 20 10
[root@powerkvm~]#

To configure NUMA, edit the domain XML configuration file for the guest. For example, to restrict a guest to NUMA node 0, edit the XML configuration file to include the following markup.

<numatune>
<memory nodeset=’0’/>
</numatune>

NUMA node information of respective VM (rhel65_qcow2)  is found here.

[root@powerkvm ~]# cat /sys/fs/cgroup/memory/machine/rhel65_qcow2.libvirt-qemu/memory.numa_stat
total=15773 N0=4254 N1=9711 N16=861 N17=947
file=147 N0=0 N1=142 N16=0 N17=5
anon=15626 N0=4254 N1=9569 N16=861 N17=942
unevictable=0 N0=0 N1=0 N16=0 N17=0
[root@powerkvm ~]#

 

 

 

 

Advertisements

One thought on “Configure NUMA on PowerKVM VM

  1. Pingback: Bring Up PowerKVM | Pradeep K Surisetty

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s