0

I have a low end modern hardware using Ryzen 3400G, 8GB Ram and SSD Drive. I read online about speeding up responsiveness using preload, irqbalance and swappiness. The computer is mainly used as a workstation and programming.

  1. Preload

    This program works by preloading frequently used programs to RAM. The intention was to speed up start up speed of various frequently used programs.

    Some says that if you use SSD, this program doesn't really matter, so this program is a bit outdated with modern hardware. Is this really true?

  2. IRQ balance

    It spreads interrupt to various processors. Does that really help to speed up responsiveness?

  3. Swappiness

    If there is not enough RAM, then when it may swap pages to the SSD or harddrive. What if you don't even have a swap? I don't actually have a swap and it seems to be fine. Even if I have a swap, instead of using SSD as swap, I use zram as swap, so does swappiness really make much of a difference?

  4. Ananicy

    There is a program to set higher priority to those require higher interaction. Somehow I don't feel the speed (in terms of responsiveness) difference at all.

2
  • Oh boy. You're diving into system tweaking that will certainly get you into trouble. Prelead (readahead) was removed in current Ubuntu releases. vm.swappiness really shouldn't be messed with unless you REALLY understand how swap works. Leave your IRQ and priorities alone. Really. Otherwise you'll be back here in a few weeks with system performance issues, and asking us how to unspool what you've done. Really.
    – heynnema
    Apr 19, 2020 at 14:53
  • 1
    BTW... your member name really isn't very appropriate. Please consider changing it.
    – heynnema
    Apr 19, 2020 at 15:58

1 Answer 1

0

To answer my own question

1) Preload

Good

Depends on what program you use.

If you use google chome, which requires start up once, it is not helpful. If you use a program that run frequently, that may helps

Bad

It consumes ram

It slows down bootup

There's no real need for preload if you have an SSD. This is because SSDs provide much faster random access times than hard disks, so "pre-loading" binaries/dependencies in memory is a waste, IMO

For the hardware stated, preload is useless

2) IRQ Balance

Old post

https://serverfault.com/questions/513807/is-there-still-a-use-for-irqbalance-on-modern-hardware?rq=1

IRQbalance keeps all of the IRQ requests from backing up on a single CPU. I have seen many systems with 4+ CPU cores perform slow because all of the processes on various CPU's are waiting on CPU 0 to process network or storage IRQ requests. CPU 0 looks very, very busy, all the other CPUs are not busy, yet the apps are very slow. The apps are slow because they are waiting on their IO requests from CPU 0.

IRQbalance tries to balance this out in an intelligent way accross all the CPUs and, when possible, puts the IRQ processing as close to the process as possible. This might be the same core, a core on the same die sharing the same cache, or a core in the same NUMA zone.

You should use irqbalance unless:

You are manually pinning your apps/IRQ's to specific cores for a very good reason (low latency, realtime requirements, etc.)

Virtual Guests. It does not really make sense because unless you are pinning the guest to specific CPUs and IRQs and dedicated net/storage hardware, you will likely not see the benefits you would on bare metal. But your KVM/RHEV host SHOULD be using irqbalance and numad and tuned.

Newer post

However, in https://github.com/konkor/cpufreq/issues/48

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.

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.

Seems that linux > 4.9 is able to do irqbalance without an external daemon

Even debian, ubuntu now disable it by default

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

irqbalance is technically not needed on desktop systems (supposedly it is mainly for servers), and may actually reduce performance and power savings. It appears to provide benefits only to server environments that have relatively-constant loading. If it is truly a server-oriented package, then it shouldn't be installed by default on a desktop

3) For swappiness

If you have enough RAM, swapping is not of concern. So all those mentioned is irrelevant. But when you run out of memory one day, you will run into trouble

4) Ananicy

The idea is nice, but dont know the performance difference

1
  • I know I'm responding to an old thread here.. but I just tested out removing irqbalance and indeed, the kernel spreads out devices between the CPU cores rather than putting everything on CPU 0. And most drivers in modern kernels offload as much work as possible into worker threads, all this work would have been done in the interrupt handler in years past, now the interrupt handler completes as fast as possible and the rest of the work is done by the kernel thread (that can run on any CPU.) The days of finding a CPU pegged out due to interrupts is largely past even without irqbalance.
    – hwertz
    Feb 18 at 5:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .