Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"irqbalance detected" even when irqbalance is disabled #48

Open
andy0130tw opened this issue Nov 20, 2017 · 26 comments
Open

"irqbalance detected" even when irqbalance is disabled #48

andy0130tw opened this issue Nov 20, 2017 · 26 comments

Comments

@andy0130tw
Copy link

andy0130tw commented Nov 20, 2017

After updating this GNOME extension I noticed that it start reporting if irqbalance is installed on the device. If so it will replace the loading percentage with a constant, warning message, irqbalance detected.

I then disabled irqbalance through its config file (located at /etc/default/irqbalance) but the message was still there. Stopping the service did not help, either. The comment from the author hinted me that the package should be uninstalled if I saw the message.

I tracked down to the code and located the condition at

cpufreq_output = GLib.spawn_command_line_sync ("pkexec " + this.cpufreqctl_path + " irqbalance");
, but I think it should be more reasonable to check if this service is running instead of checking its existence. For example, check if ps aux | grep /usr/sbin/irqbalance matches.

@konkor
Copy link
Owner

konkor commented Nov 20, 2017

@andy0130tw it's a good idea but it's so hard to test even such simple things sometimes (different policies, user permissions, sudo or not...). It'll be in the future releases (ps -A |grep irqbalance) here

if [ $1 = "irqbalance" ]

You can test it... Just replace in the extension folder (which irqbalance to ps -A |grep irqbalance) and run

sudo ./cpufreqctl install

@seb2411
Copy link

seb2411 commented Nov 20, 2017

Is IRQ Balance a bad option ? Or something we have to disable ?

@konkor
Copy link
Owner

konkor commented Nov 20, 2017

@seb2411 in 2 words, my answer - YES! You can freely uninstall irqbalance.

  1. irqbalance doesn't support fully all kernel features to an example a turning on/off core threads supported by the extension. If you have installed irqbalance package and turn off some cores you can get freezes or not working devices like wi-fi, bluetooth, video cards, sound cards...
  2. irqbalance is not a part of the Linux kernel.
  3. It designed for special server configurations with many RAID/HDD/SDD controllers.
  4. Only Debian Flowers have the irqbalance installed because Debian is very Server oriented. Red Hat doesn't have installed irqbalance by default but it doesn't make Red Hat less server OS.
  5. It keeps all Linux core threads working so its not good for power saving, especially for laptops.
  6. Any user-space application (like games, compilation...) can not get 100% of CPU resources on any thread because it's always sharing this resources with IO tasks.
    ...

Uninstall it and reboot your machine

sudo apt-get remove irqbalance

@seb2411
Copy link

seb2411 commented Nov 20, 2017

@konkor Thank you !

@terencode
Copy link
Collaborator

terencode commented Nov 20, 2017

@konkor What about for a desktop with lots of cores and needs for real-time audio? (jack...)

@konkor
Copy link
Owner

konkor commented Nov 20, 2017

@terencode lol I don't know :) But I know irqbalance on debian stretch from the kernel 4.9 and JACK worked since kernel 2x or 1x??? and works on single CPUs well so ;)
Have you got some additional info?

@terencode
Copy link
Collaborator

@konkor did some researches and it's not recommended, thank you ;)
Ok great I'll try to check it out and help you with what I can!

@konkor konkor closed this as completed in 335c2eb Nov 29, 2017
@konkor
Copy link
Owner

konkor commented Nov 29, 2017

I want people to see this issue for while to help them...

@alexeymuranov
Copy link

alexeymuranov commented Dec 9, 2017

Has there been some serious discussion somewhere about advantages and disadvantages of the irqbalance? Could you provide some links? I do not know enough to judge by myself, and it seems to be installed by default on Ubuntu, so i hesitate to remove it. Besides, it is being actively developed.

@konkor
Copy link
Owner

konkor commented Dec 9, 2017

@alexeymuranov First of the all, IRQBALANCE doesn't support Core Threads ON/OFF Linux kernel feature and it can be a serious issue and can hung the system up easily. So it's not a red/critical warning and you can just ignore this warn and never turn OFF any core!
So if my arguments there #48 (comment) are not enough we are open to discuss.
I can't see any real reasons to use it on my desktop or laptop.

@konkor
Copy link
Owner

konkor commented Dec 9, 2017

IRQBALANCE for the IO Priority and NOT FOR USER SPACE APPLICATIONS!
Do you really want to have a system where you can't get any CPU Core Thread for your application? Where is IO Interruptions can interrupt any application everywhere? So do you think the IRQ handlers don't communicate with other kernel modules? Do you think it's possible or such communication between cores is free? So many of the IO devices are SLOW and have HUGE LATENCY.

@UnconventionalMindset
Copy link

