FOR LEGACY GRUB
To disable NUMA, add numa=off to the kernel line in /boot/grub/grub.conf , as follows:
kernel /vmlinuz-2.6.39-400.215.10.el5uek ro root=/dev/VolGroup00/LogVol00 numa=off
Reboot server.
shutdown -r now
Validate NUMA is disabled after server boot successfully.
$ uptime
22:11:10 up 23 days, 3:12, 1 user, load average: 0.00, 0.01, 0.05
cat /proc/cmdline
ro root=/dev/VolGroup00/LogVol00 numa=off <---------- NUMA is disabled
numactl -H
available: 1 nodes (0)
node 0 size: 4195 MB
node 0 free: 3304 MB
node distances:
node 0
0: 10
Also, if NUMA were activated, there would be more than one node listed in the above output.
FOR GRUB2 EFI Boot Loader
To disable NUMA on servers which use the EFI boot loader. GRUB 2 is the default EFI-mode boot loader, so the steps are based on GRUB2.
Take a backup of /etc/default/grub file.
Edit /etc/default/grub file and replace numa=on to numa=off.
vi /etc/default/grub
..
GRUB_CMDLINE_LINUX_DEFAULT="root=LABEL=DBSYS bootarea=dbsys bootfrom=BOOT ro loglevel=7 panic=60 debug pci=noaer log_buf_len=1m nmi_watchdog=0 transparent_hugepage=never rd_NO_PLYMOUTH audit=1 console=tty1 console=ttyS0,115200n8 crashkernel=448M@128M numa=on << -- Replace it as off
Run the following command to rebuild the grub.cfg
grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
Reboot the server to make the changes effect.
Disable Numa on Virtual Machine
vNUMA removes the transparency between the VM and the OS and presents the NUMA architecture directly to the VM’s operating system. It worth mentioning that vNUMA also known as wide NUMA in the industry.
To disable NUMA on Xen Hypervisor it needs downtime.
Backup /etc/xen/xend-config.sxp file.
cp /etc/xen/xend-config.sxp /etc/xen/xend-config.sxp.bkp_default.
Edit /etc/xen/xend-config.sxp file and replace "(vnuma 1)" to "(vnuma 0)"
[root@ VirtualDisks]# vi /etc/xen/xend-config.sxp
# Enable or disable HVM guests seeing an vNUMA topology by default.
(vnuma 0) ⇒ 0 Means disabled and 1 means enabled (space is there for (vnuma 0))
Restart Xend service to make the changes effect.
[root@ VirtualDisks]# /etc/init.d/xend restart
Stop/Start the Guest Machines.
[root@ VirtualDisks]# xm stop 0004fb0000060000aa3c75119ef2e544
[root@ VirtualDisks]# xm start 0004fb0000060000aa3c75119ef2e544
Before activity:
[root@ ~]# numactl --hardware
available: 2 nodes (0-1) ⇒ If the number of available nodes is "2 nodes (0-1)" or "8 nodes (0-7)" then NUMA is enabled. If the number of available nodes is "1 nodes (0)" then NUMA is not enabled.
node 0 cpus: 0
node 0 size: 9997 MB
node 0 free: 9879 MB
node 1 cpus: 1
node 1 size: 10078 MB
node 1 free: 10019 MB
node distances:
node 0 1
0: 10 21
1: 21 10
After reboot:
[root@ ~]# numactl --hardware
available: 1 nodes (0)
node 0 cpus: 0 1
node 0 size: 20076 MB
node 0 free: 19897 MB
node distances:
node 0
0: 10