10

Why we need to keep the nmi_watchdog enabled and what could happen if I disable it permanently ?

As some applications recommends to disable NMI watchdog to work properly, what's the advantage of disabling it ?

And what does the results of this command, grep -i nmi /proc/interrupts mean ?

NMI:         24         18         21         18   Non-maskable interrupts
Arnab
  • 1,541
  • 3
  • 14
  • 31

1 Answers1

10

Q3: What do the results of grep -i nmi /proc/interrupts mean?

It becomes clearer if you see the headings of the columns:

$ cat /proc/interrupts
           CPU0       CPU1       CPU2       CPU3             
NMI:         24         18         21         18   Non-maskable interrupts

This command displays statistics about the interrupts per CPU.

Q2: What's the advantage of disabling nmi_watchdog?

The nmi_watchdog can, under some circumstances, generate a high number of NMI interrupts (i.e. when using local APIC and you have high system load). A high number of interrupts may slow down your system.

Q1: What could happen if I disable nmi_watchdog permanently?

Imagine your system locks up. There's 2 possibilities now:
1) You have a hardware NMI button (some servers do). Push it, then the kernel (if properly configured) dumps a trace to console and reboots.
2) Your kernel reaches a halting state that can't be interrupted by any other method. In this case, the watchdog can reboot the machine.

Jan
  • 7,600
  • 2
  • 34
  • 41
  • 9
    WRT to Q1, so is there any other point on enabling watchdog on a desktop/laptop? Even if the computer hangs, you can always hard reset the computer. Am I wrong? – pmav99 Nov 11 '18 at 16:33
  • 1
    @pmav99 you can disable it. [Archwiki says](https://wiki.archlinux.org/title/Improving_performance#Watchdogs): `[…]On the other hand, normal users (i.e. desktop and laptop) do not need [watchdog] and can disable it[…]` – Hi-Angel Apr 23 '23 at 08:54