Hardware Interrupt time – ‘hi’ time in top

CPU consumption in Unix/Linux operating systems are studied using 8 different metrics: User CPU time, System CPU time, nice CPU time, Idle CPU time, Waiting CPU time, Hardware Interrupt CPU time, Software Interrupt CPU time, Stolen CPU time. In this article let us study about ‘Hardware Interrupt CPU time’.

What is Hardware Interrupt CPU time?

To understand ‘hardware interrupt time’, one must understand ‘hardware interrupts’ first. A hardware interrupt is an electronic alerting signal sent to the processor from an external device (like disk controller, network cards, keyboard controller, external timer, hardware sensors, ….) For example, when we press a key on the keyboard or move the mouse, they trigger hardware interrupts which cause the processor to read the keystroke or mouse position.

Amount of time CPU spends in processing these hardware interrupt signals is called ‘Hardware interrupt time’.

How to find Hardware Interrupt CPU time?

 Hardware Interrupt CPU time can be found from the following sources:

a. You can use web-based root cause analysis tools like yCrash to report ‘hardware interrupt’ CPU time. Tool is capable of generating alerts if ‘hardware interrupt’ CPU time goes beyond the threshold.

b. ‘hardware interrupt’ CPU time is also reported in the Unix/Linux command line tool ‘top’ in the field ‘hi’ as highlighted in the below image.

Fig: Hardware Interrupt ‘hi’ time in top

How to resolve high hardware interrupt CPU time?

Since these hardware interrupts can happen very frequently and block the current CPU while they are running, kernel hardware interrupt handlers are written to be as fast and simple as possible. If your device is suffering from high ‘hardware interrupt’ CPU time (> 10%), you must be concerned, as it can affect the applications’ performance running on that device. Below are the  steps to resolve high ‘hi’ CPU time.

  1. Try rebooting the device. Sometimes, the hardware could be stuck in an undesirable state and wouldn’t be able to recover until it’s restarted
  2. Check whether there are any hardware failures. Hardware failures can result in high ‘hi’ CPU times.
  3. Check whether you are running with the latest hardware drivers
  4. Try disabling external devices that are suspicious
  5. Make sure you are running on the latest OS version with proper patches installed.

Leave a Reply

Powered by WordPress.com.

Up ↑

%d bloggers like this: