Irqbalance & cpuspeed -- two ignored services

Source: Internet
Author: User
Article Title: irqbalance & cpuspeed -- two ignored services. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

1. irqbalance

...... Previously, irqbalance was not enabled because of the streamlined system services, but irqbalance is now proven to be a very necessary service. Its main function is to reasonably allocate and use various CPU cores, especially for the current mainstream CPU with multiple cores, simply put, the pressure can be evenly distributed to each CPU core, which is of great help to improve performance:

Enabling the irqbalance service can improve performance and reduce energy consumption.

Irqbalance is used to optimize interrupt allocation. It automatically collects system data for analysis usage mode and places the working state in Performance mode or Power-save mode based on the system load status.

In Performance mode, irqbalance distributes interruptions evenly to each CPU core as much as possible to make full use of multiple CPU cores and improve Performance.

In Power-save mode, irqbalance distributes interrupts to the first CPU in a centralized manner to ensure the sleep time of other idle CPUs and reduce energy consumption.

(See: http://www.irqbalance.org/documentation.php)

To enable the irqbalance service, perform the following operations:

Shell> chkconfig? Level 2345 irqbalance on

Shell> service irqbalance start

If you do not have this service, install the dependent software package as follows:

Shell> yum-y install irqbalance

Shell> service irqbalance start

You can use shell> mpstat-p all 1 10 to observe the actual CPU usage before and after.

1. Check whether irqbalance is enabled for each device IO when the operating system is running.

Is it device Load Balancing scheduling )? This command can be seen

# Cat/proc/interrupts

The output result is similar to the following information:

CPU0 CPU1 CPU2 CPU3

0: 441733344 441704798 441804679 IO-APIC-edge timer

1: 0 1 2 0 IO-APIC-edge i8042

8: 1 0 1 IO-APIC-edge rtc

9: 0 0 0 0 IO-APIC-level acpi

12: 1 1 2 0 IO-APIC-edge i8042

14: 3962749 3990999 3891110 IO-APIC-edge ide0

98: 0 0 0 0 IO-APIC-level uhci_hcd: usb4

106: 22 23 26 27 IO-APIC-level uhci_hcd: USB 5

130: 7786510 0 0 0 PCI-MSI-X cciss0

146: 6652580 0 0 0 PCI-MSI eth0

154: 1257030 0 0 0 PCI-MSI eth1

169: 0 0 2 0 IO-APIC-level uhci_hcd: usb1, ehci_hcd: usb6

177: 0 0 0 IO-APIC-level uhci_hcd: usb2

185: 13 10 10 15 IO-APIC-level uhci_hcd: usb3

NMI: 0 0 0 0

LOC: 1766973093 1766973092 1766973170 1766973169

From the output, we can see that the IO of NIC 1 (eth0) and nic 2 (eth1) does not work in Server Load balancer scheduling.

In the mode, all data transmission is added to the first core of the CPU, while the other core is idle (obviously

This is a waste of system resources ). Of course, not all hardware devices fully support irqbalance. However

By modifying the startup parameters, we can try to make all hardware devices work in irqbalance mode to improve

The utilization efficiency reduces the system response speed caused by insufficient system resources, and some resources are overloaded.

But it is idle.

2. As for cpuspeed, if you don't want your book to be too hot, you can enable it. As for why, the following are some explanations:

The cpuspeed daemon can be useful for laptops. this daemon lowers the processor clock speed during idle periods to help conserve battery power. various options can be set to adjust the criteria used by cpuspeed to decide when to alter the clock speed. permanent options can be specified in/etc/sysconfig/cpuspeed.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.