Hi, I got the same issue with an HP OMEN 15-ce019na. The laptop has a i7 7700HQ and GTX1050Ti. I use it for work so I mainly run multiple applications (jetbrains IDEs, Postman, terminals, firefox and play music desktop player), however this laptop should be able those tasks pretty well and in fact it does good on windows and on Linux the fan doesn't spin much but still the extension shows a system loading of 180+% even if sometimes the frequency goes around 0.9 GHz - 1.5 Ghz mainly.
I think there are some issues, either the drivers or the extension.

@konkor
Copy link
Owner

konkor commented Jan 16, 2018

@JacopoGobbi So your issue is a high system loading? Actually, extension parsing /proc/loadavg kernel file stream and picks 1st value for 1 minute. You can google about it. I could recommend you check it manually in the terminal:

cat /proc/loadavg ## to check system loading values
sudo top ## to check top processes
sudo journalctl ## to check system messages
sudo journalctl -f ## to real-time monitor system messages

to find out of cause this issue. BTW gnome trackers/services/servers can do high loading on the start or on the writing activity.

@konkor
Copy link
Owner

konkor commented Jan 16, 2018

@JacopoGobbi So I still prefer the acpi cpufreq mode to intel_pstate mode (Intel doesn't mean always good). You could try to disable intel_pstate mode in the kernel boot line.
Second I recommend to disable turbo-boost and increase minimal frequency (25-30%) for productive profiles on laptops.

@stuaxo
Copy link

stuaxo commented May 11, 2018

I'm pretty confused - I'd never heard of IRQBALANCE until I saw the big orange warning just now after installing cpufreq. I'm on a laptop so according to this thread I should uninstall it. TBH I don't care about threads getting interrupted for IO, I don't play games - just use a web browser and do software development. Further up it mentions servers with SSDs ... my laptop has an SSD and multiple threads.

Another page I saw said IRQBalance is good if on a laptop. At the very least, the orange warning could be a link to a wikipage with pros and cons.

@konkor
Copy link
Owner

konkor commented May 11, 2018

@stuaxo 1) You can use irqbalance package but you aren't be able to turn off CPU Cores with the extension. Actually, you can but it could break/freeze your system.
2) many of IO Devices could be extremely slow in compression to CPU frequencies.
...
Here is a small FAQ http://konkor.github.io/cpufreq/faq/#irqbalance-detected If you have pros and cons I could add them there :)

@stuaxo
Copy link

stuaxo commented May 11, 2018

Thanks :)

I managed to lock up my computer (well it was sort of still running) just now when compiling a bunch of things, so the first thing I did when I came back was uninstall it. It's fairly new, so I'm not sure what's causing it, probably need more RAM...

This is the first I've heard of irqbalancer, so I was just wondering what it was when I saw the orange message.

@stuaxo
Copy link

stuaxo commented May 11, 2018

Just noticed the message is still there even though I uninstalled it, I guess I need to reboot or something ?

@konkor
Copy link
Owner

konkor commented May 11, 2018

@stuaxo yes, you have to reboot after uninstalling.

@bidinou
Copy link

bidinou commented Jul 30, 2018

Hi ! Is it possible to have an option in the extension to disable the warning ? :-)
I decided I would stop messing with the defaults after 25 or so years of tweaking stuff :-), and as it's the default in the LTS version of the major distro, I'll keep it ;)
Great extension BTW, thank you !

@konkor
Copy link
Owner

konkor commented Jul 31, 2018

@bidinou Okay I could add that option in the next version

@ayoungethan
Copy link

I reported irqbalance as a bug when included by default in desktop images:

https://bugs.launchpad.net/ubuntu/+source/ubuntu-meta/+bug/1833322

@DaVince
Copy link

DaVince commented Dec 13, 2019

I've seen a few arguments for or against using irqbalance, but not much in the way of collaboration/discussion between the devs of irqbalance and GNOME cpufreq. Has there been any? Investigating possible performance issues together seems like a better idea than having to trust one single opinion on this.

@konkor
Copy link
Owner

konkor commented Dec 13, 2019

@DaVince I didn't want to start Holy war about it. My first argument is the application doesn't work properly with enabled irqbalance. Second, powersaving. Third, performance related issues etc.

BTW: I'm pretty sure there are many cases where irqbalance could be very useful for server's tasks but not for Desktop usage and, especially, for laptop desktop users.

Linux is very servers oriented and any linux distros want to distribute several versions of kernels. So we all have to running a huge amount useless things for servers hardware, software, protocols and ms azure stacks etc and including irqbalance.

EDIT:

If you don't see 100% loading on CPU0 during your work-flow, you don't need to use irqbalance at all. Also the modern kernel is managing it itself depending on cpu0 loading.

@konkor
Copy link
Owner

konkor commented Dec 13, 2019

GNU/Linux Debian (bug closing the issue) removed IRQBALANCE from dependencies. It means Ubuntu/PopOS/Mint and so on will do the same.

@DaVince
Copy link

DaVince commented Dec 13, 2019

Alright, thank you for digging up more widespread information about this. I will remove irqbalance now. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants